lincoln-lil commented on PR #23478:
URL: https://github.com/apache/flink/pull/23478#issuecomment-1759102773

   > @lincoln-lil Thank you for your review. Are the 5 datatypes you mentioned 
referring to DATE, TIME_WITHOUT_TIME_ZONE, TIMESTAMP_WITHOUT_TIME_ZONE, 
TIMESTAMP_WITH_TIME_ZONE, and TIMESTAMP_WITH_LOCAL_TIME_ZONE? In the previous 
test code, there were f15, f21, and f22 corresponding to the first 3 types. I 
attempted to add the last two, but encountered an exception:
   > 
   > ```
   > org.apache.flink.table.api.TableException: Type is not supported: 
TIMESTAMP_WITH_TIME_ZONE
   >    at 
org.apache.flink.table.planner.calcite.FlinkTypeFactory.newRelDataType$1(FlinkTypeFactory.scala:152)
   > ```
   > 
   > So now I have only added f23, which corresponds to the 
TIMESTAMP_WITH_LOCAL_TIME_ZONE. If any further modifications are needed, please 
let me know. Thank you.
   
   @fengjiajie The 5 types are correct, I checked the code in FlinkTypeFactory 
and also verified it in sql client, the `TIMESTAMP_WITH_TIME_ZONE` type is 
unsupported, this can be a separate issue to follow.
   
   errors in sql client when create a column with  TIMESTAMP WITH TIME ZONE:
   ```sql
   Flink SQL> CREATE TABLE Bid (
   >   bid STRING,
   >   price BIGINT,
   >   rowtime TIMESTAMP WITH TIME ZONE,
   >   -- declare user_action_time as event time attribute and use 5 seconds 
delayed watermark strategy
   >   WATERMARK FOR rowtime AS rowtime - INTERVAL '5' SECOND
   > ) WITH ( 'connector' = 'datagen');
   [ERROR] Could not execute SQL statement. Reason:
   org.apache.flink.sql.parser.impl.ParseException: Encountered "TIME" at line 
4, column 26.
   Was expecting:
       "LOCAL" ...
   ```
   


-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to