yikf commented on code in PR #8386:
URL: https://github.com/apache/incubator-gluten/pull/8386#discussion_r1901433487


##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxBackend.scala:
##########
@@ -337,10 +338,14 @@ object VeloxBackendSettings extends BackendSettingsApi {
     }
 
     def validateBucketSpec(): Option[String] = {
-      if (bucketSpec.nonEmpty) {
-        Some("Unsupported native write: bucket write is not supported.")
-      } else {
+      val isHiveCompatibleBucketTable = bucketSpec.nonEmpty && options
+        .getOrElse("__hive_compatible_bucketed_table_insertion__", "false")
+        .equals("true")
+      // Support hive compatible bucket and partition table.
+      if (bucketSpec.isEmpty || (isHiveCompatibleBucketTable && 
isPartitionedTable)) {

Review Comment:
   @JkSelf It seems to only support the CTAS situations. 
   
![image](https://github.com/user-attachments/assets/9d2e992f-9f72-4f1d-8412-489ba515cdcd)
   
   I tested it with the latest code, it failed due to [this 
branch](https://github.com/facebookincubator/velox/blob/main/velox/connectors/hive/HiveDataSink.cpp#L966).
 
   
![image](https://github.com/user-attachments/assets/c76b9425-7170-4c05-9946-02e4d75160d9)
   
   
   I guess this PR won't reach this branch if the table doesn't exist.
   
![image](https://github.com/user-attachments/assets/c8adffe1-77a8-472e-bcd4-7e471d7b8f2b)
   
   



-- 
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]

Reply via email to