danny0405 commented on a change in pull request #9243:
[FLINK-13335][sql-parser] Align the SQL CREATE TABLE DDL with FLIP-37
URL: https://github.com/apache/flink/pull/9243#discussion_r309960001
##########
File path:
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkSqlParserImplTest.java
##########
@@ -383,19 +383,21 @@ public void testCreateTableWithComplexType() {
}
@Test
- public void testCreateTableWithDecimalType() {
+ public void testCreateTableWithComplexType() {
check("CREATE TABLE tbl1 (\n" +
- " a decimal, \n" +
- " b decimal(10, 0),\n" +
- " c decimal(38, 38),\n" +
+ " a ARRAY<bigint>, \n" +
+ " b MAP<int, varchar>,\n" +
+ " c ROW<cc0 int, cc1 float, cc2 varchar>,\n" +
+ " d MULTISET<varchar>,\n" +
" PRIMARY KEY (a, b) \n" +
") with (\n" +
" x = 'y', \n" +
" asd = 'data'\n" +
")\n", "CREATE TABLE `TBL1` (\n" +
- " `A` DECIMAL,\n" +
- " `B` DECIMAL(10, 0),\n" +
- " `C` DECIMAL(38, 38),\n" +
+ " `A` ARRAY< BIGINT >,\n" +
+ " `B` MAP< INTEGER, VARCHAR >,\n" +
+ " `C` ROW< `CC0` INTEGER, `CC1` FLOAT, `CC2` VARCHAR
>,\n" +
+ " `D` MULTISET< VARCHAR >,\n" +
Review comment:
But most of the users have used the `VARCHAR(65536)` for the long time, it
would be a breaking change if we change it to default `VARCHAR(1)`, it is a SQL
standard, but we do need follow everything.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services