wuchong commented on a change in pull request #9361: [FLINK-13540] DDL do not
support properties key that contains number …
URL: https://github.com/apache/flink/pull/9361#discussion_r310868856
##########
File path:
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkSqlParserImplTest.java
##########
@@ -454,12 +454,36 @@ public void testCreateInvalidPartitionedTable() {
") PARTITIONED BY (\n" +
" c,\n" +
" d\n" +
- ") with ( x = 'y', asd = 'dada')";
+ ") with ( 'x' = 'y', 'asd' = 'dada')";
sql(sql).node(new ValidationMatcher()
.fails("Partition column [C] not defined in columns, at
line 6, column 3"));
}
+ @Test
+ public void testCreateTableWithMinusInOptionKey() {
+ String sql = "create table source_table(\n" +
+ " a int,\n" +
+ " b bigint,\n" +
+ " c string\n" +
+ ") with (\n" +
+ " 'a-b-c-d124' = 'ab',\n" +
+ " 'a.b-c-connector.e-f.g' = 'ada',\n" +
+ " 'a.b-c-d.e-1231.g' = 'ada',\n" +
+ " 'a.b-c-d.*' = 'adad')\n";
+ String expected = "CREATE TABLE `SOURCE_TABLE` (\n" +
+ " `A` INTEGER,\n" +
+ " `B` BIGINT,\n" +
+ " `C` STRING\n" +
+ ") WITH (\n" +
+ " 'a-b-c-d124' = 'ab',\n" +
Review comment:
nit: could you add a key `a.b.1.c` ?
----------------------------------------------------------------
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