RussellSpitzer commented on a change in pull request #2248:
URL: https://github.com/apache/iceberg/pull/2248#discussion_r580770164



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/Spark3Util.java
##########
@@ -474,15 +476,33 @@ public static boolean isLocalityEnabled(FileIO io, String 
location, CaseInsensit
     return false;
   }
 
-  public static boolean isVectorizationEnabled(Map<String, String> properties, 
CaseInsensitiveStringMap readOptions) {
-    String batchReadsSessionConf = SparkSession.active().conf()
-        .get("spark.sql.iceberg.vectorization.enabled", null);
-    if (batchReadsSessionConf != null) {
-      return Boolean.valueOf(batchReadsSessionConf);
+  public static boolean isVectorizationEnabled(FileFormat fileFormat,
+                                               Map<String, String> properties,
+                                               RuntimeConfig sessionConf,
+                                               CaseInsensitiveStringMap 
readOptions) {
+
+    String readOptionValue = 
readOptions.get(SparkReadOptions.VECTORIZATION_ENABLED);
+    if (readOptionValue != null) {
+      return Boolean.parseBoolean(readOptionValue);

Review comment:
       My order like I said above is based on a "notebook/cli" perspective, 
It's also how we set up things in the Spark Cassandra connector.
   
   Did you have to set it for this particular read? Highest Precedent
   Did you have to set it for this particular session? Second Highest
   Did you set it this in the underlying table config or in the Spark Conf? Last
   
   (More accurately we had a more complex hierarchy because we add session and 
session scoped parameters which i think was a bit overkill.)




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

Reply via email to