Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-23162

Create table uses time_ltz in the column name and it's expression which results in exception

    XMLWordPrintableJSON

Details

    Description

      The create table example in https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/table/concepts/time_attributes/ uses the `time_ltz` in it's declaration and expression

      CREATE TABLE user_actions (
      user_name STRING,
      data STRING,
      ts BIGINT,
      time_ltz AS TO_TIMESTAMP_LTZ(time_ltz, 3),
      – declare time_ltz as event time attribute and use 5 seconds delayed watermark strategy
      WATERMARK FOR time_ltz AS time_ltz - INTERVAL '5' SECOND
      ) WITH (
      ...
      );

      When it is executed in the flink sql client it throws an exception:

      [ERROR] Could not execute SQL statement. Reason:
      org.apache.calcite.sql.validate.SqlValidatorException: Unknown identifier 'time_ltz'

      The create table works if the expression uses ts as the argument while declaring time_ltz.

      Attachments

        Issue Links

          Activity

            People

              mans2singh Mans Singh
              mans2singh Mans Singh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 10m
                  10m
                  Remaining:
                  Remaining Estimate - 10m
                  10m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified