You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by yu...@apache.org on 2026/01/13 11:02:25 UTC
(flink-cdc) branch master updated: [tests][runtime] Add spec-based transform test cases
This is an automated email from the ASF dual-hosted git repository.
yux pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-cdc.git
The following commit(s) were added to refs/heads/master by this push:
new 30be6982c [tests][runtime] Add spec-based transform test cases
30be6982c is described below
commit 30be6982c9af91fbfb80eec7b5890e2d55a13165
Author: yuxiqian <34...@users.noreply.github.com>
AuthorDate: Tue Jan 13 14:35:32 2026 +0800
[tests][runtime] Add spec-based transform test cases
---
.../cdc/composer/specs/TransformSpecsITCase.java | 498 +++++++++++++++++++++
.../src/test/resources/specs/arithmetic.yaml | 209 +++++++++
.../src/test/resources/specs/basic.yaml | 146 ++++++
.../src/test/resources/specs/casting.yaml | 271 +++++++++++
.../src/test/resources/specs/comparison.yaml | 285 ++++++++++++
.../src/test/resources/specs/condition.yaml | 102 +++++
.../src/test/resources/specs/decimal.yaml | 123 +++++
.../src/test/resources/specs/logical.yaml | 48 ++
.../src/test/resources/specs/meta.yaml | 63 +++
.../src/test/resources/specs/nested.yaml | 213 +++++++++
.../src/test/resources/specs/string.yaml | 149 ++++++
.../src/test/resources/specs/temporal.yaml | 290 ++++++++++++
12 files changed, 2397 insertions(+)
diff --git a/flink-cdc-composer/src/test/java/org/apache/flink/cdc/composer/specs/TransformSpecsITCase.java b/flink-cdc-composer/src/test/java/org/apache/flink/cdc/composer/specs/TransformSpecsITCase.java
new file mode 100644
index 000000000..b77c9d971
--- /dev/null
+++ b/flink-cdc-composer/src/test/java/org/apache/flink/cdc/composer/specs/TransformSpecsITCase.java
@@ -0,0 +1,498 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.cdc.composer.specs;
+
+import org.apache.flink.cdc.common.configuration.Configuration;
+import org.apache.flink.cdc.common.data.DateData;
+import org.apache.flink.cdc.common.data.DecimalData;
+import org.apache.flink.cdc.common.data.GenericArrayData;
+import org.apache.flink.cdc.common.data.GenericMapData;
+import org.apache.flink.cdc.common.data.LocalZonedTimestampData;
+import org.apache.flink.cdc.common.data.TimeData;
+import org.apache.flink.cdc.common.data.TimestampData;
+import org.apache.flink.cdc.common.data.ZonedTimestampData;
+import org.apache.flink.cdc.common.data.binary.BinaryRecordData;
+import org.apache.flink.cdc.common.data.binary.BinaryStringData;
+import org.apache.flink.cdc.common.event.CreateTableEvent;
+import org.apache.flink.cdc.common.event.DataChangeEvent;
+import org.apache.flink.cdc.common.event.Event;
+import org.apache.flink.cdc.common.event.TableId;
+import org.apache.flink.cdc.common.pipeline.PipelineOptions;
+import org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior;
+import org.apache.flink.cdc.common.schema.Schema;
+import org.apache.flink.cdc.common.types.DataType;
+import org.apache.flink.cdc.composer.PipelineExecution;
+import org.apache.flink.cdc.composer.definition.PipelineDef;
+import org.apache.flink.cdc.composer.definition.SinkDef;
+import org.apache.flink.cdc.composer.definition.SourceDef;
+import org.apache.flink.cdc.composer.definition.TransformDef;
+import org.apache.flink.cdc.composer.flink.FlinkPipelineComposer;
+import org.apache.flink.cdc.connectors.values.source.ValuesDataSourceHelper;
+import org.apache.flink.cdc.runtime.typeutils.BinaryRecordDataGenerator;
+import org.apache.flink.test.parameters.ParameterProperty;
+
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
+
+import org.assertj.core.api.Assumptions;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import javax.annotation.Nullable;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.math.BigDecimal;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static java.util.Collections.singletonList;
+import static org.apache.flink.cdc.common.types.DataTypes.ARRAY;
+import static org.apache.flink.cdc.common.types.DataTypes.BIGINT;
+import static org.apache.flink.cdc.common.types.DataTypes.BINARY;
+import static org.apache.flink.cdc.common.types.DataTypes.BOOLEAN;
+import static org.apache.flink.cdc.common.types.DataTypes.BYTES;
+import static org.apache.flink.cdc.common.types.DataTypes.CHAR;
+import static org.apache.flink.cdc.common.types.DataTypes.DATE;
+import static org.apache.flink.cdc.common.types.DataTypes.DECIMAL;
+import static org.apache.flink.cdc.common.types.DataTypes.DOUBLE;
+import static org.apache.flink.cdc.common.types.DataTypes.FIELD;
+import static org.apache.flink.cdc.common.types.DataTypes.FLOAT;
+import static org.apache.flink.cdc.common.types.DataTypes.INT;
+import static org.apache.flink.cdc.common.types.DataTypes.MAP;
+import static org.apache.flink.cdc.common.types.DataTypes.ROW;
+import static org.apache.flink.cdc.common.types.DataTypes.SMALLINT;
+import static org.apache.flink.cdc.common.types.DataTypes.STRING;
+import static org.apache.flink.cdc.common.types.DataTypes.TIME;
+import static org.apache.flink.cdc.common.types.DataTypes.TIMESTAMP;
+import static org.apache.flink.cdc.common.types.DataTypes.TIMESTAMP_LTZ;
+import static org.apache.flink.cdc.common.types.DataTypes.TIMESTAMP_TZ;
+import static org.apache.flink.cdc.common.types.DataTypes.TINYINT;
+import static org.apache.flink.cdc.common.types.DataTypes.VARBINARY;
+import static org.apache.flink.cdc.common.types.DataTypes.VARCHAR;
+import static org.apache.flink.cdc.connectors.values.factory.ValuesDataFactory.IDENTIFIER;
+import static org.apache.flink.cdc.connectors.values.sink.ValuesDataSinkOptions.PRINT_ENABLED;
+import static org.apache.flink.cdc.connectors.values.source.ValuesDataSourceHelper.EventSetId.CUSTOM_SOURCE_EVENTS;
+import static org.apache.flink.cdc.connectors.values.source.ValuesDataSourceOptions.EVENT_SET_ID;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Fail.fail;
+
+/** Spec based transform module IT cases. */
+class TransformSpecsITCase {
+
+ private static final TableId testTableId = TableId.tableId("foo", "bar", "baz");
+ private static final Schema testInputSchema =
+ Schema.newBuilder()
+ .physicalColumn("id_", BIGINT().notNull(), "Identifier")
+ .physicalColumn("bool_", BOOLEAN(), "George", "false")
+ .physicalColumn("tinyint_", TINYINT())
+ .physicalColumn("smallint_", SMALLINT())
+ .physicalColumn("int_", INT())
+ .physicalColumn("bigint_", BIGINT())
+ .physicalColumn("float_", FLOAT())
+ .physicalColumn("double_", DOUBLE())
+ .physicalColumn("decimal_10_0_", DECIMAL(10, 0))
+ .physicalColumn("decimal_20_2_", DECIMAL(20, 2))
+ .physicalColumn("char_", CHAR(140), "Let's Tweet", "...")
+ .physicalColumn("varchar_", VARCHAR(140))
+ .physicalColumn("string_", STRING())
+ .physicalColumn("binary_", BINARY(640))
+ .physicalColumn("varbinary_", VARBINARY(640))
+ .physicalColumn("bytes_", BYTES())
+ .physicalColumn("timestamp_0_", TIMESTAMP(0))
+ .physicalColumn("timestamp_6_", TIMESTAMP(6))
+ .physicalColumn("timestamp_9_", TIMESTAMP(9))
+ .physicalColumn("timestamp_tz_0_", TIMESTAMP_TZ(0))
+ .physicalColumn("timestamp_tz_6_", TIMESTAMP_TZ(6))
+ .physicalColumn("timestamp_tz_9_", TIMESTAMP_TZ(9))
+ .physicalColumn("timestamp_ltz_0_", TIMESTAMP_LTZ(0))
+ .physicalColumn("timestamp_ltz_6_", TIMESTAMP_LTZ(6))
+ .physicalColumn("timestamp_ltz_9_", TIMESTAMP_LTZ(9))
+ .physicalColumn("date_", DATE())
+ .physicalColumn("time_0_", TIME(0))
+ .physicalColumn("time_6_", TIME(6))
+ .physicalColumn("time_9_", TIME(9))
+ .physicalColumn("array_int_", ARRAY(INT()))
+ .physicalColumn("array_string_", ARRAY(STRING()))
+ .physicalColumn("map_int_string_", MAP(INT(), STRING()))
+ .physicalColumn("map_string_array_string_", MAP(STRING(), ARRAY(STRING())))
+ .physicalColumn(
+ "complex_row_", ROW(FIELD("name", STRING()), FIELD("length", INT())))
+ .build();
+
+ private static final BinaryRecordDataGenerator generator =
+ new BinaryRecordDataGenerator(
+ testInputSchema.getColumnDataTypes().toArray(new DataType[0]));
+ private static final List<Event> testInputSuites = new ArrayList<>();
+ private static final List<Event> nonNullTestInputSuites = new ArrayList<>();
+
+ static {
+ BinaryRecordDataGenerator nestedGenerator =
+ new BinaryRecordDataGenerator(new DataType[] {STRING(), INT()});
+
+ BinaryRecordData record1 =
+ generator.generate(
+ new Object[] {
+ 1L,
+ true,
+ (byte) 2,
+ (short) 3,
+ 4,
+ 5L,
+ 7.7f,
+ 88.88d,
+ DecimalData.fromBigDecimal(new BigDecimal("1234567890"), 10, 0),
+ DecimalData.fromBigDecimal(
+ new BigDecimal("123456789012345678.90"), 20, 2),
+ BinaryStringData.fromString("Alice"),
+ BinaryStringData.fromString("Zorro"),
+ BinaryStringData.fromString("From A to Z is Lie"),
+ "Lorem ipsum".getBytes(StandardCharsets.UTF_8),
+ "dolor sit amet".getBytes(StandardCharsets.UTF_8),
+ "amet consectetuer".getBytes(StandardCharsets.UTF_8),
+ TimestampData.fromMillis(123456789, 123456),
+ TimestampData.fromMillis(234567891, 234561),
+ TimestampData.fromMillis(345678912, 345612),
+ ZonedTimestampData.of(123456789, 123456, "Asia/Shanghai"),
+ ZonedTimestampData.of(234567891, 234561, "Europe/Berlin"),
+ ZonedTimestampData.of(345678912, 345612, "America/Puerto_Rico"),
+ LocalZonedTimestampData.fromEpochMillis(123456789, 123456),
+ LocalZonedTimestampData.fromEpochMillis(234567891, 234561),
+ LocalZonedTimestampData.fromEpochMillis(345678912, 345612),
+ DateData.fromLocalDate(LocalDate.of(2000, 12, 31)),
+ TimeData.fromLocalTime(LocalTime.of(19, 43, 17)),
+ TimeData.fromLocalTime(LocalTime.of(21, 45, 3)),
+ TimeData.fromLocalTime(LocalTime.of(3, 59, 59)),
+ new GenericArrayData(new int[] {1, 1, 2, 3, 5, 8, 13}),
+ new GenericArrayData(
+ new Object[] {
+ s("one"), s("one"), s("two"), s("three"), s("five")
+ }),
+ m(1, s("one"), 2, s("two"), 3, s("three")),
+ m(
+ s("one"),
+ new GenericArrayData(new Object[] {s("O"), s("N"), s("E")}),
+ s("two"),
+ new GenericArrayData(new Object[] {s("T"), s("W"), s("O")}),
+ s("three"),
+ new GenericArrayData(
+ new Object[] {s("T"), s("H"), s("R"), s("E"), s("E")})),
+ nestedGenerator.generate(new Object[] {s("Alice"), 5})
+ });
+
+ BinaryRecordData record2 =
+ generator.generate(
+ new Object[] {
+ -1L,
+ false,
+ (byte) -2,
+ (short) -3,
+ -4,
+ -5L,
+ -7.7f,
+ -88.88d,
+ DecimalData.fromBigDecimal(new BigDecimal("-9876543210"), 10, 0),
+ DecimalData.fromBigDecimal(
+ new BigDecimal("-987654321098765432.10"), 20, 2),
+ BinaryStringData.fromString("爱丽丝"),
+ BinaryStringData.fromString("疯帽子"),
+ BinaryStringData.fromString("天地玄黄宇宙洪荒"),
+ "一二三四五".getBytes(StandardCharsets.UTF_8),
+ "六七八九十".getBytes(StandardCharsets.UTF_8),
+ "吾輩は猫である".getBytes(StandardCharsets.UTF_8),
+ TimestampData.fromMillis(723456789, 723456),
+ TimestampData.fromMillis(834567891, 834561),
+ TimestampData.fromMillis(945678912, 945612),
+ ZonedTimestampData.of(723456789, 723456, "Asia/Shanghai"),
+ ZonedTimestampData.of(834567891, 834561, "Europe/Berlin"),
+ ZonedTimestampData.of(945678912, 945612, "America/Puerto_Rico"),
+ LocalZonedTimestampData.fromEpochMillis(723456789, 723456),
+ LocalZonedTimestampData.fromEpochMillis(834567891, 834561),
+ LocalZonedTimestampData.fromEpochMillis(945678912, 945612),
+ DateData.fromLocalDate(LocalDate.of(2001, 1, 1)),
+ TimeData.fromLocalTime(LocalTime.of(12, 34, 45)),
+ TimeData.fromLocalTime(LocalTime.of(23, 45, 7)),
+ TimeData.fromLocalTime(LocalTime.of(2, 30, 5)),
+ new GenericArrayData(new int[] {2, 3, 5, 7, 11, 13, 17, 19}),
+ new GenericArrayData(
+ new Object[] {s("二"), s("san"), s("五"), s("qi"), s("十一")}),
+ m(1, s("yi"), 2, s("er"), 3, s("san")),
+ m(
+ s("一"),
+ new GenericArrayData(new Object[] {s("Y"), s("I")}),
+ s("二"),
+ new GenericArrayData(new Object[] {s("E"), s("R")}),
+ s("三"),
+ new GenericArrayData(new Object[] {s("S"), s("A"), s("N")})),
+ nestedGenerator.generate(new Object[] {s("Derrida"), 7})
+ });
+
+ BinaryRecordData record3 =
+ generator.generate(
+ new Object[] {
+ 0L, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null, null, null,
+ null, null, null, null, null, null, null, null, null, null
+ });
+
+ testInputSuites.add(new CreateTableEvent(testTableId, testInputSchema));
+ testInputSuites.add(DataChangeEvent.insertEvent(testTableId, record1));
+ testInputSuites.add(DataChangeEvent.updateEvent(testTableId, record1, record2));
+ testInputSuites.add(DataChangeEvent.deleteEvent(testTableId, record2));
+ testInputSuites.add(DataChangeEvent.insertEvent(testTableId, record3));
+ testInputSuites.add(DataChangeEvent.deleteEvent(testTableId, record3));
+
+ nonNullTestInputSuites.add(new CreateTableEvent(testTableId, testInputSchema));
+ nonNullTestInputSuites.add(DataChangeEvent.insertEvent(testTableId, record1));
+ nonNullTestInputSuites.add(DataChangeEvent.updateEvent(testTableId, record1, record2));
+ nonNullTestInputSuites.add(DataChangeEvent.deleteEvent(testTableId, record2));
+ }
+
+ private static BinaryStringData s(Object wrappedString) {
+ return BinaryStringData.fromString(Objects.toString(wrappedString));
+ }
+
+ private static <K, V> GenericMapData m(K k1, V v1, K k2, V v2, K k3, V v3) {
+ Map<K, V> map = new LinkedHashMap<>();
+ map.put(k1, v1);
+ map.put(k2, v2);
+ map.put(k3, v3);
+ return new GenericMapData(map);
+ }
+
+ private static final ParameterProperty<Path> MODULE_DIRECTORY =
+ new ParameterProperty<>("moduleDir", Paths::get);
+
+ static Stream<Arguments> loadTestSpecs() throws IOException {
+ Path path =
+ MODULE_DIRECTORY
+ .get(Paths.get("").toAbsolutePath())
+ .resolve("src/test/resources/specs");
+
+ try (Stream<Path> dependencyResources = Files.walk(path)) {
+ List<Path> p = dependencyResources.sorted().collect(Collectors.toList());
+ return p.stream()
+ .filter(f -> f.getFileName().toString().endsWith(".yaml"))
+ .flatMap(TransformSpecsITCase::loadTestSpec)
+ .map(spec -> Arguments.of(spec.group, spec.name, spec));
+ }
+ }
+
+ private static final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
+
+ @SuppressWarnings("unchecked")
+ private static Stream<TestSpec> loadTestSpec(Path specPath) {
+ List<TestSpec> specs = new ArrayList<>();
+ try {
+ for (Iterator<JsonNode> it = mapper.readTree(specPath.toFile()).elements();
+ it.hasNext(); ) {
+ JsonNode specNode = it.next();
+ TestSpec spec = new TestSpec();
+ spec.group = specPath.getFileName().toString();
+ spec.name = asTextOrNull(specNode.get("do"));
+ spec.ignore = asTextOrNull(specNode.get("ignore"));
+ if (specNode.has("time-zone")) {
+ spec.timeZone = asTextOrNull(specNode.get("time-zone"));
+ }
+ if (specNode.has("projection")) {
+ spec.projectionRules =
+ List.of(
+ specNode.get("projection")
+ .asText()
+ .split(System.lineSeparator()));
+ }
+ spec.filterRule = asTextOrNull(specNode.get("filter"));
+ spec.primaryKey = asTextOrNull(specNode.get("primary-key"));
+ spec.partitionKey = asTextOrNull(specNode.get("partition-key"));
+ spec.tableOptions = asTextOrNull(specNode.get("table-options"));
+ spec.postConverters = asTextOrNull(specNode.get("converters"));
+ if (specNode.has("expect")) {
+ spec.expectedLines =
+ List.of(specNode.get("expect").asText().split(System.lineSeparator()));
+ }
+ if (specNode.has("expect-error")) {
+ spec.expectedErrors =
+ List.of(
+ specNode.get("expect-error")
+ .asText()
+ .split(System.lineSeparator()));
+ }
+ if (specNode.has("non-null")) {
+ spec.nonNull = specNode.get("non-null").asBoolean();
+ }
+ specs.add(spec);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to laod test spec file: " + specPath, e);
+ }
+ return specs.stream();
+ }
+
+ static String asTextOrNull(JsonNode node) {
+ return node == null ? null : node.asText();
+ }
+
+ static class TestSpec {
+ public String group;
+ public String name;
+ public String ignore;
+ public String timeZone = "UTC";
+ public List<String> projectionRules = new ArrayList<>();
+ public @Nullable String filterRule;
+ public @Nullable String primaryKey;
+ public @Nullable String partitionKey;
+ public @Nullable String tableOptions;
+ public @Nullable String postConverters;
+ public List<String> expectedLines = new ArrayList<>();
+ public List<String> expectedErrors = new ArrayList<>();
+ public boolean nonNull = false;
+ }
+
+ private final PrintStream standardOut = System.out;
+ private final ByteArrayOutputStream outCaptor = new ByteArrayOutputStream();
+
+ @BeforeEach
+ void takeOverStdOut() {
+ System.setOut(new PrintStream(outCaptor));
+ }
+
+ @AfterEach
+ void handInStdOut() {
+ System.setOut(standardOut);
+ outCaptor.reset();
+ }
+
+ @Test
+ void testRules() throws Exception {
+ List<String> loadedRules =
+ loadTestSpecs()
+ .map(Arguments::get)
+ .map(arr -> "specs/" + arr[0])
+ .distinct()
+ .sorted()
+ .collect(Collectors.toList());
+
+ assertThat(loadedRules).containsExactly(EXPECTED_SPECS);
+ }
+
+ @ParameterizedTest(name = "{0} :: {1}")
+ @MethodSource("loadTestSpecs")
+ void runTransformSpecs(String group, String name, TestSpec spec) throws Exception {
+ Assumptions.assumeThat(spec.ignore)
+ .as("Test case %s is ignored until we close %s", spec.name, spec.ignore)
+ .isNull();
+ FlinkPipelineComposer composer = FlinkPipelineComposer.ofMiniCluster();
+
+ Configuration sourceConfig = new Configuration();
+ sourceConfig.set(EVENT_SET_ID, CUSTOM_SOURCE_EVENTS);
+ SourceDef sourceDef = new SourceDef(IDENTIFIER, "Value Source", sourceConfig);
+
+ Configuration sinkConfig = new Configuration();
+ sinkConfig.set(PRINT_ENABLED, true);
+ SinkDef sinkDef = new SinkDef(IDENTIFIER, "Value Sink", sinkConfig);
+
+ ValuesDataSourceHelper.setSourceEvents(
+ singletonList(spec.nonNull ? nonNullTestInputSuites : testInputSuites));
+
+ TransformDef transformDef =
+ new TransformDef(
+ testTableId.toString(),
+ spec.projectionRules.isEmpty()
+ ? null
+ : String.join(", ", spec.projectionRules),
+ spec.filterRule,
+ spec.primaryKey,
+ spec.partitionKey,
+ spec.tableOptions,
+ String.format("%s :: %s", group, name),
+ spec.postConverters);
+
+ Configuration pipelineConfig = new Configuration();
+ pipelineConfig.set(PipelineOptions.PIPELINE_PARALLELISM, 1);
+ pipelineConfig.set(PipelineOptions.PIPELINE_LOCAL_TIME_ZONE, spec.timeZone);
+ pipelineConfig.set(
+ PipelineOptions.PIPELINE_SCHEMA_CHANGE_BEHAVIOR, SchemaChangeBehavior.EVOLVE);
+ PipelineDef pipelineDef =
+ new PipelineDef(
+ sourceDef,
+ sinkDef,
+ Collections.emptyList(),
+ singletonList(transformDef),
+ Collections.emptyList(),
+ pipelineConfig);
+
+ PipelineExecution execution = composer.compose(pipelineDef);
+
+ if (!spec.expectedErrors.isEmpty()) {
+ StringWriter sw = new StringWriter();
+ try {
+ execution.execute();
+ fail("No exceptions thrown while we're expecting one.");
+ } catch (Exception e) {
+ e.printStackTrace(new PrintWriter(sw));
+ }
+ assertThat(sw.toString()).contains(spec.expectedErrors);
+ } else {
+ execution.execute();
+ String[] outputEvents = outCaptor.toString().trim().split(System.lineSeparator());
+ assertThat(outputEvents).containsExactlyElementsOf(spec.expectedLines);
+ }
+ }
+
+ enum SpecContext {
+ PROJECTION,
+ EXPECT,
+ EXPECT_ERROR,
+ NULL
+ }
+
+ private static final String[] EXPECTED_SPECS = {
+ "specs/arithmetic.yaml",
+ "specs/basic.yaml",
+ "specs/casting.yaml",
+ "specs/comparison.yaml",
+ "specs/condition.yaml",
+ "specs/decimal.yaml",
+ "specs/logical.yaml",
+ "specs/meta.yaml",
+ "specs/nested.yaml",
+ "specs/string.yaml",
+ "specs/temporal.yaml"
+ };
+}
diff --git a/flink-cdc-composer/src/test/resources/specs/arithmetic.yaml b/flink-cdc-composer/src/test/resources/specs/arithmetic.yaml
new file mode 100644
index 000000000..e6bb6d491
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/arithmetic.yaml
@@ -0,0 +1,209 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Add Op
+ projection: |-
+ id_
+ tinyint_ + 1 AS comp_1
+ smallint_ + 1 AS comp_2
+ int_ + 1 AS comp_3
+ bigint_ + 1 AS comp_4
+ float_ + 1 AS comp_5
+ double_ + 1 AS comp_6
+ non-null: 'true'
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` INT,`comp_2` INT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 3, 4, 5, 6, 8.7, 89.88], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 3, 4, 5, 6, 8.7, 89.88], after=[-1, -1, -2, -3, -4, -6.7, -87.88], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -1, -2, -3, -4, -6.7, -87.88], after=[], op=DELETE, meta=()}
+- do: Subtract Op
+ projection: |-
+ id_
+ tinyint_ - 1 AS comp_1
+ smallint_ - 1 AS comp_2
+ int_ - 1 AS comp_3
+ bigint_ - 1 AS comp_4
+ float_ - 1 AS comp_5
+ double_ - 1 AS comp_6
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` INT,`comp_2` INT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1, 2, 3, 4, 6.7, 87.88], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1, 2, 3, 4, 6.7, 87.88], after=[-1, -3, -4, -5, -6, -8.7, -89.88], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -3, -4, -5, -6, -8.7, -89.88], after=[], op=DELETE, meta=()}
+- do: Multiply Op
+ projection: |-
+ id_
+ tinyint_ * 2 AS comp_1
+ smallint_ * 2 AS comp_2
+ int_ * 2 AS comp_3
+ bigint_ * 2 AS comp_4
+ float_ * 2 AS comp_5
+ double_ * 2 AS comp_6
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` INT,`comp_2` INT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 4, 6, 8, 10, 15.4, 177.76], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 4, 6, 8, 10, 15.4, 177.76], after=[-1, -4, -6, -8, -10, -15.4, -177.76], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4, -6, -8, -10, -15.4, -177.76], after=[], op=DELETE, meta=()}
+- do: Divide Op
+ projection: |-
+ id_
+ tinyint_ / 2 AS comp_1
+ smallint_ / 2 AS comp_2
+ int_ / 2 AS comp_3
+ bigint_ / 2 AS comp_4
+ float_ / 2 AS comp_5
+ double_ / 2 AS comp_6
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` INT,`comp_2` INT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1, 1, 2, 2, 3.85, 44.44], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1, 1, 2, 2, 3.85, 44.44], after=[-1, -1, -1, -2, -2, -3.85, -44.44], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -1, -1, -2, -2, -3.85, -44.44], after=[], op=DELETE, meta=()}
+- do: Mod Op
+ projection: |-
+ id_
+ tinyint_ % 2 AS comp_1
+ smallint_ % 2 AS comp_2
+ int_ % 2 AS comp_3
+ bigint_ % CAST(2 AS BIGINT) AS comp_4
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` INT,`comp_2` INT,`comp_3` INT,`comp_4` BIGINT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 0, 1, 0, 1], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 0, 1, 0, 1], after=[-1, 0, -1, 0, -1], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 0, -1, 0, -1], after=[], op=DELETE, meta=()}
+- do: Abs Op
+ projection: |-
+ id_
+ ABS(tinyint_) AS comp_1
+ ABS(smallint_) AS comp_2
+ ABS(int_) AS comp_3
+ ABS(bigint_) AS comp_4
+ ABS(float_) AS comp_5
+ ABS(double_) AS comp_6
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` TINYINT,`comp_2` SMALLINT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2, 3, 4, 5, 7.7, 88.88], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2, 3, 4, 5, 7.7, 88.88], after=[-1, 2, 3, 4, 5, 7.7, 88.88], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 2, 3, 4, 5, 7.7, 88.88], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Ceil Op
+ projection: |-
+ id_
+ CEIL(tinyint_) AS comp_1
+ CEIL(smallint_) AS comp_2
+ CEIL(int_) AS comp_3
+ CEIL(bigint_) AS comp_4
+ CEIL(float_) AS comp_5
+ CEIL(double_) AS comp_6
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` TINYINT,`comp_2` SMALLINT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2, 3, 4, 5, 8.0, 89.0], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2, 3, 4, 5, 8.0, 89.0], after=[-1, -2, -3, -4, -5, -7.0, -88.0], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -2, -3, -4, -5, -7.0, -88.0], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Floor Op
+ projection: |-
+ id_
+ FLOOR(tinyint_) AS comp_1
+ FLOOR(smallint_) AS comp_2
+ FLOOR(int_) AS comp_3
+ FLOOR(bigint_) AS comp_4
+ FLOOR(float_) AS comp_5
+ FLOOR(double_) AS comp_6
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` TINYINT,`comp_2` SMALLINT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2, 3, 4, 5, 7.0, 88.0], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2, 3, 4, 5, 7.0, 88.0], after=[-1, -2, -3, -4, -5, -8.0, -89.0], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -2, -3, -4, -5, -8.0, -89.0], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Round Op
+ projection: |-
+ id_
+ ROUND(tinyint_, 1) AS comp_1
+ ROUND(smallint_, 1) AS comp_2
+ ROUND(int_, 1) AS comp_3
+ ROUND(bigint_, 1) AS comp_4
+ ROUND(float_, 1) AS comp_5
+ ROUND(double_, 1) AS comp_6
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` TINYINT,`comp_2` SMALLINT,`comp_3` INT,`comp_4` BIGINT,`comp_5` FLOAT,`comp_6` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2, 3, 4, 5, 7.7, 88.9], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2, 3, 4, 5, 7.7, 88.9], after=[-1, -2, -3, -4, -5, -7.7, -88.9], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -2, -3, -4, -5, -7.7, -88.9], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Add Op With Null
+ ignore: FLINK-38905
+ projection: |-
+ id_
+ tinyint_ + 1 AS comp_1
+ smallint_ + 1 AS comp_2
+ int_ + 1 AS comp_3
+ bigint_ + 1 AS comp_4
+ float_ + 1 AS comp_5
+ double_ + 1 AS comp_6
+- do: Subtract Op With Null
+ ignore: FLINK-38905
+ projection: |-
+ id_
+ tinyint_ - 1 AS comp_1
+ smallint_ - 1 AS comp_2
+ int_ - 1 AS comp_3
+ bigint_ - 1 AS comp_4
+ float_ - 1 AS comp_5
+ double_ - 1 AS comp_6
+- do: Multiply Op With Null
+ ignore: FLINK-38905
+ projection: |-
+ id_
+ tinyint_ * 2 AS comp_1
+ smallint_ * 2 AS comp_2
+ int_ * 2 AS comp_3
+ bigint_ * 2 AS comp_4
+ float_ * 2 AS comp_5
+ double_ * 2 AS comp_6
+- do: Divide Op With Null
+ ignore: FLINK-38905
+ projection: |-
+ id_
+ tinyint_ / 2 AS comp_1
+ smallint_ / 2 AS comp_2
+ int_ / 2 AS comp_3
+ bigint_ / 2 AS comp_4
+ float_ / 2 AS comp_5
+ double_ / 2 AS comp_6
+- do: Mod Op With Null
+ ignore: FLINK-38905
+ projection: |-
+ id_
+ tinyint_ % 2 AS comp_1
+ smallint_ % 2 AS comp_2
+ int_ % 2 AS comp_3
+ bigint_ % 2 AS comp_4
diff --git a/flink-cdc-composer/src/test/resources/specs/basic.yaml b/flink-cdc-composer/src/test/resources/specs/basic.yaml
new file mode 100644
index 000000000..cfbf397e3
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/basic.yaml
@@ -0,0 +1,146 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Wildcard
+ ignore: FLINK-38887
+ projection: '*'
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`bool_` BOOLEAN 'George' 'false',`tinyint_` TINYINT,`smallint_` SMALLINT,`int_` INT,`bigint_` BIGINT,`float_` FLOAT,`double_` DOUBLE,`decimal_10_0_` DECIMAL(10, 0),`decimal_20_2_` DECIMAL(20, 2),`char_` CHAR(140) 'Let''s Tweet' '...',`varchar_` VARCHAR(140),`string_` STRING,`binary_` BINARY(640),`varbinary_` VARBINARY(640),`bytes_` BYTES,`timestamp_0_` TIMESTAMP(0),`timestamp_6_` TIMESTAMP(6),`ti [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, TG9yZW0gaXBzdW0=, ZG9sb3Igc2l0IGFtZXQ=, YW1ldCBjb25zZWN0ZXR1ZXI=, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, TG9yZW0gaXBzdW0=, ZG9sb3Igc2l0IGFtZXQ=, YW1ldCBjb25zZWN0ZXR1ZXI=, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-0 [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, -2, -3, -4, -5, -7.7, -88.88, -9876543210, -987654321098765432.10, 爱丽丝, 疯帽子, 天地玄黄宇宙洪荒, 5LiA5LqM5LiJ5Zub5LqU, 5YWt5LiD5YWr5Lmd5Y2B, 5ZC+6Lyp44Gv54yr44Gn44GC44KL, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T08:57:36.789723456+08:00, 1970-01-10T15:49:27.891834561+01:00, 1970-01-11T22:41:18.912945612-04:00, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970- [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: All Primitive Columns
+ projection: |-
+ id_
+ bool_
+ tinyint_
+ smallint_
+ int_
+ bigint_
+ float_
+ double_
+ decimal_10_0_
+ decimal_20_2_
+ char_
+ varchar_
+ string_
+ binary_
+ varbinary_
+ bytes_
+ timestamp_0_
+ timestamp_6_
+ timestamp_9_
+ timestamp_tz_0_
+ timestamp_tz_6_
+ timestamp_tz_9_
+ timestamp_ltz_0_
+ timestamp_ltz_6_
+ timestamp_ltz_9_
+ date_
+ time_0_
+ time_6_
+ time_9_
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`bool_` BOOLEAN 'George' 'false',`tinyint_` TINYINT,`smallint_` SMALLINT,`int_` INT,`bigint_` BIGINT,`float_` FLOAT,`double_` DOUBLE,`decimal_10_0_` DECIMAL(10, 0),`decimal_20_2_` DECIMAL(20, 2),`char_` CHAR(140) 'Let''s Tweet' '...',`varchar_` VARCHAR(140),`string_` STRING,`binary_` BINARY(640),`varbinary_` VARBINARY(640),`bytes_` BYTES,`timestamp_0_` TIMESTAMP(0),`timestamp_6_` TIMESTAMP(6),`ti [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, TG9yZW0gaXBzdW0=, ZG9sb3Igc2l0IGFtZXQ=, YW1ldCBjb25zZWN0ZXR1ZXI=, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, TG9yZW0gaXBzdW0=, ZG9sb3Igc2l0IGFtZXQ=, YW1ldCBjb25zZWN0ZXR1ZXI=, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-0 [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, -2, -3, -4, -5, -7.7, -88.88, -9876543210, -987654321098765432.10, 爱丽丝, 疯帽子, 天地玄黄宇宙洪荒, 5LiA5LqM5LiJ5Zub5LqU, 5YWt5LiD5YWr5Lmd5Y2B, 5ZC+6Lyp44Gv54yr44Gn44GC44KL, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T08:57:36.789723456+08:00, 1970-01-10T15:49:27.891834561+01:00, 1970-01-11T22:41:18.912945612-04:00, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970- [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: All Nested Columns
+ ignore: FLINK-38887
+ projection: |-
+ id_
+ array_int_
+ array_string_
+ map_int_string_
+ map_string_array_string_
+ complex_row_
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`array_int_` ARRAY<INT>,`array_string_` ARRAY<STRING>,`map_int_string_` MAP<INT, STRING>,`map_string_array_string_` MAP<STRING, ARRAY<STRING>>,`complex_row_` ROW<`name` STRING, `length` INT>}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, [1, 1, 2, 3, 5, 8, 13], [one, one, two, three, five], {1 -> one, 2 -> two, 3 -> three}, {two -> [T, W, O], one -> [O, N, E], three -> [T, H, R, E, E]}, {name: STRING -> Alice, length: INT -> 5}], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, [1, 1, 2, 3, 5, 8, 13], [one, one, two, three, five], {1 -> one, 2 -> two, 3 -> three}, {two -> [T, W, O], one -> [O, N, E], three -> [T, H, R, E, E]}, {name: STRING -> Alice, length: INT -> 5}], after=[-1, [2, 3, 5, 7, 11, 13, 17, 19], [二, san, 五, qi, 十一], {1 -> yi, 2 -> er, 3 -> san}, {二 -> [E, R], 三 -> [S, A, N], 一 -> [Y, I]}, {name: STRING -> Derrida, length: INT -> 7}], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, [2, 3, 5, 7, 11, 13, 17, 19], [二, san, 五, qi, 十一], {1 -> yi, 2 -> er, 3 -> san}, {二 -> [E, R], 三 -> [S, A, N], 一 -> [Y, I]}, {name: STRING -> Derrida, length: INT -> 7}], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Basic Transform
+ projection: id_,string_
+ filter: 'true'
+ primary-key: id_
+ partition-key: id_,string_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING}, primaryKeys=id_, partitionKeys=id_;string_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie], after=[-1, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null], after=[], op=DELETE, meta=()}
+- do: Calculation Column
+ projection: id_ - 1 AS id_dec, id_ + 1 AS id_inc
+ primary-key: id_dec, id_inc
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_dec` BIGINT NOT NULL,`id_inc` BIGINT NOT NULL}, primaryKeys=id_dec;id_inc, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, 2], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, 2], after=[-2, 0], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-2, 0], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[-1, 1], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 1], after=[], op=DELETE, meta=()}
+- do: Basic Filter
+ projection: id_, string_
+ filter: id_ > 0
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie], op=INSERT, meta=()}
+- do: Filter by Expression
+ projection: id_, string_
+ filter: id_ + 1 <= 1
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie], after=[-1, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null], after=[], op=DELETE, meta=()}
+- do: Filter by Calculation Column
+ non-null: 'true'
+ projection: id_, string_, CHAR_LENGTH(string_) AS strlen_
+ filter: strlen_ > 17
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`strlen_` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, 18], op=INSERT, meta=()}
+- do: Filter by Calculation Column (With NULL)
+ ignore: FLINK-38905
+ projection: id_, string_, CHAR_LENGTH(string_) AS strlen_
+ filter: strlen_ > 17
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`strlen_` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, 18], op=INSERT, meta=()}
+- do: Invalid Projection Expr
+ projection: id_, a_column_that_is_nowhere_to_be_found
+ primary-key: id_
+ expect-error: 'SqlValidatorException: Column ''a_column_that_is_nowhere_to_be_found'' not found in any table'
+- do: Invalid Filter Expr
+ projection: id_
+ filter: another_column_that_is_nowhere_to_be_found > 0
+ primary-key: id_
+ expect-error: Unknown variable or type
diff --git a/flink-cdc-composer/src/test/resources/specs/casting.yaml b/flink-cdc-composer/src/test/resources/specs/casting.yaml
new file mode 100644
index 000000000..84a68e788
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/casting.yaml
@@ -0,0 +1,271 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Cast To String
+ projection: |-
+ id_
+ CAST(bool_ AS VARCHAR) AS comp_1
+ CAST(tinyint_ AS VARCHAR) AS comp_2
+ CAST(smallint_ AS VARCHAR) AS comp_3
+ CAST(int_ AS VARCHAR) AS comp_4
+ CAST(bigint_ AS VARCHAR) AS comp_5
+ CAST(float_ AS VARCHAR) AS comp_6
+ CAST(double_ AS VARCHAR) AS comp_7
+ CAST(decimal_10_0_ AS VARCHAR) AS comp_8
+ CAST(decimal_20_2_ AS VARCHAR) AS comp_9
+ CAST(char_ AS VARCHAR) AS comp_10
+ CAST(varchar_ AS VARCHAR) AS comp_11
+ CAST(string_ AS VARCHAR) AS comp_12
+ CAST(timestamp_0_ AS VARCHAR) AS comp_13
+ CAST(timestamp_6_ AS VARCHAR) AS comp_14
+ CAST(timestamp_9_ AS VARCHAR) AS comp_15
+ CAST(timestamp_tz_0_ AS VARCHAR) AS comp_16
+ CAST(timestamp_tz_6_ AS VARCHAR) AS comp_17
+ CAST(timestamp_tz_9_ AS VARCHAR) AS comp_18
+ CAST(timestamp_ltz_0_ AS VARCHAR) AS comp_19
+ CAST(timestamp_ltz_6_ AS VARCHAR) AS comp_20
+ CAST(timestamp_ltz_9_ AS VARCHAR) AS comp_21
+ CAST(date_ AS VARCHAR) AS comp_22
+ CAST(time_0_ AS VARCHAR) AS comp_23
+ CAST(time_6_ AS VARCHAR) AS comp_24
+ CAST(time_9_ AS VARCHAR) AS comp_25
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` STRING,`comp_2` STRING,`comp_3` STRING,`comp_4` STRING,`comp_5` STRING,`comp_6` STRING,`comp_7` STRING,`comp_8` STRING,`comp_9` STRING,`comp_10` STRING,`comp_11` STRING,`comp_12` STRING,`comp_13` STRING,`comp_14` STRING,`comp_15` STRING,`comp_16` STRING,`comp_17` STRING,`comp_18` STRING,`comp_19` STRING,`comp_20` STRING,`comp_21` STRING,`comp_22` STRING,`comp_23` STRING,`comp_24` STRING, [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 2000-12-31, 19:43:17, 21:45:03, 03 [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 2000-12-31, 19:43:17, 21:45:03, 03:59:59], a [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, -2, -3, -4, -5, -7.7, -88.88, -9876543210, -987654321098765432.10, 爱丽丝, 疯帽子, 天地玄黄宇宙洪荒, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T08:57:36.789723456+08:00, 1970-01-10T15:49:27.891834561+01:00, 1970-01-11T22:41:18.912945612-04:00, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 2001-01-01, 12:34:45, 23:45:07, 02:30:05], after [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Cast To Boolean
+ projection: |-
+ id_
+ CAST(null AS BOOLEAN) AS comp_0
+ CAST(0 AS BOOLEAN) AS comp_1
+ CAST(1 AS BOOLEAN) AS comp_2
+ CAST('FALSE' AS BOOLEAN) AS comp_3
+ CAST('TRUE' AS BOOLEAN) AS comp_4
+ CAST('false' AS BOOLEAN) AS comp_5
+ CAST('true' AS BOOLEAN) AS comp_6
+ CAST('FOOBAR' AS BOOLEAN) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` BOOLEAN,`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, false, true, false, true, false, true, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, false, true, false, true, false, true, false], after=[-1, null, false, true, false, true, false, true, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, false, true, false, true, false, true, false], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, false, true, false, true, false, true, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, false, true, false, true, false, true, false], after=[], op=DELETE, meta=()}
+- do: Cast To TinyInt
+ projection: |-
+ id_
+ CAST(null AS TINYINT) AS comp_0
+ CAST(0 AS TINYINT) AS comp_1
+ CAST(1 AS TINYINT) AS comp_2
+ CAST('2.22' AS TINYINT) AS comp_3
+ CAST('333' AS TINYINT) AS comp_4
+ CAST('44.44' AS TINYINT) AS comp_5
+ CAST('5555555' AS TINYINT) AS comp_6
+ CAST('FOOBAR' AS TINYINT) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` TINYINT,`comp_1` TINYINT,`comp_2` TINYINT,`comp_3` TINYINT,`comp_4` TINYINT,`comp_5` TINYINT,`comp_6` TINYINT,`comp_7` TINYINT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0, 1, 2, 77, 44, 99, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0, 1, 2, 77, 44, 99, null], after=[-1, null, 0, 1, 2, 77, 44, 99, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0, 1, 2, 77, 44, 99, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0, 1, 2, 77, 44, 99, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0, 1, 2, 77, 44, 99, null], after=[], op=DELETE, meta=()}
+- do: Cast To SmallInt
+ projection: |-
+ id_
+ CAST(null AS SMALLINT) AS comp_0
+ CAST(0 AS SMALLINT) AS comp_1
+ CAST(1 AS SMALLINT) AS comp_2
+ CAST('2.22' AS SMALLINT) AS comp_3
+ CAST('333' AS SMALLINT) AS comp_4
+ CAST('44.44' AS SMALLINT) AS comp_5
+ CAST('5555555' AS SMALLINT) AS comp_6
+ CAST('FOOBAR' AS SMALLINT) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` SMALLINT,`comp_1` SMALLINT,`comp_2` SMALLINT,`comp_3` SMALLINT,`comp_4` SMALLINT,`comp_5` SMALLINT,`comp_6` SMALLINT,`comp_7` SMALLINT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0, 1, 2, 333, 44, -15005, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0, 1, 2, 333, 44, -15005, null], after=[-1, null, 0, 1, 2, 333, 44, -15005, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0, 1, 2, 333, 44, -15005, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0, 1, 2, 333, 44, -15005, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0, 1, 2, 333, 44, -15005, null], after=[], op=DELETE, meta=()}
+- do: Cast To Integer
+ projection: |-
+ id_
+ CAST(null AS INT) AS comp_0
+ CAST(0 AS INT) AS comp_1
+ CAST(1 AS INT) AS comp_2
+ CAST('2.22' AS INT) AS comp_3
+ CAST('333' AS INT) AS comp_4
+ CAST('44.44' AS INT) AS comp_5
+ CAST('5555555' AS INT) AS comp_6
+ CAST('FOOBAR' AS INT) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` INT,`comp_1` INT,`comp_2` INT,`comp_3` INT,`comp_4` INT,`comp_5` INT,`comp_6` INT,`comp_7` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0, 1, 2, 333, 44, 5555555, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0, 1, 2, 333, 44, 5555555, null], after=[-1, null, 0, 1, 2, 333, 44, 5555555, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0, 1, 2, 333, 44, 5555555, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0, 1, 2, 333, 44, 5555555, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0, 1, 2, 333, 44, 5555555, null], after=[], op=DELETE, meta=()}
+- do: Cast To BigInt
+ projection: |-
+ id_
+ CAST(null AS BIGINT) AS comp_0
+ CAST(0 AS BIGINT) AS comp_1
+ CAST(1 AS BIGINT) AS comp_2
+ CAST('2.22' AS BIGINT) AS comp_3
+ CAST('333' AS BIGINT) AS comp_4
+ CAST('44.44' AS BIGINT) AS comp_5
+ CAST('5555555' AS BIGINT) AS comp_6
+ CAST('FOOBAR' AS BIGINT) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` BIGINT,`comp_1` BIGINT,`comp_2` BIGINT,`comp_3` BIGINT,`comp_4` BIGINT,`comp_5` BIGINT,`comp_6` BIGINT,`comp_7` BIGINT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0, 1, 2, 333, 44, 5555555, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0, 1, 2, 333, 44, 5555555, null], after=[-1, null, 0, 1, 2, 333, 44, 5555555, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0, 1, 2, 333, 44, 5555555, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0, 1, 2, 333, 44, 5555555, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0, 1, 2, 333, 44, 5555555, null], after=[], op=DELETE, meta=()}
+- do: Cast To Float
+ projection: |-
+ id_
+ CAST(null AS FLOAT) AS comp_0
+ CAST(0 AS FLOAT) AS comp_1
+ CAST(1 AS FLOAT) AS comp_2
+ CAST('2.22' AS FLOAT) AS comp_3
+ CAST('333' AS FLOAT) AS comp_4
+ CAST('44.44' AS FLOAT) AS comp_5
+ CAST('5555555' AS FLOAT) AS comp_6
+ CAST('FOOBAR' AS FLOAT) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` FLOAT,`comp_1` FLOAT,`comp_2` FLOAT,`comp_3` FLOAT,`comp_4` FLOAT,`comp_5` FLOAT,`comp_6` FLOAT,`comp_7` FLOAT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], after=[-1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], after=[], op=DELETE, meta=()}
+- do: Cast To Double
+ projection: |-
+ id_
+ CAST(null AS DOUBLE) AS comp_0
+ CAST(0 AS DOUBLE) AS comp_1
+ CAST(1 AS DOUBLE) AS comp_2
+ CAST('2.22' AS DOUBLE) AS comp_3
+ CAST('333' AS DOUBLE) AS comp_4
+ CAST('44.44' AS DOUBLE) AS comp_5
+ CAST('5555555' AS DOUBLE) AS comp_6
+ CAST('FOOBAR' AS DOUBLE) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` DOUBLE,`comp_1` DOUBLE,`comp_2` DOUBLE,`comp_3` DOUBLE,`comp_4` DOUBLE,`comp_5` DOUBLE,`comp_6` DOUBLE,`comp_7` DOUBLE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], after=[-1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0.0, 1.0, 2.22, 333.0, 44.44, 5555555.0, null], after=[], op=DELETE, meta=()}
+- do: Cast To Decimal(10, 0)
+ projection: |-
+ id_
+ CAST(null AS DECIMAL(10, 0)) AS comp_0
+ CAST(0 AS DECIMAL(10, 0)) AS comp_1
+ CAST(1 AS DECIMAL(10, 0)) AS comp_2
+ CAST('2.22' AS DECIMAL(10, 0)) AS comp_3
+ CAST('333' AS DECIMAL(10, 0)) AS comp_4
+ CAST('44.44' AS DECIMAL(10, 0)) AS comp_5
+ CAST('5555555' AS DECIMAL(10, 0)) AS comp_6
+ CAST('FOOBAR' AS DECIMAL(10, 0)) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` DECIMAL(10, 0),`comp_1` DECIMAL(10, 0),`comp_2` DECIMAL(10, 0),`comp_3` DECIMAL(10, 0),`comp_4` DECIMAL(10, 0),`comp_5` DECIMAL(10, 0),`comp_6` DECIMAL(10, 0),`comp_7` DECIMAL(10, 0)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0, 1, 2, 333, 44, 5555555, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0, 1, 2, 333, 44, 5555555, null], after=[-1, null, 0, 1, 2, 333, 44, 5555555, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0, 1, 2, 333, 44, 5555555, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0, 1, 2, 333, 44, 5555555, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0, 1, 2, 333, 44, 5555555, null], after=[], op=DELETE, meta=()}
+- do: Cast To Decimal(20, 5)
+ projection: |-
+ id_
+ CAST(null AS DECIMAL(20, 5)) AS comp_0
+ CAST(0 AS DECIMAL(20, 5)) AS comp_1
+ CAST(1 AS DECIMAL(20, 5)) AS comp_2
+ CAST('2.22' AS DECIMAL(20, 5)) AS comp_3
+ CAST('333' AS DECIMAL(20, 5)) AS comp_4
+ CAST('44.44' AS DECIMAL(20, 5)) AS comp_5
+ CAST('5555555' AS DECIMAL(20, 5)) AS comp_6
+ CAST('FOOBAR' AS DECIMAL(20, 5)) AS comp_7
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_0` DECIMAL(19, 5),`comp_1` DECIMAL(19, 5),`comp_2` DECIMAL(19, 5),`comp_3` DECIMAL(19, 5),`comp_4` DECIMAL(19, 5),`comp_5` DECIMAL(19, 5),`comp_6` DECIMAL(19, 5),`comp_7` DECIMAL(19, 5)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, 0.00000, 1.00000, 2.22000, 333.00000, 44.44000, 5555555.00000, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, 0.00000, 1.00000, 2.22000, 333.00000, 44.44000, 5555555.00000, null], after=[-1, null, 0.00000, 1.00000, 2.22000, 333.00000, 44.44000, 5555555.00000, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, 0.00000, 1.00000, 2.22000, 333.00000, 44.44000, 5555555.00000, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 0.00000, 1.00000, 2.22000, 333.00000, 44.44000, 5555555.00000, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 0.00000, 1.00000, 2.22000, 333.00000, 44.44000, 5555555.00000, null], after=[], op=DELETE, meta=()}
+- do: Cast To Timestamp (UTC)
+ projection: |-
+ id_
+ CAST(timestamp_0_ AS TIMESTAMP(6)) AS comp_1
+ CAST(timestamp_6_ AS TIMESTAMP(6)) AS comp_2
+ CAST(timestamp_9_ AS TIMESTAMP(6)) AS comp_3
+ CAST(timestamp_tz_0_ AS TIMESTAMP(6)) AS comp_4
+ CAST(timestamp_tz_6_ AS TIMESTAMP(6)) AS comp_5
+ CAST(timestamp_tz_9_ AS TIMESTAMP(6)) AS comp_6
+ CAST(timestamp_ltz_0_ AS TIMESTAMP(6)) AS comp_7
+ CAST(timestamp_ltz_6_ AS TIMESTAMP(6)) AS comp_8
+ CAST(timestamp_ltz_9_ AS TIMESTAMP(6)) AS comp_9
+ CAST('2019-12-31T21:48:25' AS TIMESTAMP(6)) AS comp_10
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` TIMESTAMP(3),`comp_2` TIMESTAMP(3),`comp_3` TIMESTAMP(3),`comp_4` TIMESTAMP(3),`comp_5` TIMESTAMP(3),`comp_6` TIMESTAMP(3),`comp_7` TIMESTAMP(3),`comp_8` TIMESTAMP(3),`comp_9` TIMESTAMP(3),`comp_10` TIMESTAMP(3)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T02:17:36.789123456, 1970-01-03T16:09:27.891234561, 1970-01-05T04:01:18.912345612, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 2019-12-31T21:48:25], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T02:17:36.789123456, 1970-01-03T16:09:27.891234561, 1970-01-05T04:01:18.912345612, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 2019-12-31T21:48:25], after=[-1, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T00:57:36.789723456, 1970 [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T00:57:36.789723456, 1970-01-10T14:49:27.891834561, 1970-01-12T02:41:18.912945612, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 2019-12-31T21:48:25], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null, 2019-12-31T21:48:25], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null, 2019-12-31T21:48:25], after=[], op=DELETE, meta=()}
+- do: Cast To Timestamp (Asia/Shanghai)
+ projection: |-
+ id_
+ CAST(timestamp_0_ AS TIMESTAMP(6)) AS comp_1
+ CAST(timestamp_6_ AS TIMESTAMP(6)) AS comp_2
+ CAST(timestamp_9_ AS TIMESTAMP(6)) AS comp_3
+ CAST(timestamp_tz_0_ AS TIMESTAMP(6)) AS comp_4
+ CAST(timestamp_tz_6_ AS TIMESTAMP(6)) AS comp_5
+ CAST(timestamp_tz_9_ AS TIMESTAMP(6)) AS comp_6
+ CAST(timestamp_ltz_0_ AS TIMESTAMP(6)) AS comp_7
+ CAST(timestamp_ltz_6_ AS TIMESTAMP(6)) AS comp_8
+ CAST(timestamp_ltz_9_ AS TIMESTAMP(6)) AS comp_9
+ CAST('2019-12-31T21:48:25' AS TIMESTAMP(6)) AS comp_10
+ primary-key: id_
+ time-zone: Asia/Shanghai
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` TIMESTAMP(3),`comp_2` TIMESTAMP(3),`comp_3` TIMESTAMP(3),`comp_4` TIMESTAMP(3),`comp_5` TIMESTAMP(3),`comp_6` TIMESTAMP(3),`comp_7` TIMESTAMP(3),`comp_8` TIMESTAMP(3),`comp_9` TIMESTAMP(3),`comp_10` TIMESTAMP(3)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456, 1970-01-04T00:09:27.891234561, 1970-01-05T12:01:18.912345612, 1970-01-02T18:17:36.789123456, 1970-01-04T01:09:27.891234561, 1970-01-05T08:01:18.912345612, 2019-12-31T21:48:25], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456, 1970-01-04T00:09:27.891234561, 1970-01-05T12:01:18.912345612, 1970-01-02T18:17:36.789123456, 1970-01-04T01:09:27.891234561, 1970-01-05T08:01:18.912345612, 2019-12-31T21:48:25], after=[-1, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T08:57:36.789723456, 1970 [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T08:57:36.789723456, 1970-01-10T22:49:27.891834561, 1970-01-12T10:41:18.912945612, 1970-01-09T16:57:36.789723456, 1970-01-10T23:49:27.891834561, 1970-01-12T06:41:18.912945612, 2019-12-31T21:48:25], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null, 2019-12-31T21:48:25], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null, 2019-12-31T21:48:25], after=[], op=DELETE, meta=()}
+- do: Cast To Timestamp Failure
+ projection: |-
+ id_
+ CAST('FOOBAR' AS TIMESTAMP(6)) AS comp_11
+ primary-key: id_
+ expect-error: Failed to evaluate projection expression `castToTimestamp("FOOBAR", __time_zone__)` for column `comp_11` in table `foo.bar.baz`.
diff --git a/flink-cdc-composer/src/test/resources/specs/comparison.yaml b/flink-cdc-composer/src/test/resources/specs/comparison.yaml
new file mode 100644
index 000000000..99c6d6d2d
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/comparison.yaml
@@ -0,0 +1,285 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Equality Comparison
+ projection: |-
+ id_
+ tinyint_ = CAST(2 AS TINYINT) AS comp_1
+ smallint_ = CAST(3 AS SMALLINT) AS comp_2
+ int_ = 4 AS comp_3
+ bigint_ = CAST(5 AS BIGINT) AS comp_4
+ float_ = CAST('7.7' AS FLOAT) AS comp_5
+ double_ = CAST('88.88' AS DOUBLE) AS comp_6
+ decimal_10_0_ = CAST('1234567890' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ = CAST('123456789012345678.90' AS DECIMAL(20, 2)) AS comp_8
+ char_ = 'Alice' AS comp_9
+ varchar_ = 'Zorro' AS comp_10
+ string_ = 'From A to Z is Lie' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, true, true, true, true, true, true, true, true, true, true], after=[-1, false, false, false, false, false, false, false, false, false, false, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+- do: Inequality Comparison
+ projection: |-
+ id_
+ tinyint_ <> CAST(2 AS TINYINT) AS comp_1
+ smallint_ <> CAST(3 AS SMALLINT) AS comp_2
+ int_ <> 4 AS comp_3
+ bigint_ <> CAST(5 AS BIGINT) AS comp_4
+ float_ <> CAST('7.7' AS FLOAT) AS comp_5
+ double_ <> CAST('88.88' AS DOUBLE) AS comp_6
+ decimal_10_0_ <> CAST('1234567890' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ <> CAST('123456789012345678.90' AS DECIMAL(20, 2)) AS comp_8
+ char_ <> 'Alice' AS comp_9
+ varchar_ <> 'Zorro' AS comp_10
+ string_ <> 'From A to Z is Lie' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, false, false, false, false, false, false, false, false, false, false, false], after=[-1, true, true, true, true, true, true, true, true, true, true, true], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, true, true, true, true, true, true, true, true, true, true, true], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, true, true, true, true, true, true, true, true, true, true, true], after=[], op=DELETE, meta=()}
+- do: Greater Op
+ projection: |-
+ id_
+ tinyint_ > CAST(2 AS TINYINT) AS comp_1
+ smallint_ > CAST(3 AS SMALLINT) AS comp_2
+ int_ > 4 AS comp_3
+ bigint_ > CAST(5 AS BIGINT) AS comp_4
+ float_ > CAST('7.7' AS FLOAT) AS comp_5
+ double_ > CAST('88.88' AS DOUBLE) AS comp_6
+ decimal_10_0_ > CAST('1234567890' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ > CAST('123456789012345678.90' AS DECIMAL(20, 2)) AS comp_8
+ char_ > 'Alice' AS comp_9
+ varchar_ > 'Zorro' AS comp_10
+ string_ > 'From A to Z is Lie' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, false, false, false, false, false, false, false, false, false, false, false], after=[-1, false, false, false, false, false, false, false, false, true, true, true], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, false, false, false, false, false, false, false, true, true, true], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+- do: GreaterEq Op
+ projection: |-
+ id_
+ tinyint_ >= CAST(2 AS TINYINT) AS comp_1
+ smallint_ >= CAST(3 AS SMALLINT) AS comp_2
+ int_ >= 4 AS comp_3
+ bigint_ >= CAST(5 AS BIGINT) AS comp_4
+ float_ >= CAST('7.7' AS FLOAT) AS comp_5
+ double_ >= CAST('88.88' AS DOUBLE) AS comp_6
+ decimal_10_0_ >= CAST('1234567890' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ >= CAST('123456789012345678.90' AS DECIMAL(20, 2)) AS comp_8
+ char_ >= 'Alice' AS comp_9
+ varchar_ >= 'Zorro' AS comp_10
+ string_ >= 'From A to Z is Lie' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, true, true, true, true, true, true, true, true, true, true], after=[-1, false, false, false, false, false, false, false, false, true, true, true], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, false, false, false, false, false, false, false, true, true, true], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+- do: Less Op
+ projection: |-
+ id_
+ tinyint_ < CAST(2 AS TINYINT) AS comp_1
+ smallint_ < CAST(3 AS SMALLINT) AS comp_2
+ int_ < 4 AS comp_3
+ bigint_ < CAST(5 AS BIGINT) AS comp_4
+ float_ < CAST('7.7' AS FLOAT) AS comp_5
+ double_ < CAST('88.88' AS DOUBLE) AS comp_6
+ decimal_10_0_ < CAST('1234567890' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ < CAST('123456789012345678.90' AS DECIMAL(20, 2)) AS comp_8
+ char_ < 'Alice' AS comp_9
+ varchar_ < 'Zorro' AS comp_10
+ string_ < 'From A to Z is Lie' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, false, false, false, false, false, false, false, false, false, false, false], after=[-1, true, true, true, true, true, true, true, true, false, false, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, true, true, true, true, true, true, true, true, false, false, false], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+- do: LessEq Op
+ projection: |-
+ id_
+ tinyint_ <= CAST(2 AS TINYINT) AS comp_1
+ smallint_ <= CAST(3 AS SMALLINT) AS comp_2
+ int_ <= 4 AS comp_3
+ bigint_ <= CAST(5 AS BIGINT) AS comp_4
+ float_ <= CAST('7.7' AS FLOAT) AS comp_5
+ double_ <= CAST('88.88' AS DOUBLE) AS comp_6
+ decimal_10_0_ <= CAST('1234567890' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ <= CAST('123456789012345678.90' AS DECIMAL(20, 2)) AS comp_8
+ char_ <= 'Alice' AS comp_9
+ varchar_ <= 'Zorro' AS comp_10
+ string_ <= 'From A to Z is Lie' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, true, true, true, true, true, true, true, true, true, true], after=[-1, true, true, true, true, true, true, true, true, false, false, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, true, true, true, true, true, true, true, true, false, false, false], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+- do: IsNull Op
+ projection: id_, string_, id_ IS NULL AS comp_1, string_ IS NULL AS comp_2, 'A' IS NULL AS comp_3, CAST(NULL AS INT) IS NULL AS comp_4
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, false, false, false, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, false, false, false, true], after=[-1, 天地玄黄宇宙洪荒, false, false, false, true], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, false, false, false, true], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, false, true, false, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, false, true, false, true], after=[], op=DELETE, meta=()}
+- do: IsNotNull Op
+ projection: id_, string_, id_ IS NOT NULL AS comp_1, string_ IS NOT NULL AS comp_2, 'A' IS NOT NULL AS comp_3, CAST(NULL AS INT) IS NOT NULL AS comp_4
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, true, true, true, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, true, true, true, false], after=[-1, 天地玄黄宇宙洪荒, true, true, true, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, true, true, true, false], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, true, false, true, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, true, false, true, false], after=[], op=DELETE, meta=()}
+- do: Between Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ tinyint_ BETWEEN CAST(1 AS TINYINT) AND CAST(3 AS TINYINT) AS comp_1
+ smallint_ BETWEEN CAST(2 AS SMALLINT) AND CAST(4 AS SMALLINT) AS comp_2
+ int_ BETWEEN 3 AND 5 AS comp_3
+ bigint_ BETWEEN CAST(4 AS BIGINT) AND CAST(6 AS BIGINT) AS comp_4
+ float_ BETWEEN CAST('5.5' AS FLOAT) AND CAST('7.7' AS FLOAT) AS comp_5
+ double_ BETWEEN CAST('77.77' AS DOUBLE) AND CAST('99.99' AS DOUBLE) AS comp_6
+ decimal_10_0_ BETWEEN CAST('10' AS DECIMAL(10, 0)) AND CAST('9999999999' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ BETWEEN CAST('1.45' AS DECIMAL(20, 2)) AND CAST('999999999999999999.99' AS DECIMAL(20, 2)) AS comp_8
+ char_ BETWEEN 'A' AND 'Z' AS comp_9
+ varchar_ BETWEEN 'Aaa' AND 'Zzz' AS comp_10
+ string_ BETWEEN 'Alice' AND 'Zorro' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, true, true, true, true, true, true, true, true, true, true], after=[-1, false, false, false, false, false, false, false, false, false, false, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+- do: Not Between Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ tinyint_ NOT BETWEEN CAST(1 AS TINYINT) AND CAST(3 AS TINYINT) AS comp_1
+ smallint_ NOT BETWEEN CAST(2 AS SMALLINT) AND CAST(4 AS SMALLINT) AS comp_2
+ int_ NOT BETWEEN 3 AND 5 AS comp_3
+ bigint_ NOT BETWEEN CAST(4 AS BIGINT) AND CAST(6 AS BIGINT) AS comp_4
+ float_ NOT BETWEEN CAST('5.5' AS FLOAT) AND CAST('7.7' AS FLOAT) AS comp_5
+ double_ NOT BETWEEN CAST('77.77' AS DOUBLE) AND CAST('99.99' AS DOUBLE) AS comp_6
+ decimal_10_0_ NOT BETWEEN CAST('10' AS DECIMAL(10, 0)) AND CAST('9999999999' AS DECIMAL(10, 0)) AS comp_7
+ decimal_20_2_ NOT BETWEEN CAST('1.45' AS DECIMAL(20, 2)) AND CAST('999999999999999999.99' AS DECIMAL(20, 2)) AS comp_8
+ char_ NOT BETWEEN 'A' AND 'Z' AS comp_9
+ varchar_ NOT BETWEEN 'Aaa' AND 'Zzz' AS comp_10
+ string_ NOT BETWEEN 'Alice' AND 'Zorro' AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, false, false, false, false, false, false, false, false, false, false, false], after=[-1, true, true, true, true, true, true, true, true, true, true, true], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, true, true, true, true, true, true, true, true, true, true, true], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, true, true, true, true, true, true, true, true, true, true, true], after=[], op=DELETE, meta=()}
+- do: String Like Op
+ non-null: 'true'
+ projection: id_, char_ LIKE 'A.*' AS comp_1, varchar_ LIKE '.*rro' AS comp_2, string_ LIKE 'From [A-Z] to [A-Z] is Lie' AS comp_3
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, true, true], after=[-1, false, false, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, false, false], after=[], op=DELETE, meta=()}
+- do: String Like Op (With NULL)
+ ignore: FLINK-38905
+ projection: id_, char_ LIKE 'A.*' AS comp_1, varchar_ LIKE '.*rro' AS comp_2, string_ LIKE 'From [A-Z] to [A-Z] is Lie' AS comp_3
+ primary-key: id_
+- do: String Not Like Op
+ non-null: 'true'
+ projection: id_, char_ NOT LIKE 'A.*' AS comp_1, varchar_ NOT LIKE '.*rro' AS comp_2, string_ NOT LIKE 'From [A-Z] to [A-Z] is Lie' AS comp_3
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, false, false, false], after=[-1, true, true, true], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, true, true, true], after=[], op=DELETE, meta=()}
+- do: String Not Like Op (With NULL)
+ ignore: FLINK-38905
+ projection: id_, char_ NOT LIKE 'A.*' AS comp_1, varchar_ NOT LIKE '.*rro' AS comp_2, string_ NOT LIKE 'From [A-Z] to [A-Z] is Lie' AS comp_3
+ primary-key: id_
+- do: In Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ tinyint_ IN (CAST(2 AS TINYINT)) AS comp_1
+ smallint_ IN (CAST(3 AS SMALLINT)) AS comp_2
+ int_ IN (4) AS comp_3
+ bigint_ IN (CAST(5 AS BIGINT)) AS comp_4
+ float_ IN (CAST('7.7' AS FLOAT)) AS comp_5
+ double_ IN (CAST('88.88' AS DOUBLE)) AS comp_6
+ decimal_10_0_ IN (CAST('1234567890' AS DECIMAL(10, 0))) AS comp_7
+ decimal_20_2_ IN (CAST('123456789012345678.90' AS DECIMAL(20, 2))) AS comp_8
+ char_ IN ('Alice') AS comp_9
+ varchar_ IN ('Zorro') AS comp_10
+ string_ IN ('From A to Z is Lie') AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, true, true, true, true, true, true, true, true, true, true], after=[-1, false, false, false, false, false, false, false, false, false, false, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, false, false, false, false, false, false, false, false, false, false, false], after=[], op=DELETE, meta=()}
+- do: Not In Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ tinyint_ NOT IN (CAST(2 AS TINYINT)) AS comp_1
+ smallint_ NOT IN (CAST(3 AS SMALLINT)) AS comp_2
+ int_ NOT IN (4) AS comp_3
+ bigint_ NOT IN (CAST(5 AS BIGINT)) AS comp_4
+ float_ NOT IN (CAST('7.7' AS FLOAT)) AS comp_5
+ double_ NOT IN (CAST('88.88' AS DOUBLE)) AS comp_6
+ decimal_10_0_ NOT IN (CAST('1234567890' AS DECIMAL(10, 0))) AS comp_7
+ decimal_20_2_ NOT IN (CAST('123456789012345678.90' AS DECIMAL(20, 2))) AS comp_8
+ char_ NOT IN ('Alice') AS comp_9
+ varchar_ NOT IN ('Zorro') AS comp_10
+ string_ NOT IN ('From A to Z is Lie') AS comp_11
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN,`comp_10` BOOLEAN,`comp_11` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, false, false, false, false, false, false, false, false, false, false, false], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, false, false, false, false, false, false, false, false, false, false, false], after=[-1, true, true, true, true, true, true, true, true, true, true, true], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, true, true, true, true, true, true, true, true, true, true, true], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, true, true, true, true, true, true, true, true, true, true, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, true, true, true, true, true, true, true, true, true, true, true], after=[], op=DELETE, meta=()}
diff --git a/flink-cdc-composer/src/test/resources/specs/condition.yaml b/flink-cdc-composer/src/test/resources/specs/condition.yaml
new file mode 100644
index 000000000..d220ffa86
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/condition.yaml
@@ -0,0 +1,102 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Case When Clause
+ projection: |-
+ id_, int_
+ CASE int_ WHEN -4 THEN '负' WHEN 4 THEN '正' ELSE '〇' END AS chinese_id
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_` INT,`chinese_id` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 4, 正], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 4, 正], after=[-1, -4, 负], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4, 负], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 〇], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 〇], after=[], op=DELETE, meta=()}
+- do: Case When Null Clause
+ projection: |-
+ id_, int_
+ CASE int_ WHEN -4 THEN '负' WHEN 4 THEN '正' END AS chinese_id
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_` INT,`chinese_id` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 4, 正], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 4, 正], after=[-1, -4, 负], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4, 负], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Case When Condition Clause
+ projection: |-
+ id_, int_
+ CASE WHEN int_ < 0 THEN '负' WHEN int_ > 0 THEN '正' ELSE '〇' END AS chinese_id
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_` INT,`chinese_id` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 4, 正], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 4, 正], after=[-1, -4, 负], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4, 负], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, 〇], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, 〇], after=[], op=DELETE, meta=()}
+- do: Case When Null Condition Clause
+ projection: |-
+ id_, int_
+ CASE WHEN int_ < 0 THEN '负' WHEN int_ > 0 THEN '正' END AS chinese_id
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_` INT,`chinese_id` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 4, 正], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 4, 正], after=[-1, -4, 负], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4, 负], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Coalesce Clause
+ projection: |-
+ id_
+ COALESCE(int_, 17) AS int_fallback
+ COALESCE(string_, 'Alice') AS string_fallback
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_fallback` INT,`string_fallback` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 4, From A to Z is Lie], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 4, From A to Z is Lie], after=[-1, -4, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, 17, Alice], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, 17, Alice], after=[], op=DELETE, meta=()}
+- do: If Clause
+ non-null: 'true'
+ projection: |-
+ id_
+ IF(int_ > 0, '正', '非正') AS int_if
+ IF(CHAR_LENGTH(string_) > 10, '长' , '短') AS string_if
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_if` STRING,`string_if` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 正, 长], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 正, 长], after=[-1, 非正, 短], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 非正, 短], after=[], op=DELETE, meta=()}
+- do: If Clause (With NULL)
+ ignore: FLINK-38905
+ projection: |-
+ id_
+ IF(int_ > 0, '正', '非正') AS int_if
+ IF(CHAR_LENGTH(string_) > 10, '长' , '短') AS string_if
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_if` STRING,`string_if` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 正, 长], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 正, 长], after=[-1, 非正, 短], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 非正, 短], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, 非正, 短], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, 非正, 短], after=[], op=DELETE, meta=()}
diff --git a/flink-cdc-composer/src/test/resources/specs/decimal.yaml b/flink-cdc-composer/src/test/resources/specs/decimal.yaml
new file mode 100644
index 000000000..e12ddb025
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/decimal.yaml
@@ -0,0 +1,123 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Add Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ decimal_10_0_ + CAST(1 AS DECIMAL(1, 0)) AS comp_1
+ decimal_20_2_ + CAST(1 AS DECIMAL(1, 0)) AS comp_2
+ non-null: 'true'
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(11, 0),`comp_2` DECIMAL(19, 2)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567891, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567891, null], after=[-1, -9876543209, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -9876543209, null], after=[], op=DELETE, meta=()}
+- do: Subtract Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ decimal_10_0_ - CAST(1 AS DECIMAL(1, 0)) AS comp_1
+ decimal_20_2_ - CAST(1 AS DECIMAL(1, 0)) AS comp_2
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(11, 0),`comp_2` DECIMAL(19, 2)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567889, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567889, null], after=[-1, -9876543211, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -9876543211, null], after=[], op=DELETE, meta=()}
+- do: Multiply Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ decimal_10_0_ * CAST(2 AS DECIMAL(1, 0)) AS comp_1
+ decimal_20_2_ * CAST(2 AS DECIMAL(1, 0)) AS comp_2
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(11, 0),`comp_2` DECIMAL(19, 2)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2469135780, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2469135780, null], after=[-1, -19753086420, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -19753086420, null], after=[], op=DELETE, meta=()}
+- do: Divide Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ decimal_10_0_ / CAST(2 AS DECIMAL(1, 0)) AS comp_1
+ decimal_20_2_ / CAST(2 AS DECIMAL(1, 0)) AS comp_2
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(16, 6),`comp_2` DECIMAL(19, 2)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 617.283945, 61728394506172839.45], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 617.283945, 61728394506172839.45], after=[-1, -4938.271605, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -4938.271605, null], after=[], op=DELETE, meta=()}
+- do: Abs Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ ABS(decimal_10_0_) AS comp_1
+ ABS(decimal_20_2_) AS comp_2
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(10, 0),`comp_2` DECIMAL(19, 2)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567890, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567890, null], after=[-1, 9876543210, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 9876543210, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Ceil Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ CEIL(decimal_10_0_) AS comp_1
+ CEIL(decimal_20_2_) AS comp_2
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(10, 0),`comp_2` DECIMAL(19, 0)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567890, 123456789012345679], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567890, 123456789012345679], after=[-1, -9876543210, -987654321098765432], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -9876543210, -987654321098765432], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Floor Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ FLOOR(decimal_10_0_) AS comp_1
+ FLOOR(decimal_20_2_) AS comp_2
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(10, 0),`comp_2` DECIMAL(19, 0)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1234567890, 123456789012345678], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1234567890, 123456789012345678], after=[-1, -9876543210, -987654321098765433], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -9876543210, -987654321098765433], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Round Op
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ ROUND(decimal_10_0_, 1) AS comp_1
+ ROUND(decimal_20_2_, 1) AS comp_2
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DECIMAL(10, 0),`comp_2` DECIMAL(19, 1)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 12345678900, 123456789012345678.9], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 12345678900, 123456789012345678.9], after=[-1, -98765432100, -987654321098765432.1], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, -98765432100, -987654321098765432.1], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
diff --git a/flink-cdc-composer/src/test/resources/specs/logical.yaml b/flink-cdc-composer/src/test/resources/specs/logical.yaml
new file mode 100644
index 000000000..cc825f7a6
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/logical.yaml
@@ -0,0 +1,48 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Logical Operators
+ projection: |-
+ id_, bool_
+ bool_ OR TRUE AS comp_1
+ bool_ OR FALSE AS comp_2
+ bool_ AND TRUE AS comp_3
+ bool_ AND FALSE AS comp_4
+ NOT bool_ AS comp_5
+ bool_ IS TRUE AS comp_6
+ bool_ IS NOT TRUE AS comp_7
+ bool_ IS FALSE AS comp_8
+ bool_ IS NOT FALSE AS comp_9
+ primary-key: id_
+ non-null: 'true'
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`bool_` BOOLEAN 'George' 'false',`comp_1` BOOLEAN,`comp_2` BOOLEAN,`comp_3` BOOLEAN,`comp_4` BOOLEAN,`comp_5` BOOLEAN,`comp_6` BOOLEAN,`comp_7` BOOLEAN,`comp_8` BOOLEAN,`comp_9` BOOLEAN}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, true, true, true, true, false, false, true, false, false, true], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, true, true, true, true, false, false, true, false, false, true], after=[-1, false, true, false, false, false, true, false, true, true, false], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, false, true, false, false, false, true, false, true, true, false], after=[], op=DELETE, meta=()}
+- do: Logical Operators With Null
+ projection: |-
+ id_, bool_
+ bool_ OR TRUE AS comp_1
+ bool_ OR FALSE AS comp_2
+ bool_ AND TRUE AS comp_3
+ bool_ AND FALSE AS comp_4
+ NOT bool_ AS comp_5
+ bool_ IS TRUE AS comp_6
+ bool_ IS NOT TRUE AS comp_7
+ bool_ IS FALSE AS comp_8
+ bool_ IS NOT FALSE AS comp_9
+ primary-key: id_
+ expect-error: 'java.lang.RuntimeException: Failed to evaluate projection expression `$0 || false` for column `comp_2` in table `foo.bar.baz`.'
diff --git a/flink-cdc-composer/src/test/resources/specs/meta.yaml b/flink-cdc-composer/src/test/resources/specs/meta.yaml
new file mode 100644
index 000000000..a484e56fd
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/meta.yaml
@@ -0,0 +1,63 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Append Metadata Columns
+ projection: |-
+ id_
+ __namespace_name__ || __schema_name__ || __table_name__ AS identifier
+ __namespace_name__
+ __schema_name__
+ __table_name__
+ __data_event_type__
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`identifier` STRING,`__namespace_name__` STRING NOT NULL,`__schema_name__` STRING NOT NULL,`__table_name__` STRING NOT NULL,`__data_event_type__` STRING NOT NULL}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, foobarbaz, foo, bar, baz, +I], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, foobarbaz, foo, bar, baz, -U], after=[-1, foobarbaz, foo, bar, baz, +U], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, foobarbaz, foo, bar, baz, -D], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, foobarbaz, foo, bar, baz, +I], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, foobarbaz, foo, bar, baz, -D], after=[], op=DELETE, meta=()}
+- do: Schema Metadata Rewrite
+ ignore: FLINK-38887
+ projection: id_, string_, __data_event_type__ AS op_type
+ filter: 'false'
+ primary-key: id_
+ partition-key: id_, string_
+ table-options: bucket=100,comment=metadata_orders
+ expect: CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`op_type` STRING NOT NULL}, primaryKeys=id_, partitionKeys=id_;string_, options=({bucket=100, comment=metadata_orders})}
+- do: Soft Delete Post Converter
+ ignore: FLINK-38887
+ projection: __data_event_type__ AS op_type, *
+ primary-key: id_
+ converters: SOFT_DELETE
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`op_type` STRING NOT NULL,`id_` BIGINT NOT NULL 'Identifier',`bool_` BOOLEAN 'George' 'false',`tinyint_` TINYINT,`smallint_` SMALLINT,`int_` INT,`bigint_` BIGINT,`float_` FLOAT,`double_` DOUBLE,`decimal_10_0_` DECIMAL(10, 0),`decimal_20_2_` DECIMAL(20, 2),`char_` CHAR(140) 'Let''s Tweet' '...',`varchar_` VARCHAR(140),`string_` STRING,`binary_` BINARY(640),`varbinary_` VARBINARY(640),`bytes_` BYTES,`timestamp_0_` TIMESTAMP(0),`time [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[+I, 1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, TG9yZW0gaXBzdW0=, ZG9sb3Igc2l0IGFtZXQ=, YW1ldCBjb25zZWN0ZXR1ZXI=, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234 [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-U, 1, true, 2, 3, 4, 5, 7.7, 88.88, 1234567890, 123456789012345678.90, Alice, Zorro, From A to Z is Lie, TG9yZW0gaXBzdW0=, ZG9sb3Igc2l0IGFtZXQ=, YW1ldCBjb25zZWN0ZXR1ZXI=, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970-01-05T00:01:18.912345612, 1970-01-02T10:17:36.789123456+08:00, 1970-01-03T17:09:27.891234561+01:00, 1970-01-05T00:01:18.912345612-04:00, 1970-01-02T10:17:36.789123456, 1970-01-03T17:09:27.891234561, 1970- [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[-D, -1, false, -2, -3, -4, -5, -7.7, -88.88, -9876543210, -987654321098765432.10, 爱丽丝, 疯帽子, 天地玄黄宇宙洪荒, 5LiA5LqM5LiJ5Zub5LqU, 5YWt5LiD5YWr5Lmd5Y2B, 5ZC+6Lyp44Gv54yr44Gn44GC44KL, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.891834561, 1970-01-11T22:41:18.912945612, 1970-01-09T08:57:36.789723456+08:00, 1970-01-10T15:49:27.891834561+01:00, 1970-01-11T22:41:18.912945612-04:00, 1970-01-09T08:57:36.789723456, 1970-01-10T15:49:27.89 [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[+I, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[-D, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+- do: Downcase Post Converter
+ ignore: FLINK-38887
+ projection: id_, 'UPCASE' AS UPCASE, 'downcase' AS downcase, 'MiXeD cAsE' AS MiXeD_cAsE
+ primary-key: id_
+ converters: FIELD_NAME_LOWER_CASE
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`upcase` STRING,`downcase` STRING,`mixed_case` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, UPCASE, downcase, MiXeD cAsE], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, UPCASE, downcase, MiXeD cAsE], after=[-1, UPCASE, downcase, MiXeD cAsE], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, UPCASE, downcase, MiXeD cAsE], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, UPCASE, downcase, MiXeD cAsE], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, UPCASE, downcase, MiXeD cAsE], after=[], op=DELETE, meta=()}
diff --git a/flink-cdc-composer/src/test/resources/specs/nested.yaml b/flink-cdc-composer/src/test/resources/specs/nested.yaml
new file mode 100644
index 000000000..9b84f334a
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/nested.yaml
@@ -0,0 +1,213 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Select Nested Objects
+ ignore: FLINK-38887
+ projection: |-
+ id_
+ array_int_
+ array_string_
+ map_int_string_
+ map_string_array_string_
+ complex_row_
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`array_int_` ARRAY<INT>,`array_string_` ARRAY<STRING>,`map_int_string_` MAP<INT, STRING>,`map_string_array_string_` MAP<STRING, ARRAY<STRING>>,`complex_row_` ROW<`name` STRING, `length` INT>}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, [1, 1, 2, 3, 5, 8, 13], [one, one, two, three, five], {1 -> one, 2 -> two, 3 -> three}, {two -> [T, W, O], one -> [O, N, E], three -> [T, H, R, E, E]}, {name: STRING -> Alice, length: INT -> 5}], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, [1, 1, 2, 3, 5, 8, 13], [one, one, two, three, five], {1 -> one, 2 -> two, 3 -> three}, {two -> [T, W, O], one -> [O, N, E], three -> [T, H, R, E, E]}, {name: STRING -> Alice, length: INT -> 5}], after=[-1, [2, 3, 5, 7, 11, 13, 17, 19], [二, san, 五, qi, 十一], {1 -> yi, 2 -> er, 3 -> san}, {二 -> [E, R], 三 -> [S, A, N], 一 -> [Y, I]}, {name: STRING -> Derrida, length: INT -> 7}], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, [2, 3, 5, 7, 11, 13, 17, 19], [二, san, 五, qi, 十一], {1 -> yi, 2 -> er, 3 -> san}, {二 -> [E, R], 三 -> [S, A, N], 一 -> [Y, I]}, {name: STRING -> Derrida, length: INT -> 7}], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Integer Array Subscripting
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ array_int_
+ array_int_[4] AS sc_int_array
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`array_int_` ARRAY<INT>,`sc_int_array` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, [1, 1, 2, 3, 5, 8, 13], 3], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, [1, 1, 2, 3, 5, 8, 13], 3], after=[-1, [2, 3, 5, 7, 11, 13, 17, 19], 7], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, [2, 3, 5, 7, 11, 13, 17, 19], 7], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: String Array Subscripting
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ array_string_
+ array_string_[4] AS sc_str_array
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`array_string_` ARRAY<STRING>,`sc_str_array` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, [one, one, two, three, five], three], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, [one, one, two, three, five], three], after=[-1, [二, san, 五, qi, 十一], qi], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, [二, san, 五, qi, 十一], qi], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Array OOB Subscripting
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ array_string_[0] AS negative_overflow
+ array_string_[10000] AS positive_overflow
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`negative_overflow` STRING,`positive_overflow` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, null], after=[-1, null, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Array Subscripting With Sub Expression
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ array_int_[1 + 1] AS int_key
+ array_string_[array_int_[1 + 1]] AS str_key
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`int_key` INT,`str_key` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1, one], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1, one], after=[-1, 3, 五], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 3, 五], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Filter by Array-related Expression
+ ignore: FLINK-38888
+ projection: id_, array_string_
+ filter: array_string_[3] = '五'
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`array_string_` ARRAY<STRING>}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, [one, one, two, three, five]], after=[-1, [二, san, 五, qi, 十一]], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, [二, san, 五, qi, 十一]], after=[], op=DELETE, meta=()}
+- do: Map Subscripting
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ map_int_string_
+ map_int_string_[2] AS map_value
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`map_int_string_` MAP<INT, STRING>,`map_value` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, {1 -> one, 2 -> two, 3 -> three}, two], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, {1 -> one, 2 -> two, 3 -> three}, two], after=[-1, {1 -> yi, 2 -> er, 3 -> san}, er], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, {1 -> yi, 2 -> er, 3 -> san}, er], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Map Subscripting with absent key
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ map_int_string_[233] AS map_value
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`map_value` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null], after=[-1, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null], after=[], op=DELETE, meta=()}
+- do: Map Subscripting with complex expression
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ map_int_string_[1 + 2] AS map_value
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`map_value` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, three], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, three], after=[-1, san], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, san], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null], after=[], op=DELETE, meta=()}
+- do: Map Subscripting with nested expressions
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ map_string_array_string_[lower('ONE')] AS index_1
+ map_string_array_string_['o' || 'n' || 'e'][1] AS index_2
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`index_1` ARRAY<STRING>,`index_2` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, [O, N, E], O], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, [O, N, E], O], after=[-1, null, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Map Subscripting With Absent Object
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ map_string_array_string_['foo'] AS index_1
+ map_string_array_string_['bar'][1] AS index_2
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`index_1` ARRAY<STRING>,`index_2` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, null, null], after=[-1, null, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, null, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Filter by Map-related Expression
+ ignore: FLINK-38888
+ projection: id_, map_int_string_
+ filter: map_int_string_[1] = 'one'
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`map_int_string_` MAP<INT, STRING>}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, {1 -> one, 2 -> two, 3 -> three}], op=INSERT, meta=()}
+- do: Record Subscripting With Index
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ complex_row_
+ complex_row_[1] AS name
+ complex_row_[2] AS length
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`complex_row_` ROW<`name` STRING, `length` INT>,`name` STRING,`length` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, {name: STRING -> Alice, length: INT -> 5}, Alice, 5], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, {name: STRING -> Alice, length: INT -> 5}, Alice, 5], after=[-1, {name: STRING -> Derrida, length: INT -> 7}, Derrida, 7], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, {name: STRING -> Derrida, length: INT -> 7}, Derrida, 7], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null], after=[], op=DELETE, meta=()}
+- do: Record Subscripting With Invalid Index
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ complex_row_
+ complex_row_[0] AS bad_key
+ primary-key: id_
+ expect-error: 'Cannot infer type of field at position 0 within ROW type: RecordType(VARCHAR(65536) name, INTEGER length)'
+- do: Record Subscripting With Computed Index (Illegal, type must be statically determined)
+ ignore: FLINK-38888
+ projection: |-
+ id_
+ complex_row_
+ complex_row_[1 + 1] AS bad_key
+ primary-key: id_
+ expect-error: 'Cannot infer type of field at position null within ROW type: RecordType(VARCHAR(65536) name, INTEGER length)'
+- do: Filter by Record-related Expression
+ ignore: FLINK-38888
+ projection: id_, complex_row_
+ filter: complex_row_[1] = 'Derrida'
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`complex_row_` ROW<`name` STRING, `length` INT>}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, {name: STRING -> Alice, length: INT -> 5}], after=[-1, {name: STRING -> Derrida, length: INT -> 7}], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, {name: STRING -> Derrida, length: INT -> 7}], after=[], op=DELETE, meta=()}
diff --git a/flink-cdc-composer/src/test/resources/specs/string.yaml b/flink-cdc-composer/src/test/resources/specs/string.yaml
new file mode 100644
index 000000000..9069005f4
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/string.yaml
@@ -0,0 +1,149 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: String Concat Operator
+ projection: id_, string_, '<<' || string_ || '>>' AS quoted
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`quoted` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, <<From A to Z is Lie>>], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, <<From A to Z is Lie>>], after=[-1, 天地玄黄宇宙洪荒, <<天地玄黄宇宙洪荒>>], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, <<天地玄黄宇宙洪荒>>], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, <<null>>], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, <<null>>], after=[], op=DELETE, meta=()}
+- do: Char Length
+ non-null: 'true'
+ projection: id_, CHAR_LENGTH('QWERTYUIOPASDFGHJKLZXCVBNM') AS twenty_six, string_, CHAR_LENGTH(string_) AS strlen
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`twenty_six` INT,`string_` STRING,`strlen` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 26, From A to Z is Lie, 18], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 26, From A to Z is Lie, 18], after=[-1, 26, 天地玄黄宇宙洪荒, 8], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 26, 天地玄黄宇宙洪荒, 8], after=[], op=DELETE, meta=()}
+- do: Upper Case
+ non-null: 'true'
+ projection: id_, string_, UPPER('AbCdEfGhIjKlMnOpQrStUvWxYz') AS ascii_uppercase, UPPER(string_) AS upper_
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`ascii_uppercase` STRING,`upper_` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, ABCDEFGHIJKLMNOPQRSTUVWXYZ, FROM A TO Z IS LIE], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, ABCDEFGHIJKLMNOPQRSTUVWXYZ, FROM A TO Z IS LIE], after=[-1, 天地玄黄宇宙洪荒, ABCDEFGHIJKLMNOPQRSTUVWXYZ, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, ABCDEFGHIJKLMNOPQRSTUVWXYZ, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+- do: Lower Case
+ non-null: 'true'
+ projection: id_, string_, LOWER('AbCdEfGhIjKlMnOpQrStUvWxYz') AS ascii_lowercase, LOWER(string_) AS lower_
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`ascii_lowercase` STRING,`lower_` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, abcdefghijklmnopqrstuvwxyz, from a to z is lie], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, abcdefghijklmnopqrstuvwxyz, from a to z is lie], after=[-1, 天地玄黄宇宙洪荒, abcdefghijklmnopqrstuvwxyz, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, abcdefghijklmnopqrstuvwxyz, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+- do: Char Length (With NULL)
+ ignore: FLINK-38905
+ projection: id_, CHAR_LENGTH('QWERTYUIOPASDFGHJKLZXCVBNM') AS twenty_six, string_, CHAR_LENGTH(string_) AS strlen
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`twenty_six` INT,`string_` STRING,`strlen` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 26, From A to Z is Lie, 18], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 26, From A to Z is Lie, 18], after=[-1, 26, 天地玄黄宇宙洪荒, 8], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 26, 天地玄黄宇宙洪荒, 8], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, 26, null, 0], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, 26, null, 0], after=[], op=DELETE, meta=()}
+- do: Upper Case (With NULL)
+ ignore: FLINK-38905
+ projection: id_, string_, UPPER('AbCdEfGhIjKlMnOpQrStUvWxYz') AS ascii_uppercase, UPPER(string_) AS upper_
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`ascii_uppercase` STRING,`upper_` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, ABCDEFGHIJKLMNOPQRSTUVWXYZ, FROM A TO Z IS LIE], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, ABCDEFGHIJKLMNOPQRSTUVWXYZ, FROM A TO Z IS LIE], after=[-1, 天地玄黄宇宙洪荒, ABCDEFGHIJKLMNOPQRSTUVWXYZ, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, ABCDEFGHIJKLMNOPQRSTUVWXYZ, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, ABCDEFGHIJKLMNOPQRSTUVWXYZ, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, ABCDEFGHIJKLMNOPQRSTUVWXYZ, null], after=[], op=DELETE, meta=()}
+- do: Lower Case (With NULL)
+ ignore: FLINK-38905
+ projection: id_, string_, LOWER('AbCdEfGhIjKlMnOpQrStUvWxYz') AS ascii_lowercase, LOWER(string_) AS lower_
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`ascii_lowercase` STRING,`lower_` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, abcdefghijklmnopqrstuvwxyz, from a to z is lie], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, abcdefghijklmnopqrstuvwxyz, from a to z is lie], after=[-1, 天地玄黄宇宙洪荒, abcdefghijklmnopqrstuvwxyz, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, abcdefghijklmnopqrstuvwxyz, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, abcdefghijklmnopqrstuvwxyz, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, abcdefghijklmnopqrstuvwxyz, null], after=[], op=DELETE, meta=()}
+- do: Trim String
+ non-null: 'true'
+ projection: id_, string_, TRIM(string_) AS trimmed_, TRIM(' Alice') AS trim_left, TRIM('Bob ') AS trim_right, TRIM(' Derrida ') AS trim_both
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`trimmed_` STRING,`trim_left` STRING,`trim_right` STRING,`trim_both` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, From A to Z is Lie, Alice, Bob, Derrida], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, From A to Z is Lie, Alice, Bob, Derrida], after=[-1, 天地玄黄宇宙洪荒, 天地玄黄宇宙洪荒, Alice, Bob, Derrida], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, 天地玄黄宇宙洪荒, Alice, Bob, Derrida], after=[], op=DELETE, meta=()}
+- do: Trim String (With NULL)
+ ignore: FLINK-38905
+ projection: id_, string_, TRIM(string_) AS trimmed_, TRIM(' Alice') AS trim_left, TRIM('Bob ') AS trim_right, TRIM(' Derrida ') AS trim_both
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`trimmed_` STRING,`trim_left` STRING,`trim_right` STRING,`trim_both` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, From A to Z is Lie, Alice, Bob, Derrida], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, From A to Z is Lie, Alice, Bob, Derrida], after=[-1, 天地玄黄宇宙洪荒, 天地玄黄宇宙洪荒, Alice, Bob, Derrida], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, 天地玄黄宇宙洪荒, Alice, Bob, Derrida], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, Alice, Bob, Derrida], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, Alice, Bob, Derrida], after=[], op=DELETE, meta=()}
+- do: RegExp Replace
+ projection: id_, string_, REGEXP_REPLACE(string_, '[aeiouAEIOU]', '*') AS censored
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`censored` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, Fr*m * t* Z *s L**], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, Fr*m * t* Z *s L**], after=[-1, 天地玄黄宇宙洪荒, 天地玄黄宇宙洪荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, 天地玄黄宇宙洪荒], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null], after=[], op=DELETE, meta=()}
+- do: Substring
+ non-null: 'true'
+ projection: id_, string_, SUBSTRING(string_ FROM 1 FOR 3) AS one_two_three, SUBSTRING(string_ FROM 8) AS since_eight
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`one_two_three` STRING,`since_eight` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, Fro, to Z is Lie], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, Fro, to Z is Lie], after=[-1, 天地玄黄宇宙洪荒, 天地玄, 荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, 天地玄, 荒], after=[], op=DELETE, meta=()}
+- do: Substring (With NULL)
+ ignore: FLINK-38905
+ projection: id_, string_, SUBSTRING(string_ FROM 1 FOR 3) AS one_two_three, SUBSTRING(string_ FROM 8) AS since_eight
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`one_two_three` STRING,`since_eight` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, Fro, to Z is Lie], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, Fro, to Z is Lie], after=[-1, 天地玄黄宇宙洪荒, 天地玄, 荒], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, 天地玄, 荒], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null], after=[], op=DELETE, meta=()}
+- do: Substring with Index OOB
+ projection: id_, string_, SUBSTRING(string_ FROM 1 FOR -1) AS oob
+ primary-key: id_
+ expect-error: 'java.lang.RuntimeException: length of ''substring(str, beginIndex, length)'' must be >= 0 and Int type, but length = -1'
+- do: String Concat Function
+ projection: id_, string_, CONCAT('{{', string_, '}}') AS braced
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`string_` STRING,`braced` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, From A to Z is Lie, {{From A to Z is Lie}}], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, From A to Z is Lie, {{From A to Z is Lie}}], after=[-1, 天地玄黄宇宙洪荒, {{天地玄黄宇宙洪荒}}], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 天地玄黄宇宙洪荒, {{天地玄黄宇宙洪荒}}], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, {{null}}], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, {{null}}], after=[], op=DELETE, meta=()}
diff --git a/flink-cdc-composer/src/test/resources/specs/temporal.yaml b/flink-cdc-composer/src/test/resources/specs/temporal.yaml
new file mode 100644
index 000000000..3e485e659
--- /dev/null
+++ b/flink-cdc-composer/src/test/resources/specs/temporal.yaml
@@ -0,0 +1,290 @@
+################################################################################
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+- do: Date Format Function (UTC)
+ projection: |-
+ id_
+ DATE_FORMAT(timestamp_0_, 'yyyy~MM~dd') AS comp_1
+ DATE_FORMAT(timestamp_6_, 'yyyy~MM~dd') AS comp_2
+ DATE_FORMAT(timestamp_9_, 'yyyy~MM~dd') AS comp_3
+ DATE_FORMAT(timestamp_ltz_0_, 'yyyy~MM~dd') AS comp_4
+ DATE_FORMAT(timestamp_ltz_6_, 'yyyy~MM~dd') AS comp_5
+ DATE_FORMAT(timestamp_ltz_9_, 'yyyy~MM~dd') AS comp_6
+ DATE_FORMAT(timestamp_0_, 'yyyy->MM->dd HH->mm->ss') AS comp_7
+ DATE_FORMAT(timestamp_6_, 'yyyy->MM->dd HH->mm->ss') AS comp_8
+ DATE_FORMAT(timestamp_9_, 'yyyy->MM->dd HH->mm->ss') AS comp_9
+ DATE_FORMAT(timestamp_ltz_0_, 'yyyy->MM->dd HH->mm->ss') AS comp_10
+ DATE_FORMAT(timestamp_ltz_6_, 'yyyy->MM->dd HH->mm->ss') AS comp_11
+ DATE_FORMAT(timestamp_ltz_9_, 'yyyy->MM->dd HH->mm->ss') AS comp_12
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` STRING,`comp_2` STRING,`comp_3` STRING,`comp_4` STRING,`comp_5` STRING,`comp_6` STRING,`comp_7` STRING,`comp_8` STRING,`comp_9` STRING,`comp_10` STRING,`comp_11` STRING,`comp_12` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1970~01~02, 1970~01~03, 1970~01~05, 1970~01~02, 1970~01~03, 1970~01~05, 1970->01->02 10->17->36, 1970->01->03 17->09->27, 1970->01->05 00->01->18, 1970->01->02 10->17->36, 1970->01->03 17->09->27, 1970->01->05 00->01->18], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1970~01~02, 1970~01~03, 1970~01~05, 1970~01~02, 1970~01~03, 1970~01~05, 1970->01->02 10->17->36, 1970->01->03 17->09->27, 1970->01->05 00->01->18, 1970->01->02 10->17->36, 1970->01->03 17->09->27, 1970->01->05 00->01->18], after=[-1, 1970~01~09, 1970~01~10, 1970~01~11, 1970~01~09, 1970~01~10, 1970~01~11, 1970->01->09 08->57->36, 1970->01->10 15->49->27, 1970->01->11 22->41->18, 1970->01->09 08->57->36, 1970->01->10 15->49->27, 1970->01- [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 1970~01~09, 1970~01~10, 1970~01~11, 1970~01~09, 1970~01~10, 1970~01~11, 1970->01->09 08->57->36, 1970->01->10 15->49->27, 1970->01->11 22->41->18, 1970->01->09 08->57->36, 1970->01->10 15->49->27, 1970->01->11 22->41->18], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Date Format Function (Asia/Shanghai)
+ projection: |-
+ id_
+ DATE_FORMAT(timestamp_0_, 'yyyy~MM~dd') AS comp_1
+ DATE_FORMAT(timestamp_6_, 'yyyy~MM~dd') AS comp_2
+ DATE_FORMAT(timestamp_9_, 'yyyy~MM~dd') AS comp_3
+ DATE_FORMAT(timestamp_ltz_0_, 'yyyy~MM~dd') AS comp_4
+ DATE_FORMAT(timestamp_ltz_6_, 'yyyy~MM~dd') AS comp_5
+ DATE_FORMAT(timestamp_ltz_9_, 'yyyy~MM~dd') AS comp_6
+ DATE_FORMAT(timestamp_0_, 'yyyy->MM->dd HH->mm->ss') AS comp_7
+ DATE_FORMAT(timestamp_6_, 'yyyy->MM->dd HH->mm->ss') AS comp_8
+ DATE_FORMAT(timestamp_9_, 'yyyy->MM->dd HH->mm->ss') AS comp_9
+ DATE_FORMAT(timestamp_ltz_0_, 'yyyy->MM->dd HH->mm->ss') AS comp_10
+ DATE_FORMAT(timestamp_ltz_6_, 'yyyy->MM->dd HH->mm->ss') AS comp_11
+ DATE_FORMAT(timestamp_ltz_9_, 'yyyy->MM->dd HH->mm->ss') AS comp_12
+ primary-key: id_
+ time-zone: Asia/Shanghai
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` STRING,`comp_2` STRING,`comp_3` STRING,`comp_4` STRING,`comp_5` STRING,`comp_6` STRING,`comp_7` STRING,`comp_8` STRING,`comp_9` STRING,`comp_10` STRING,`comp_11` STRING,`comp_12` STRING}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 1970~01~02, 1970~01~03, 1970~01~05, 1970~01~02, 1970~01~04, 1970~01~05, 1970->01->02 10->17->36, 1970->01->03 17->09->27, 1970->01->05 00->01->18, 1970->01->02 18->17->36, 1970->01->04 01->09->27, 1970->01->05 08->01->18], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 1970~01~02, 1970~01~03, 1970~01~05, 1970~01~02, 1970~01~04, 1970~01~05, 1970->01->02 10->17->36, 1970->01->03 17->09->27, 1970->01->05 00->01->18, 1970->01->02 18->17->36, 1970->01->04 01->09->27, 1970->01->05 08->01->18], after=[-1, 1970~01~09, 1970~01~10, 1970~01~11, 1970~01~09, 1970~01~10, 1970~01~12, 1970->01->09 08->57->36, 1970->01->10 15->49->27, 1970->01->11 22->41->18, 1970->01->09 16->57->36, 1970->01->10 23->49->27, 1970->01- [...]
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 1970~01~09, 1970~01~10, 1970~01~11, 1970~01~09, 1970~01~10, 1970~01~12, 1970->01->09 08->57->36, 1970->01->10 15->49->27, 1970->01->11 22->41->18, 1970->01->09 16->57->36, 1970->01->10 23->49->27, 1970->01->12 06->41->18], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Timestamp Diff Function
+ projection: |-
+ id_
+ TIMESTAMP_DIFF('SECOND', timestamp_0_, timestamp_0_) AS comp_1
+ TIMESTAMP_DIFF('MINUTE', timestamp_6_, timestamp_0_) AS comp_2
+ TIMESTAMP_DIFF('HOUR', timestamp_9_, timestamp_0_) AS comp_3
+ TIMESTAMP_DIFF('DAY', timestamp_ltz_0_, timestamp_ltz_0_) AS comp_4
+ TIMESTAMP_DIFF('MONTH', timestamp_ltz_6_, timestamp_ltz_0_) AS comp_5
+ TIMESTAMP_DIFF('YEAR', timestamp_ltz_9_, timestamp_ltz_0_) AS comp_6
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` INT,`comp_2` INT,`comp_3` INT,`comp_4` INT,`comp_5` INT,`comp_6` INT}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 0, -1851, -61, 0, 0, 0], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 0, -1851, -61, 0, 0, 0], after=[-1, 0, -1851, -61, 0, 0, 0], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 0, -1851, -61, 0, 0, 0], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: To Date Function
+ ignore: FLINK-38906
+ projection: |-
+ id_
+ TO_DATE('2025-01-05') AS comp_1
+ TO_DATE('9999-12-31') AS comp_2
+ TO_DATE('2024//02//14', 'yyyy//MM//dd') AS comp_3
+ TO_DATE('2024 !! 02 !! 14', 'yyyy//MM//dd') AS comp_4
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` DATE,`comp_2` DATE,`comp_3` DATE,`comp_4` DATE}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2025-01-05, 9999-12-31, 2024-02-14, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2025-01-05, 9999-12-31, 2024-02-14, null], after=[-1, 2025-01-05, 9999-12-31, 2024-02-14, null], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 2025-01-05, 9999-12-31, 2024-02-14, null], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, 2025-01-05, 9999-12-31, 2024-02-14, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, 2025-01-05, 9999-12-31, 2024-02-14, null], after=[], op=DELETE, meta=()}
+- do: To Timestamp Function
+ projection: |-
+ id_
+ TO_TIMESTAMP('2025-01-05 19:59:59') AS comp_1
+ TO_TIMESTAMP('2024//02//14 23//44//17', 'yyyy//MM//dd HH//mm//ss') AS comp_2
+ primary-key: id_
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`comp_1` TIMESTAMP(3),`comp_2` TIMESTAMP(3)}, primaryKeys=id_, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2025-01-05T19:59:59, 2024-02-14T23:44:17], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2025-01-05T19:59:59, 2024-02-14T23:44:17], after=[-1, 2025-01-05T19:59:59, 2024-02-14T23:44:17], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 2025-01-05T19:59:59, 2024-02-14T23:44:17], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, 2025-01-05T19:59:59, 2024-02-14T23:44:17], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, 2025-01-05T19:59:59, 2024-02-14T23:44:17], after=[], op=DELETE, meta=()}
+- do: To Timestamp Function Failure (1)
+ projection: |-
+ id_
+ TO_TIMESTAMP('2024 !! 02 !! 14', 'yyyy//MM//dd') AS comp
+ expect-error: 'Unparseable date: "2024 !! 02 !! 14"'
+- do: To Timestamp Function Failure (2)
+ projection: |-
+ id_
+ TO_TIMESTAMP('2024 !! 02 !! 14 11 !! 45 !! 49', 'yyyy//MM//dd') AS comp
+ expect-error: 'Unparseable date: "2024 !! 02 !! 14 11 !! 45 !! 49"'
+- do: Format DateType and TimeType
+ ignore: FLINK-38906
+ projection: |-
+ id_, date_, time_0_, time_6_
+ DATE_FORMAT(date_, 'yyyy->MM->dd') AS date_fmt_1
+ DATE_FORMAT(date_, 'yyyy//MM//dd') AS date_fmt_2
+ DATE_FORMAT(time_0_, 'HH::mm::ss.SSS') AS time_fmt_1
+ DATE_FORMAT(time_0_, 'HHmmssSSS') AS time_fmt_2
+ DATE_FORMAT(time_6_, 'HH::mm::ss.SSS') AS time_fmt_3
+ DATE_FORMAT(time_6_, 'HHmmssSSS') AS time_fmt_4
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`id_` BIGINT NOT NULL 'Identifier',`date_` DATE,`time_0_` TIME(0),`time_6_` TIME(6),`date_fmt_1` STRING,`date_fmt_2` STRING,`time_fmt_1` STRING,`time_fmt_2` STRING,`time_fmt_3` STRING,`time_fmt_4` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1, 2000-12-31, 19:43:17, 21:45:03, 2000->12->31, 2000//12//31, 19::43::17.000, 194317000, 21::45::03.000, 214503000], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1, 2000-12-31, 19:43:17, 21:45:03, 2000->12->31, 2000//12//31, 19::43::17.000, 194317000, 21::45::03.000, 214503000], after=[-1, 2001-01-01, 12:34:45, 23:45:07, 2001->01->01, 2001//01//01, 12::34::45.000, 123445000, 23::45::07.000, 234507000], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[-1, 2001-01-01, 12:34:45, 23:45:07, 2001->01->01, 2001//01//01, 12::34::45.000, 123445000, 23::45::07.000, 234507000], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[0, null, null, null, null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[0, null, null, null, null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: From UnixTime Function
+ ignore: FLINK-38906
+ projection: |-
+ FROM_UNIXTIME(bigint_) AS col_1
+ FROM_UNIXTIME(bigint_, 'yyyy/MM/dd HH;mm;ss') AS col_2
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-01 00:00:05, 1970/01/01 00;00;05], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-01 00:00:05, 1970/01/01 00;00;05], after=[1969-12-31 23:59:55, 1969/12/31 23;59;55], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1969-12-31 23:59:55, 1969/12/31 23;59;55], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null], after=[], op=DELETE, meta=()}
+- do: From UnixTime Function with Implicit Conversion
+ ignore: FLINK-38906
+ projection: |-
+ FROM_UNIXTIME(int_) AS col_1
+ FROM_UNIXTIME(int_, 'yyyy/MM/dd HH;mm;ss') AS col_2
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-01 00:00:04, 1970/01/01 00;00;04], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-01 00:00:04, 1970/01/01 00;00;04], after=[1969-12-31 23:59:56, 1969/12/31 23;59;56], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1969-12-31 23:59:56, 1969/12/31 23;59;56], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null], after=[], op=DELETE, meta=()}
+- do: To Timestamp LTZ Function
+ ignore: FLINK-38906
+ projection: |-
+ TO_TIMESTAMP_LTZ(bigint_) AS col_1
+ TO_TIMESTAMP_LTZ(bigint_, 0) AS col_2
+ TO_TIMESTAMP_LTZ(bigint_, 3) AS col_3
+ TO_TIMESTAMP_LTZ('1999-12-31 23:50:23.456') AS col_4
+ TO_TIMESTAMP_LTZ('2000:03:29 19-21-48~321', 'yyyy:MM:dd HH-mm-ss~SSS') AS col_5
+ TO_TIMESTAMP_LTZ('2001-11-23 10:48:25.999', 'yyyy-MM-dd HH:mm:ss.SSS', 'Asia/Shanghai') AS col_6
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` TIMESTAMP_LTZ(3),`col_2` TIMESTAMP_LTZ(3),`col_3` TIMESTAMP_LTZ(3),`col_4` TIMESTAMP_LTZ(3),`col_5` TIMESTAMP_LTZ(3),`col_6` TIMESTAMP_LTZ(3)}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-01T00:00:00.005, 1970-01-01T00:00:05, 1970-01-01T00:00:00.005, 1999-12-31T23:50:23.456, 2000-03-29T19:21:48.321, 2001-11-23T02:48:25.999], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-01T00:00:00.005, 1970-01-01T00:00:05, 1970-01-01T00:00:00.005, 1999-12-31T23:50:23.456, 2000-03-29T19:21:48.321, 2001-11-23T02:48:25.999], after=[1969-12-31T23:59:59.995, 1969-12-31T23:59:55, 1969-12-31T23:59:59.995, 1999-12-31T23:50:23.456, 2000-03-29T19:21:48.321, 2001-11-23T02:48:25.999], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1969-12-31T23:59:59.995, 1969-12-31T23:59:55, 1969-12-31T23:59:59.995, 1999-12-31T23:50:23.456, 2000-03-29T19:21:48.321, 2001-11-23T02:48:25.999], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, 1999-12-31T23:50:23.456, 2000-03-29T19:21:48.321, 2001-11-23T02:48:25.999], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, 1999-12-31T23:50:23.456, 2000-03-29T19:21:48.321, 2001-11-23T02:48:25.999], after=[], op=DELETE, meta=()}
+- do: Formatting TIMESTAMP(0) with Timezone
+ ignore: FLINK-38906
+ projection: |-
+ DATE_FORMAT_TZ(timestamp_0_, 'Asia/Shanghai') AS col_1
+ DATE_FORMAT_TZ(timestamp_0_, 'America/Los_Angeles') AS col_2
+ DATE_FORMAT_TZ(timestamp_0_, 'UTC') AS col_3
+ DATE_FORMAT_TZ(timestamp_0_, 'yyyy::MM::dd HH-mm-ss', 'Asia/Shanghai') AS col_4
+ DATE_FORMAT_TZ(timestamp_0_, 'yyyy::MM::dd HH-mm-ss', 'America/Los_Angeles') AS col_5
+ DATE_FORMAT_TZ(timestamp_0_, 'yyyy::MM::dd HH-mm-ss', 'UTC') AS col_6
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING,`col_3` STRING,`col_4` STRING,`col_5` STRING,`col_6` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-02 10:17:36, 1970-01-02 10:17:36, 1970-01-02 10:17:36, 1970::01::02 10-17-36, 1970::01::02 10-17-36, 1970::01::02 10-17-36], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-02 10:17:36, 1970-01-02 10:17:36, 1970-01-02 10:17:36, 1970::01::02 10-17-36, 1970::01::02 10-17-36, 1970::01::02 10-17-36], after=[1970-01-09 08:57:36, 1970-01-09 08:57:36, 1970-01-09 08:57:36, 1970::01::09 08-57-36, 1970::01::09 08-57-36, 1970::01::09 08-57-36], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-09 08:57:36, 1970-01-09 08:57:36, 1970-01-09 08:57:36, 1970::01::09 08-57-36, 1970::01::09 08-57-36, 1970::01::09 08-57-36], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Formatting TIMESTAMP(6) with Timezone
+ ignore: FLINK-38906
+ projection: |-
+ DATE_FORMAT_TZ(timestamp_6_, 'Asia/Shanghai') AS col_1
+ DATE_FORMAT_TZ(timestamp_6_, 'America/Los_Angeles') AS col_2
+ DATE_FORMAT_TZ(timestamp_6_, 'UTC') AS col_3
+ DATE_FORMAT_TZ(timestamp_6_, 'yyyy::MM::dd HH-mm-ss.SSSSSS', 'Asia/Shanghai') AS col_4
+ DATE_FORMAT_TZ(timestamp_6_, 'yyyy::MM::dd HH-mm-ss.SSSSSS', 'America/Los_Angeles') AS col_5
+ DATE_FORMAT_TZ(timestamp_6_, 'yyyy::MM::dd HH-mm-ss.SSSSSS', 'UTC') AS col_6
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING,`col_3` STRING,`col_4` STRING,`col_5` STRING,`col_6` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-03 17:09:27, 1970-01-03 17:09:27, 1970-01-03 17:09:27, 1970::01::03 17-09-27.891234, 1970::01::03 17-09-27.891234, 1970::01::03 17-09-27.891234], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-03 17:09:27, 1970-01-03 17:09:27, 1970-01-03 17:09:27, 1970::01::03 17-09-27.891234, 1970::01::03 17-09-27.891234, 1970::01::03 17-09-27.891234], after=[1970-01-10 15:49:27, 1970-01-10 15:49:27, 1970-01-10 15:49:27, 1970::01::10 15-49-27.891834, 1970::01::10 15-49-27.891834, 1970::01::10 15-49-27.891834], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-10 15:49:27, 1970-01-10 15:49:27, 1970-01-10 15:49:27, 1970::01::10 15-49-27.891834, 1970::01::10 15-49-27.891834, 1970::01::10 15-49-27.891834], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Formatting TIMESTAMP(9) with Timezone
+ ignore: FLINK-38906
+ projection: |-
+ DATE_FORMAT_TZ(timestamp_9_, 'Asia/Shanghai') AS col_1
+ DATE_FORMAT_TZ(timestamp_9_, 'America/Los_Angeles') AS col_2
+ DATE_FORMAT_TZ(timestamp_9_, 'UTC') AS col_3
+ DATE_FORMAT_TZ(timestamp_9_, 'yyyy::MM::dd HH-mm-ss.SSSSSSSSS', 'Asia/Shanghai') AS col_4
+ DATE_FORMAT_TZ(timestamp_9_, 'yyyy::MM::dd HH-mm-ss.SSSSSSSSS', 'America/Los_Angeles') AS col_5
+ DATE_FORMAT_TZ(timestamp_9_, 'yyyy::MM::dd HH-mm-ss.SSSSSSSSS', 'UTC') AS col_6
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING,`col_3` STRING,`col_4` STRING,`col_5` STRING,`col_6` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-05 00:01:18, 1970-01-05 00:01:18, 1970-01-05 00:01:18, 1970::01::05 00-01-18.912345612, 1970::01::05 00-01-18.912345612, 1970::01::05 00-01-18.912345612], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-05 00:01:18, 1970-01-05 00:01:18, 1970-01-05 00:01:18, 1970::01::05 00-01-18.912345612, 1970::01::05 00-01-18.912345612, 1970::01::05 00-01-18.912345612], after=[1970-01-11 22:41:18, 1970-01-11 22:41:18, 1970-01-11 22:41:18, 1970::01::11 22-41-18.912945612, 1970::01::11 22-41-18.912945612, 1970::01::11 22-41-18.912945612], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-11 22:41:18, 1970-01-11 22:41:18, 1970-01-11 22:41:18, 1970::01::11 22-41-18.912945612, 1970::01::11 22-41-18.912945612, 1970::01::11 22-41-18.912945612], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Formatting TIMESTAMP_LTZ(0) with Timezone
+ ignore: FLINK-38906
+ projection: |-
+ DATE_FORMAT_TZ(timestamp_ltz_0_, 'Asia/Shanghai') AS col_1
+ DATE_FORMAT_TZ(timestamp_ltz_0_, 'America/Los_Angeles') AS col_2
+ DATE_FORMAT_TZ(timestamp_ltz_0_, 'UTC') AS col_3
+ DATE_FORMAT_TZ(timestamp_ltz_0_, 'yyyy::MM::dd HH-mm-ss', 'Asia/Shanghai') AS col_4
+ DATE_FORMAT_TZ(timestamp_ltz_0_, 'yyyy::MM::dd HH-mm-ss', 'America/Los_Angeles') AS col_5
+ DATE_FORMAT_TZ(timestamp_ltz_0_, 'yyyy::MM::dd HH-mm-ss', 'UTC') AS col_6
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING,`col_3` STRING,`col_4` STRING,`col_5` STRING,`col_6` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-02 18:17:36, 1970-01-02 02:17:36, 1970-01-02 10:17:36, 1970::01::02 18-17-36, 1970::01::02 02-17-36, 1970::01::02 10-17-36], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-02 18:17:36, 1970-01-02 02:17:36, 1970-01-02 10:17:36, 1970::01::02 18-17-36, 1970::01::02 02-17-36, 1970::01::02 10-17-36], after=[1970-01-09 16:57:36, 1970-01-09 00:57:36, 1970-01-09 08:57:36, 1970::01::09 16-57-36, 1970::01::09 00-57-36, 1970::01::09 08-57-36], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-09 16:57:36, 1970-01-09 00:57:36, 1970-01-09 08:57:36, 1970::01::09 16-57-36, 1970::01::09 00-57-36, 1970::01::09 08-57-36], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Formatting TIMESTAMP_LTZ(6) with Timezone
+ ignore: FLINK-38906
+ projection: |-
+ DATE_FORMAT_TZ(timestamp_ltz_6_, 'Asia/Shanghai') AS col_1
+ DATE_FORMAT_TZ(timestamp_ltz_6_, 'America/Los_Angeles') AS col_2
+ DATE_FORMAT_TZ(timestamp_ltz_6_, 'UTC') AS col_3
+ DATE_FORMAT_TZ(timestamp_ltz_6_, 'yyyy::MM::dd HH-mm-ss.SSSSSS', 'Asia/Shanghai') AS col_4
+ DATE_FORMAT_TZ(timestamp_ltz_6_, 'yyyy::MM::dd HH-mm-ss.SSSSSS', 'America/Los_Angeles') AS col_5
+ DATE_FORMAT_TZ(timestamp_ltz_6_, 'yyyy::MM::dd HH-mm-ss.SSSSSS', 'UTC') AS col_6
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING,`col_3` STRING,`col_4` STRING,`col_5` STRING,`col_6` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-04 01:09:27, 1970-01-03 09:09:27, 1970-01-03 17:09:27, 1970::01::04 01-09-27.891234, 1970::01::03 09-09-27.891234, 1970::01::03 17-09-27.891234], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-04 01:09:27, 1970-01-03 09:09:27, 1970-01-03 17:09:27, 1970::01::04 01-09-27.891234, 1970::01::03 09-09-27.891234, 1970::01::03 17-09-27.891234], after=[1970-01-10 23:49:27, 1970-01-10 07:49:27, 1970-01-10 15:49:27, 1970::01::10 23-49-27.891834, 1970::01::10 07-49-27.891834, 1970::01::10 15-49-27.891834], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-10 23:49:27, 1970-01-10 07:49:27, 1970-01-10 15:49:27, 1970::01::10 23-49-27.891834, 1970::01::10 07-49-27.891834, 1970::01::10 15-49-27.891834], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: Formatting TIMESTAMP_LTZ(9) with Timezone
+ ignore: FLINK-38906
+ projection: |-
+ DATE_FORMAT_TZ(timestamp_ltz_9_, 'Asia/Shanghai') AS col_1
+ DATE_FORMAT_TZ(timestamp_ltz_9_, 'America/Los_Angeles') AS col_2
+ DATE_FORMAT_TZ(timestamp_ltz_9_, 'UTC') AS col_3
+ DATE_FORMAT_TZ(timestamp_ltz_9_, 'yyyy::MM::dd HH-mm-ss.SSSSSSSSS', 'Asia/Shanghai') AS col_4
+ DATE_FORMAT_TZ(timestamp_ltz_9_, 'yyyy::MM::dd HH-mm-ss.SSSSSSSSS', 'America/Los_Angeles') AS col_5
+ DATE_FORMAT_TZ(timestamp_ltz_9_, 'yyyy::MM::dd HH-mm-ss.SSSSSSSSS', 'UTC') AS col_6
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING,`col_3` STRING,`col_4` STRING,`col_5` STRING,`col_6` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-05 08:01:18, 1970-01-04 16:01:18, 1970-01-05 00:01:18, 1970::01::05 08-01-18.912345612, 1970::01::04 16-01-18.912345612, 1970::01::05 00-01-18.912345612], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-05 08:01:18, 1970-01-04 16:01:18, 1970-01-05 00:01:18, 1970::01::05 08-01-18.912345612, 1970::01::04 16-01-18.912345612, 1970::01::05 00-01-18.912345612], after=[1970-01-12 06:41:18, 1970-01-11 14:41:18, 1970-01-11 22:41:18, 1970::01::12 06-41-18.912945612, 1970::01::11 14-41-18.912945612, 1970::01::11 22-41-18.912945612], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-12 06:41:18, 1970-01-11 14:41:18, 1970-01-11 22:41:18, 1970::01::12 06-41-18.912945612, 1970::01::11 14-41-18.912945612, 1970::01::11 22-41-18.912945612], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, null, null, null], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, null, null, null], after=[], op=DELETE, meta=()}
+- do: DATE_ADD Function
+ ignore: FLINK-38906
+ projection: |-
+ DATE_ADD(timestamp_0_, 17) AS col_1
+ DATE_ADD(timestamp_6_, 17) AS col_2
+ DATE_ADD(timestamp_9_, 17) AS col_3
+ DATE_ADD(timestamp_ltz_0_, 17) AS col_4
+ DATE_ADD(timestamp_ltz_6_, 17) AS col_5
+ DATE_ADD(timestamp_ltz_9_, 17) AS col_6
+ DATE_ADD(date_, 17) AS col_7
+ DATE_ADD('2015-07-23', 17) AS col_8
+ DATE_ADD('2015-07-23 21:48:25', 17) AS col_9
+ expect: |-
+ CreateTableEvent{tableId=foo.bar.baz, schema=columns={`col_1` STRING,`col_2` STRING,`col_3` STRING,`col_4` STRING,`col_5` STRING,`col_6` STRING,`col_7` STRING,`col_8` STRING,`col_9` STRING}, primaryKeys=, options=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[1970-01-19, 1970-01-20, 1970-01-22, 1970-01-19, 1970-01-20, 1970-01-22, 2001-01-17, 2015-08-09, 2015-08-09], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-19, 1970-01-20, 1970-01-22, 1970-01-19, 1970-01-20, 1970-01-22, 2001-01-17, 2015-08-09, 2015-08-09], after=[1970-01-26, 1970-01-27, 1970-01-28, 1970-01-26, 1970-01-27, 1970-01-28, 2001-01-18, 2015-08-09, 2015-08-09], op=UPDATE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[1970-01-26, 1970-01-27, 1970-01-28, 1970-01-26, 1970-01-27, 1970-01-28, 2001-01-18, 2015-08-09, 2015-08-09], after=[], op=DELETE, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[], after=[null, null, null, null, null, null, null, 2015-08-09, 2015-08-09], op=INSERT, meta=()}
+ DataChangeEvent{tableId=foo.bar.baz, before=[null, null, null, null, null, null, null, 2015-08-09, 2015-08-09], after=[], op=DELETE, meta=()}