You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/08/28 02:26:56 UTC

[GitHub] [flink] lirui-apache commented on a change in pull request #9502: [FLINK-13814][hive] HiveTableSink should strip quotes from partition …

lirui-apache 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_r318368965
 
 

 ##########
 File path: flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/TableEnvHiveConnectorTest.java
 ##########
 @@ -171,6 +172,57 @@ public void testDecimal() throws Exception {
 		}
 	}
 
+	@Test
+	public void testStaticPartition() throws Exception {
+		hiveShell.execute("create database db1");
+		try {
+			hiveShell.execute("create table db1.src (x int)");
+			hiveShell.insertInto("db1", "src").addRow(1).addRow(2).commit();
+			hiveShell.execute("create table db1.dest (x int) partitioned by (p1 string, p2 double)");
+			TableEnvironment tableEnv = getTableEnvWithHiveCatalog();
+			tableEnv.sqlUpdate("insert into db1.dest partition (p1='1''1', p2=1.1) select x from db1.src");
 
 Review comment:
   I agree this may not be common use case, but theoretically a string partition column can take any valid values including those with single quotes. And Hive also supports this.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services