Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ object VeloxBackendSettings extends BackendSettingsApi {
// is limited to partitioned tables. Therefore, we should add this condition restriction.
// After velox supports bucketed non-partitioned tables, we can remove the restriction on
// partitioned tables.
if (bucketSpec.isEmpty || (isHiveCompatibleBucketTable && isPartitionedTable)) {
if (bucketSpec.isEmpty || isHiveCompatibleBucketTable) {
None
} else {
Some("Unsupported native write: non-compatible hive bucket write is not supported.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class VeloxParquetWriteForHiveSuite
}
}

test("bucket writer with non-dynamic partition should fallback") {
test("bucket writer with non-dynamic partition") {
if (isSparkVersionGE("3.4")) {
Seq("true", "false").foreach {
enableConvertMetastore =>
Expand All @@ -293,7 +293,7 @@ class VeloxParquetWriteForHiveSuite
// hive relation convert always use dynamic, so it will offload to native.
checkNativeWrite(
s"INSERT INTO $target PARTITION(k='0') SELECT i, j FROM $source",
checkNative = enableConvertMetastore.toBoolean)
checkNative = true)
val files = tableDir(target)
.listFiles()
.filterNot(f => f.getName.startsWith(".") || f.getName.startsWith("_"))
Expand All @@ -305,7 +305,7 @@ class VeloxParquetWriteForHiveSuite
}
}

test("bucket writer with non-partition table should fallback") {
test("bucket writer with non-partition table") {
if (isSparkVersionGE("3.4")) {
Seq("true", "false").foreach {
enableConvertMetastore =>
Expand All @@ -323,7 +323,7 @@ class VeloxParquetWriteForHiveSuite
(0 until 50).map(i => (i % 13, i.toString)).toDF("i", "j")
df.write.mode(SaveMode.Overwrite).saveAsTable(source)

checkNativeWrite(s"INSERT INTO $target SELECT i, j FROM $source", checkNative = false)
checkNativeWrite(s"INSERT INTO $target SELECT i, j FROM $source", checkNative = true)

checkAnswer(spark.table(target), df)
}
Expand Down