AngersZhuuuu commented on a change in pull request #30824:
URL: https://github.com/apache/spark/pull/30824#discussion_r545539193
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -3745,6 +3745,21 @@ class SQLQuerySuite extends QueryTest with
SharedSparkSession with AdaptiveSpark
}
}
}
+
+ test("SPARK-33593: Parquet vector reader incorrect with binary partition
value") {
+ Seq("false", "true").foreach(value => {
+ withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> value) {
+ withTable("t") {
+ sql(
+ """CREATE TABLE t(name STRING, id BINARY, part BINARY)
+ | USING PARQUET PARTITIONED BY (part)""".stripMargin)
Review comment:
Done
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
##########
@@ -3745,6 +3745,21 @@ class SQLQuerySuite extends QueryTest with
SharedSparkSession with AdaptiveSpark
}
}
}
+
+ test("SPARK-33593: Parquet vector reader incorrect with binary partition
value") {
+ Seq("false", "true").foreach(value => {
+ withSQLConf(SQLConf.PARQUET_VECTORIZED_READER_ENABLED.key -> value) {
+ withTable("t") {
+ sql(
+ """CREATE TABLE t(name STRING, id BINARY, part BINARY)
+ | USING PARQUET PARTITIONED BY (part)""".stripMargin)
+ sql(s"INSERT INTO t PARTITION(part = 'Spark SQL') VALUES('a',
X'537061726B2053514C')")
Review comment:
Done
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnVectorUtils.java
##########
@@ -94,6 +96,9 @@ public static void populate(WritableColumnVector col,
InternalRow row, int field
col.putInts(0, capacity, row.getInt(fieldIdx));
} else if (t instanceof TimestampType) {
col.putLongs(0, capacity, row.getLong(fieldIdx));
+ } else {
+ throw new RuntimeException(String.format("DataType %s is not
supported" +
+ " when use column vectorized reader.", t.sql()));
Review comment:
Done
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]