danny0405 commented on a change in pull request #9502: [FLINK-13814][hive] 
HiveTableSink should strip quotes from partition …
URL: https://github.com/apache/flink/pull/9502#discussion_r317043661
 
 

 ##########
 File path: 
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/dml/RichSqlInsert.java
 ##########
 @@ -75,7 +77,8 @@ public SqlNodeList getStaticPartitions() {
                }
                for (SqlNode node : this.staticPartitions.getList()) {
                        SqlProperty sqlProperty = (SqlProperty) node;
-                       String value = 
SqlLiteral.value(sqlProperty.getValue()).toString();
+                       Comparable comparable = 
SqlLiteral.value(sqlProperty.getValue());
+                       String value = comparable instanceof NlsString ? 
((NlsString) comparable).getValue() : comparable.toString();
 
 Review comment:
   I'm ok with the `RichSqlInsert` change.

----------------------------------------------------------------
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

Reply via email to