[jira] [Created] (FLINK-22654) SqlCreateTable toString()/unparse() lose CONSTRAINTS and watermarks

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-22654) SqlCreateTable toString()/unparse() lose CONSTRAINTS and watermarks

Shang Yuanchun (Jira)
youxianq created FLINK-22654:
--------------------------------

             Summary: SqlCreateTable  toString()/unparse() lose CONSTRAINTS  and watermarks
                 Key: FLINK-22654
                 URL: https://issues.apache.org/jira/browse/FLINK-22654
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Planner
    Affects Versions: 1.13.0
         Environment: {code:java}
//代码占位符
public static void main(String[] args) throws Exception {


    SqlParser sqlParser = getSqlParser("" +
            "create TEMPORARY table t_order_course (\n" +
            "   WATERMARK FOR last_update_time AS last_update_time - INTERVAL '5' SECOND\n" +
            ") with (\n" +
            "  'scan.startup.mode' = 'specific-offsets',\n" +
            "  'scan.startup.specific-offsets' = 'partition:0,offset:1169129'\n" +
            ") like cdc.`qq_data(sh-backend-tst:3306)`.t_order_course (\n" +
            "   OVERWRITING  WATERMARKS\n" +
            "   OVERWRITING OPTIONS\n" +
            "   EXCLUDING CONSTRAINTS\n" +
            " \n" +
            ")");
    SqlNode sqlNode = sqlParser.parseStmt();

    System.out.println(sqlNode.toString());
    // out:
CREATE TEMPORARY TABLE `t_order_course` WITH (
  'scan.startup.mode' = 'specific-offsets',
  'scan.startup.specific-offsets' = 'partition:0,offset:1169129'
)
LIKE `cdc`.`qq_data(sh-backend-tst:3306)`.`t_order_course` (
  OVERWRITING WATERMARKS
  OVERWRITING OPTIONS
  EXCLUDING CONSTRAINTS
){code}
            Reporter: youxianq


create a SqlCreateTable using like clause   and then toString() or unparse()  will lose watermark 

if  no column



--
This message was sent by Atlassian Jira
(v8.3.4#803005)