Yohahaha commented on code in PR #5496:
URL: https://github.com/apache/incubator-gluten/pull/5496#discussion_r1577111374
##########
backends-velox/src/test/scala/org/apache/spark/sql/execution/VeloxParquetWriteForHiveSuite.scala:
##########
@@ -130,60 +122,30 @@ class VeloxParquetWriteForHiveSuite extends
GlutenQueryTest with SQLTestUtils {
spark.sql(
"CREATE TABLE t (c int, d long, e long)" +
" STORED AS PARQUET partitioned by (c, d)")
- withSQLConf("spark.sql.hive.convertMetastoreParquet" -> "true") {
- checkNativeStaticPartitionWrite(
- "INSERT OVERWRITE TABLE t partition(c=1, d)" +
- " SELECT 3 as e, 2 as e",
- native = false)
- }
+ spark.sql(
+ "INSERT OVERWRITE TABLE t partition(c=1, d)" +
+ " SELECT 3 as e, 2 as e")
checkAnswer(spark.table("t"), Row(3, 1, 2))
}
}
test("test hive write table") {
withTable("t") {
spark.sql("CREATE TABLE t (c int) STORED AS PARQUET")
- withSQLConf("spark.sql.hive.convertMetastoreParquet" -> "false") {
- if (
- SparkShimLoader.getSparkVersion.startsWith("3.4") ||
- SparkShimLoader.getSparkVersion.startsWith("3.5")
- ) {
- checkNativeWrite("INSERT OVERWRITE TABLE t SELECT 1 as c", native =
false)
- } else {
- checkNativeWrite("INSERT OVERWRITE TABLE t SELECT 1 as c", native =
true)
- }
-
- }
+ checkNativeWrite("INSERT OVERWRITE TABLE t SELECT 1 as c")
checkAnswer(spark.table("t"), Row(1))
}
}
test("test hive write dir") {
withTempPath {
f =>
- // compatible with Spark3.3 and later
- withSQLConf("spark.sql.hive.convertMetastoreInsertDir" -> "false") {
Review Comment:
same question.
##########
backends-velox/src/test/scala/org/apache/spark/sql/execution/VeloxParquetWriteForHiveSuite.scala:
##########
@@ -130,60 +122,30 @@ class VeloxParquetWriteForHiveSuite extends
GlutenQueryTest with SQLTestUtils {
spark.sql(
"CREATE TABLE t (c int, d long, e long)" +
" STORED AS PARQUET partitioned by (c, d)")
- withSQLConf("spark.sql.hive.convertMetastoreParquet" -> "true") {
- checkNativeStaticPartitionWrite(
- "INSERT OVERWRITE TABLE t partition(c=1, d)" +
- " SELECT 3 as e, 2 as e",
- native = false)
- }
+ spark.sql(
+ "INSERT OVERWRITE TABLE t partition(c=1, d)" +
+ " SELECT 3 as e, 2 as e")
Review Comment:
why not use checkNativeWriter?
##########
backends-velox/src/test/scala/org/apache/spark/sql/execution/VeloxParquetWriteForHiveSuite.scala:
##########
@@ -130,60 +122,30 @@ class VeloxParquetWriteForHiveSuite extends
GlutenQueryTest with SQLTestUtils {
spark.sql(
"CREATE TABLE t (c int, d long, e long)" +
" STORED AS PARQUET partitioned by (c, d)")
- withSQLConf("spark.sql.hive.convertMetastoreParquet" -> "true") {
- checkNativeStaticPartitionWrite(
- "INSERT OVERWRITE TABLE t partition(c=1, d)" +
- " SELECT 3 as e, 2 as e",
- native = false)
- }
+ spark.sql(
+ "INSERT OVERWRITE TABLE t partition(c=1, d)" +
+ " SELECT 3 as e, 2 as e")
checkAnswer(spark.table("t"), Row(3, 1, 2))
}
}
test("test hive write table") {
withTable("t") {
spark.sql("CREATE TABLE t (c int) STORED AS PARQUET")
- withSQLConf("spark.sql.hive.convertMetastoreParquet" -> "false") {
- if (
- SparkShimLoader.getSparkVersion.startsWith("3.4") ||
- SparkShimLoader.getSparkVersion.startsWith("3.5")
- ) {
- checkNativeWrite("INSERT OVERWRITE TABLE t SELECT 1 as c", native =
false)
- } else {
- checkNativeWrite("INSERT OVERWRITE TABLE t SELECT 1 as c", native =
true)
- }
-
- }
+ checkNativeWrite("INSERT OVERWRITE TABLE t SELECT 1 as c")
checkAnswer(spark.table("t"), Row(1))
Review Comment:
seems we do not check the case of using native writer for
spark.sql.hive.convertMetastoreParquet=false with spark33/32 right? why?
--
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]