Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improve][chore] variable replace support contains space value #7923

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion seatunnel-core/seatunnel-starter/src/main/bin/seatunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,15 @@ do
fi
done

java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}
UPD_ARGS=""
for arg in "$@"; do
if [[ $arg == *" "* ]]; then
key="${arg%%=*}"
value="${arg#*=}"
UPD_ARGS="${UPD_ARGS}${key}='${value}' "
else
UPD_ARGS="${UPD_ARGS}${arg} "
fi
done

eval "java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${UPD_ARGS}"
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
package org.apache.seatunnel.engine.e2e;

import org.apache.seatunnel.e2e.common.TestSuiteBase;
import org.apache.seatunnel.e2e.common.container.EngineType;
import org.apache.seatunnel.e2e.common.container.TestContainer;
import org.apache.seatunnel.e2e.common.junit.DisabledOnContainer;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.TestTemplate;
Expand All @@ -31,9 +33,13 @@
public class UserVariableIT extends TestSuiteBase {

@TestTemplate
public void userVariableTest(TestContainer container) throws IOException, InterruptedException {
@DisabledOnContainer(
value = {},
type = {EngineType.FLINK, EngineType.SPARK},
disabledReason = "")
public void zetaVariableTest(TestContainer container) throws IOException, InterruptedException {
List<String> variables = new ArrayList<>();
String list = "[abc,def]";
String list = "[a bc]";
variables.add("resName=a$(date +\"%Y%m%d\")");
variables.add("rowNum=10");
variables.add("strTemplate=" + list);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ sink {
source_table_name = ${sourceTableName}
}

# If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
# please go to https://seatunnel.apache.org/docs/connector-v2/sink
Assert {
source_table_name = ${sourceTableName}
rules =
{
field_rules = [
{
field_name = name
field_type = string
field_value = [
{
rule_type = NOT_NULL
equals_to = "a bc"
}
]
}
]
}
}

}
Loading