twalthr commented on code in PR #29987:
URL: https://github.com/apache/flink/pull/29987#discussion_r4600557434
##########
flink-table/flink-table-planner/src/test/resources/restore-tests/stream-exec-match_1/match-order-by-event-time/plan/match-order-by-event-time.json:
##########
@@ -0,0 +1,592 @@
+{
+ "flinkVersion" : "2.5",
+ "nodes" : [ {
+ "id" : 12,
+ "type" : "stream-exec-table-source-scan_2",
+ "scanTableSource" : {
+ "table" : {
+ "identifier" :
"`default_catalog`.`default_database`.`MyEventTimeTable`",
+ "resolvedTable" : {
+ "schema" : {
+ "columns" : [ {
+ "name" : "ts",
+ "dataType" : "VARCHAR(2147483647)"
+ }, {
+ "name" : "price",
+ "dataType" : "INT"
+ }, {
+ "name" : "sequence_num",
+ "dataType" : "INT"
+ }, {
+ "name" : "rowtime",
+ "kind" : "COMPUTED",
+ "expression" : {
+ "rexNode" : {
+ "kind" : "CALL",
+ "internalName" : "$TO_TIMESTAMP$1",
+ "operands" : [ {
+ "kind" : "INPUT_REF",
+ "inputIndex" : 0,
+ "type" : "VARCHAR(2147483647)"
+ } ],
+ "type" : "TIMESTAMP(3)"
+ },
+ "serializableString" : "TO_TIMESTAMP(`ts`)"
+ }
+ }, {
+ "name" : "proctime",
+ "kind" : "COMPUTED",
+ "expression" : {
+ "rexNode" : {
+ "kind" : "CALL",
+ "internalName" : "$PROCTIME$1",
+ "type" : {
+ "type" : "TIMESTAMP_WITH_LOCAL_TIME_ZONE",
+ "nullable" : false,
+ "precision" : 3,
+ "kind" : "PROCTIME"
+ }
+ },
+ "serializableString" : "PROCTIME()"
+ }
+ } ],
+ "watermarkSpecs" : [ {
+ "rowtimeAttribute" : "rowtime",
+ "expression" : {
+ "rexNode" : {
+ "kind" : "CALL",
+ "syntax" : "SPECIAL",
+ "internalName" : "$-$1",
+ "operands" : [ {
+ "kind" : "INPUT_REF",
+ "inputIndex" : 3,
+ "type" : "TIMESTAMP(3)"
+ }, {
+ "kind" : "LITERAL",
+ "value" : "2000",
+ "type" : "INTERVAL SECOND(6) NOT NULL"
+ } ],
+ "type" : "TIMESTAMP(3)"
+ },
+ "serializableString" : "`rowtime` - INTERVAL '2' SECOND"
+ }
+ } ]
+ }
+ }
+ }
+ },
+ "outputType" : "ROW<`ts` VARCHAR(2147483647), `price` INT, `sequence_num`
INT>",
+ "description" : "TableSourceScan(table=[[default_catalog,
default_database, MyEventTimeTable]], fields=[ts, price, sequence_num])"
+ }, {
+ "id" : 13,
+ "type" : "stream-exec-calc_1",
+ "projection" : [ {
+ "kind" : "INPUT_REF",
+ "inputIndex" : 0,
+ "type" : "VARCHAR(2147483647)"
+ }, {
+ "kind" : "INPUT_REF",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "INPUT_REF",
+ "inputIndex" : 2,
+ "type" : "INT"
+ }, {
+ "kind" : "CALL",
+ "internalName" : "$TO_TIMESTAMP$1",
+ "operands" : [ {
+ "kind" : "INPUT_REF",
+ "inputIndex" : 0,
+ "type" : "VARCHAR(2147483647)"
+ } ],
+ "type" : "TIMESTAMP(3)"
+ }, {
+ "kind" : "CALL",
+ "internalName" : "$PROCTIME$1",
+ "type" : {
+ "type" : "TIMESTAMP_WITH_LOCAL_TIME_ZONE",
+ "nullable" : false,
+ "precision" : 3,
+ "kind" : "PROCTIME"
+ }
+ } ],
+ "condition" : null,
+ "inputProperties" : [ {
+ "requiredDistribution" : {
+ "type" : "UNKNOWN"
+ },
+ "damBehavior" : "PIPELINED",
+ "priority" : 0
+ } ],
+ "outputType" : {
+ "type" : "ROW",
+ "fields" : [ {
+ "name" : "ts",
+ "fieldType" : "VARCHAR(2147483647)"
+ }, {
+ "name" : "price",
+ "fieldType" : "INT"
+ }, {
+ "name" : "sequence_num",
+ "fieldType" : "INT"
+ }, {
+ "name" : "rowtime",
+ "fieldType" : "TIMESTAMP(3)"
+ }, {
+ "name" : "proctime",
+ "fieldType" : {
+ "type" : "TIMESTAMP_WITH_LOCAL_TIME_ZONE",
+ "nullable" : false,
+ "precision" : 3,
+ "kind" : "PROCTIME"
+ }
+ } ]
+ },
+ "description" : "Calc(select=[ts, price, sequence_num, TO_TIMESTAMP(ts) AS
rowtime, PROCTIME() AS proctime])"
+ }, {
+ "id" : 14,
+ "type" : "stream-exec-watermark-assigner_1",
+ "watermarkExpr" : {
+ "kind" : "CALL",
+ "syntax" : "SPECIAL",
+ "internalName" : "$-$1",
+ "operands" : [ {
+ "kind" : "INPUT_REF",
+ "inputIndex" : 3,
+ "type" : "TIMESTAMP(3)"
+ }, {
+ "kind" : "LITERAL",
+ "value" : "2000",
+ "type" : "INTERVAL SECOND(6) NOT NULL"
+ } ],
+ "type" : "TIMESTAMP(3)"
+ },
+ "rowtimeFieldIndex" : 3,
+ "inputProperties" : [ {
+ "requiredDistribution" : {
+ "type" : "UNKNOWN"
+ },
+ "damBehavior" : "PIPELINED",
+ "priority" : 0
+ } ],
+ "outputType" : {
+ "type" : "ROW",
+ "fields" : [ {
+ "name" : "ts",
+ "fieldType" : "VARCHAR(2147483647)"
+ }, {
+ "name" : "price",
+ "fieldType" : "INT"
+ }, {
+ "name" : "sequence_num",
+ "fieldType" : "INT"
+ }, {
+ "name" : "rowtime",
+ "fieldType" : {
+ "type" : "TIMESTAMP_WITHOUT_TIME_ZONE",
+ "precision" : 3,
+ "kind" : "ROWTIME"
+ }
+ }, {
+ "name" : "proctime",
+ "fieldType" : {
+ "type" : "TIMESTAMP_WITH_LOCAL_TIME_ZONE",
+ "nullable" : false,
+ "precision" : 3,
+ "kind" : "PROCTIME"
+ }
+ } ]
+ },
+ "description" : "WatermarkAssigner(rowtime=[rowtime], watermark=[(rowtime
- 2000:INTERVAL SECOND)])"
+ }, {
+ "id" : 15,
+ "type" : "stream-exec-exchange_1",
+ "inputProperties" : [ {
+ "requiredDistribution" : {
+ "type" : "SINGLETON"
+ },
+ "damBehavior" : "PIPELINED",
+ "priority" : 0
+ } ],
+ "outputType" : {
+ "type" : "ROW",
+ "fields" : [ {
+ "name" : "ts",
+ "fieldType" : "VARCHAR(2147483647)"
+ }, {
+ "name" : "price",
+ "fieldType" : "INT"
+ }, {
+ "name" : "sequence_num",
+ "fieldType" : "INT"
+ }, {
+ "name" : "rowtime",
+ "fieldType" : {
+ "type" : "TIMESTAMP_WITHOUT_TIME_ZONE",
+ "precision" : 3,
+ "kind" : "ROWTIME"
+ }
+ }, {
+ "name" : "proctime",
+ "fieldType" : {
+ "type" : "TIMESTAMP_WITH_LOCAL_TIME_ZONE",
+ "nullable" : false,
+ "precision" : 3,
+ "kind" : "PROCTIME"
+ }
+ } ]
+ },
+ "description" : "Exchange(distribution=[single])"
+ }, {
+ "id" : 16,
+ "type" : "stream-exec-match_1",
+ "matchSpec" : {
+ "pattern" : {
+ "kind" : "CALL",
+ "syntax" : "BINARY",
+ "sqlKind" : "PATTERN_CONCAT",
+ "operands" : [ {
+ "kind" : "CALL",
+ "syntax" : "SPECIAL",
+ "internalName" : "$PATTERN_QUANTIFIER$1",
+ "operands" : [ {
+ "kind" : "LITERAL",
+ "value" : "DOWN",
+ "type" : "CHAR(4) NOT NULL"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 2,
+ "type" : "INT NOT NULL"
+ }, {
+ "kind" : "LITERAL",
+ "value" : -1,
+ "type" : "INT NOT NULL"
+ }, {
+ "kind" : "LITERAL",
+ "value" : false,
+ "type" : "BOOLEAN NOT NULL"
+ } ],
+ "type" : "NULL"
+ }, {
+ "kind" : "LITERAL",
+ "value" : "UP",
+ "type" : "CHAR(2) NOT NULL"
+ } ],
+ "type" : "NULL"
+ },
+ "patternDefinitions" : {
+ "DOWN" : {
+ "kind" : "CALL",
+ "syntax" : "BINARY",
+ "internalName" : "$OR$1",
+ "operands" : [ {
+ "kind" : "CALL",
+ "syntax" : "BINARY",
+ "internalName" : "$<$1",
+ "operands" : [ {
+ "kind" : "CALL",
+ "internalName" : "$LAST$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "*",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 0,
+ "type" : "INT NOT NULL"
+ } ],
+ "type" : "INT"
+ }, {
+ "kind" : "CALL",
+ "internalName" : "$LAST$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "DOWN",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 1,
+ "type" : "INT NOT NULL"
+ } ],
+ "type" : "INT"
+ } ],
+ "type" : "BOOLEAN"
+ }, {
+ "kind" : "CALL",
+ "syntax" : "POSTFIX",
+ "internalName" : "$IS NULL$1",
+ "operands" : [ {
+ "kind" : "CALL",
+ "internalName" : "$LAST$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "DOWN",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 1,
+ "type" : "INT NOT NULL"
+ } ],
+ "type" : "INT"
+ } ],
+ "type" : "BOOLEAN NOT NULL"
+ } ],
+ "type" : "BOOLEAN"
+ },
+ "UP" : {
+ "kind" : "CALL",
+ "syntax" : "BINARY",
+ "internalName" : "$>$1",
+ "operands" : [ {
+ "kind" : "CALL",
+ "internalName" : "$LAST$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "*",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 0,
+ "type" : "INT NOT NULL"
+ } ],
+ "type" : "INT"
+ }, {
+ "kind" : "CALL",
+ "internalName" : "$LAST$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "DOWN",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 0,
+ "type" : "INT NOT NULL"
+ } ],
+ "type" : "INT"
+ } ],
+ "type" : "BOOLEAN"
+ }
+ },
+ "measures" : {
+ "first" : {
+ "kind" : "CALL",
+ "syntax" : "PREFIX",
+ "internalName" : "$FINAL$1",
+ "operands" : [ {
+ "kind" : "CALL",
+ "internalName" : "$FIRST$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "DOWN",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 0,
+ "type" : "INT NOT NULL"
+ } ],
+ "type" : "INT"
+ } ],
+ "type" : "INT"
+ },
+ "last" : {
+ "kind" : "CALL",
+ "syntax" : "PREFIX",
+ "internalName" : "$FINAL$1",
+ "operands" : [ {
+ "kind" : "CALL",
+ "internalName" : "$LAST$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "DOWN",
+ "inputIndex" : 1,
+ "type" : "INT"
+ }, {
+ "kind" : "LITERAL",
+ "value" : 0,
+ "type" : "INT NOT NULL"
+ } ],
+ "type" : "INT"
+ } ],
+ "type" : "INT"
+ },
+ "up" : {
+ "kind" : "CALL",
+ "syntax" : "PREFIX",
+ "internalName" : "$FINAL$1",
+ "operands" : [ {
+ "kind" : "PATTERN_INPUT_REF",
+ "alpha" : "UP",
+ "inputIndex" : 1,
+ "type" : "INT"
+ } ],
+ "type" : "INT"
+ }
+ },
+ "after" : {
+ "kind" : "LITERAL",
+ "symbol" : "MATCH_RECOGNIZE_AFTER_OPTION",
+ "value" : "SKIP_PAST_LAST_ROW",
+ "type" : {
+ "type" : "SYMBOL",
+ "nullable" : false
+ }
+ },
+ "subsets" : { },
+ "allRows" : false,
+ "partition" : {
+ "fields" : [ ]
Review Comment:
yes, it is how we currently serialize MatchSpec
--
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]