deniskuzZ commented on code in PR #6152:
URL: https://github.com/apache/hive/pull/6152#discussion_r2618499097
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergSelects.java:
##########
@@ -187,6 +195,68 @@ public void testSpecialCharacters() {
Assert.assertArrayEquals(new Object[]{"star", 2L}, result.get(1));
}
+ @Test
+ public void testVariantSelectProjection() throws IOException {
+ assumeTrue(fileFormat == FileFormat.PARQUET);
+ assumeTrue(!isVectorized);
+
+ TableIdentifier table = TableIdentifier.of("default",
"variant_projection");
+ shell.executeStatement(String.format("DROP TABLE IF EXISTS %s", table));
+
+ shell.executeStatement(
+ String.format(
+ "CREATE TABLE %s (id INT, payload VARIANT) STORED BY ICEBERG
STORED AS %s %s %s",
+ table,
+ fileFormat,
+ testTables.locationForCreateTableSQL(table),
+ testTables.propertiesForCreateTableSQL(
+ ImmutableMap.of("format-version", "3",
"variant.shredding.enabled", "true"))));
+
+ shell.executeStatement(
+ String.format(
+ "INSERT INTO %s VALUES " +
+ "(1, parse_json('{\"name\":\"Alice\",\"age\":30}'))," +
Review Comment:
addressed in https://github.com/apache/hive/pull/6234
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergSelects.java:
##########
@@ -187,6 +195,68 @@ public void testSpecialCharacters() {
Assert.assertArrayEquals(new Object[]{"star", 2L}, result.get(1));
}
+ @Test
+ public void testVariantSelectProjection() throws IOException {
+ assumeTrue(fileFormat == FileFormat.PARQUET);
+ assumeTrue(!isVectorized);
+
+ TableIdentifier table = TableIdentifier.of("default",
"variant_projection");
+ shell.executeStatement(String.format("DROP TABLE IF EXISTS %s", table));
+
+ shell.executeStatement(
+ String.format(
+ "CREATE TABLE %s (id INT, payload VARIANT) STORED BY ICEBERG
STORED AS %s %s %s",
+ table,
+ fileFormat,
+ testTables.locationForCreateTableSQL(table),
+ testTables.propertiesForCreateTableSQL(
+ ImmutableMap.of("format-version", "3",
"variant.shredding.enabled", "true"))));
+
+ shell.executeStatement(
+ String.format(
+ "INSERT INTO %s VALUES " +
+ "(1, parse_json('{\"name\":\"Alice\",\"age\":30}'))," +
Review Comment:
fixed in https://github.com/apache/hive/pull/6234
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]