wuchong commented on a change in pull request #16549:
URL: https://github.com/apache/flink/pull/16549#discussion_r673648318



##########
File path: flink-end-to-end-tests/test-scripts/test_sql_client.sh
##########
@@ -157,60 +157,38 @@ ELASTICSEARCH_SQL_JAR=$(find "$SQL_JARS_DIR" | grep 
"elasticsearch$ELASTICSEARCH
 RESULT=$TEST_DATA_DIR/result
 SQL_CONF=$TEST_DATA_DIR/sql-client-session.conf

Review comment:
       rename the file to `INIT_SQL=$TEST_DATA_DIR/sql-client-init.sql` ?

##########
File path: flink-end-to-end-tests/test-scripts/kafka_sql_common.sh
##########
@@ -45,55 +45,17 @@ function get_kafka_json_source_schema {
     topicName="$1"
     tableName="$2"
     cat << EOF
-  - name: $tableName
-    type: source-table
-    update-mode: append
-    schema:
-      - name: rowtime
-        data-type: TIMESTAMP(3)
-        rowtime:
-          timestamps:
-            type: from-field
-            from: timestamp
-          watermarks:
-            type: periodic-bounded
-            delay: 2000
-      - name: user
-        data-type: STRING
-      - name: event
-        data-type: ROW<type STRING, message STRING>
-    connector:
-      type: kafka
-      version: "$KAFKA_SQL_VERSION"
-      topic: $topicName
-      startup-mode: earliest-offset
-      properties:
-        bootstrap.servers: localhost:9092
-    format:
-      type: json
-      json-schema: >
-        {
-          "type": "object",
-          "properties": {
-            "timestamp": {
-              "type": "string",
-              "format": "date-time"
-            },
-            "user": {
-              "type": ["string", "null"]
-            },
-            "event": {
-              "type": "object",
-              "properties": {
-                "type": {
-                  "type": "string"
-                },
-                "message": {
-                  "type": "string"
-                }
-              }
-            }
-          }
-        }
+    CREATE TABLE $tableName (
+      rowtime TIMESTAMP(3),
+      user STRING,
+      event ROW<type STRING, message STRING>
+      WATERMARK FOR rowtime AS rowtime + INTERVAL '2' SECOND

Review comment:
       Should be `rowtime - INTERVAL '2' SECOND`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to