zhongyujiang commented on code in PR #5531:
URL: https://github.com/apache/paimon/pull/5531#discussion_r2062633192


##########
paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkSQLProperties.java:
##########
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.spark;
+
+/** Spark SQL properties for Paimon. */
+public class SparkSQLProperties {
+    private SparkSQLProperties() {}
+
+    public static final String USE_V2_WRITE = "spark.sql.paimon.use-v2-write";

Review Comment:
   Removed this and added 
org.apache.paimon.spark.SparkConnectorOptions#USE_V2_WRITE. Usage
   
   -- conf spark.paimon.write.use-v2-write=true
   
   However, this parameter currently only works globally and cannot be applied 
to individual tables through the write option.
   If we want to control it via the write option, we would need to add both 
`TableCapability.BATCH_WRITE` and `TableCapability.V1_BATCH_WRITE` in 
`org.apache.paimon.spark.SparkTable#capabilities`, because write options are 
passed in when constructing the write builder, and the `capabilities` method 
cannot be aware of the write options: 
`org.apache.paimon.spark.SparkTable#newWriteBuilder`. However, I am unable to 
make spark write support both V1 write and V2 write at the same time. Do you 
think it's acceptable to not have per-table control?



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

Reply via email to