Hi.  I copied the Flink code from this page.  My printSchema() does not
contain **ROWTIME** in the output.  I'm running Flink v1.14.4.

https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/table/data_stream_api/



public static class User {...}

DataStream<User> dataStream =
        env.fromElements(
                new User("Alice", 4, Instant.ofEpochMilli(1000)),
                new User("Bob", 6, Instant.ofEpochMilli(1001)),
                new User("Alice", 10, Instant.ofEpochMilli(1002)));

Table table =
        tableEnv.fromDataStream(
                dataStream,
                Schema.newBuilder()
                        .columnByExpression("rowtime",
"CAST(event_time AS TIMESTAMP_LTZ(3))")
                        .watermark("rowtime", "rowtime - INTERVAL '10' SECOND")
                        .build());
table.printSchema();


Actual: this printSchema prints the following:

(
    `name` STRING,
    `score` INT,
    `event_time` TIMESTAMP_LTZ(9),
    `rowtime` TIMESTAMP_LTZ(3) AS CAST(event_time AS TIMESTAMP_LTZ(3)),
    WATERMARK FOR `rowtime`: TIMESTAMP_LTZ(3) AS rowtime - INTERVAL '10' SECOND
)

Expected: the Flink docs say there should be a **ROWTIME** in the schema
details for rowtime.

Reply via email to