You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "guykhazma (via GitHub)" <gi...@apache.org> on 2025/04/29 17:40:02 UTC
[PR] Docs: Add Spark SQL Configurations [iceberg]
guykhazma opened a new pull request, #12931:
URL: https://github.com/apache/iceberg/pull/12931
This PR adds missing Spark SQL configuration documentation for Iceberg and clarifies precedence rules.
This PR updates the Spark configuration docs to include undocumented Spark SQL properties (e.g., `spark.sql.iceberg.vectorization.enabled`) and documents the precedence between Spark configs, read/write options, and table properties.
Addresses #12908.
cc: @manuzhang
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067366792
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+3. Spark SQL Configurations – Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
Review Comment:
Technically these are not all Spark Sql Configurations, they are Spark Session Configurations
The first sets "Spark Session Conf"
The second sets "Spark Context Configuration" but the Session inherits this
and the last also sets "Spark Context Configuration"
I would probably just change Spark Sql Configuration to Spark Session Configuration
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067415111
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
Review Comment:
I will specify it is for storage partitioned joins. And then it makes sense to add a page describing SPJ and refer to it (as part of a separate PR).
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "yogevyuval (via GitHub)" <gi...@apache.org>.
yogevyuval commented on PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#issuecomment-2873411844
@guykhazma @RussellSpitzer isnt spark.sql.iceberg.report-column-stats enabled by default?
<img width="657" alt="image" src="https://github.com/user-attachments/assets/8eda8550-c1d0-498c-8b27-204f90e2c8a1" />
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067411298
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
Review Comment:
Keeps scan tasks for the same partition in the same spark read split? Or we can just say this is an flag for Storage Partitioned Joins?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067424078
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
+| spark.sql.iceberg.locality.enabled | false | Report locality information for task planning |
Review Comment:
Report locality information for Spark task placement on executors
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067386653
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+3. Spark SQL Configurations – Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
Review Comment:
Actually maybe I was to generic, I think there are a few properties you can only set at the session level? Those could live in this table
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067453710
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
+| spark.sql.iceberg.locality.enabled | false | Report locality information for task planning |
+| spark.sql.iceberg.executor-cache.enabled | true | Enables cache for executor-side metadata |
Review Comment:
I changed it to:
```
Enables cache for executor-side (currently used to cache Delete Files)
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#issuecomment-2840272807
@RussellSpitzer thanks for the detailed feedback! I addressed most of the comments. There are 2 left which I would appreciate your input.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067408264
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
Review Comment:
Description for this is a little literal, Prefer something like
Validate that the write schema's nullability matches the table's nullability
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067399268
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+3. Spark SQL Configurations – Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
Review Comment:
Some of the properties have different naming. For example, the vectorization is set using `vectorization-enabled` when using an option or the session conf. While using it as a table property requires to specify the format: `read.parquet.vectorization.enabled`.
So my thinking was that this would represent a comprehensive enumeration of the properties to avoid confusion.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer merged PR #12931:
URL: https://github.com/apache/iceberg/pull/12931
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067429855
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
+| spark.sql.iceberg.locality.enabled | false | Report locality information for task planning |
+| spark.sql.iceberg.executor-cache.enabled | true | Enables cache for executor-side metadata |
+| spark.sql.iceberg.executor-cache.timeout | 10 minutes | Timeout for executor cache entries |
+| spark.sql.iceberg.executor-cache.max-entry-size | 64MB | Max size per cache entry |
+| spark.sql.iceberg.executor-cache.max-total-size | 128MB | Max total executor cache size |
+| spark.sql.iceberg.executor-cache.locality.enabled | false | Enables locality-aware executor cache usage |
+| spark.sql.iceberg.merge-schema | false | Enables automatic schema merge during write |
+| spark.sql.iceberg.report-column-stats | false | Reports column-level statistics for query optimization |
Review Comment:
Report Puffin Table Statistics if available to Spark's Cost Based Optimizer. CBO must be enabled for this to be effective.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067415814
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
Review Comment:
Scan planning mode for data files (AUTO, LOCAL, DISTRIBUTED)
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067443428
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
+| spark.sql.iceberg.locality.enabled | false | Report locality information for task planning |
+| spark.sql.iceberg.executor-cache.enabled | true | Enables cache for executor-side metadata |
Review Comment:
it is indeed used only for Delete File Caching ([here]()https://github.com/apache/iceberg/blob/242717c8c516dcc49bc4368b77cd3f3af40720c8/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BaseReader.java#L232).
But the config might be used in the future somewhere else and the documentation might become stale if we specifically say it is for delete file.
Should we have something more generic like:
```
Enables cache for executor-side
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067406747
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+3. Spark SQL Configurations – Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
Review Comment:
I think this is probably fine ... Let me go through all the things here though
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067391481
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
Review Comment:
Fixed, thanks.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067376061
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+3. Spark SQL Configurations – Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|------------------------|-------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table property default | Enables vectorized Parquet reads |
Review Comment:
Table property default => Table default?
That pattern is used elsewhere
I think this property doesn't just apply to "Parquet" as well so the description probably needs to be changed. "Enables vectorized reads of data files"?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067417258
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
Review Comment:
Default is AUTO
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
Review Comment:
Default is AUTO
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067429592
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
+| spark.sql.iceberg.locality.enabled | false | Report locality information for task planning |
+| spark.sql.iceberg.executor-cache.enabled | true | Enables cache for executor-side metadata |
Review Comment:
I will check and update accordingly
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067426749
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
+| spark.sql.iceberg.locality.enabled | false | Report locality information for task planning |
+| spark.sql.iceberg.executor-cache.enabled | true | Enables cache for executor-side metadata |
+| spark.sql.iceberg.executor-cache.timeout | 10 minutes | Timeout for executor cache entries |
+| spark.sql.iceberg.executor-cache.max-entry-size | 64MB | Max size per cache entry |
+| spark.sql.iceberg.executor-cache.max-total-size | 128MB | Max total executor cache size |
+| spark.sql.iceberg.executor-cache.locality.enabled | false | Enables locality-aware executor cache usage |
+| spark.sql.iceberg.merge-schema | false | Enables automatic schema merge during write |
Review Comment:
Enables modifying the table schema to match the write schema. Only adds columns missing columns.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067425725
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
+| spark.sql.iceberg.locality.enabled | false | Report locality information for task planning |
+| spark.sql.iceberg.executor-cache.enabled | true | Enables cache for executor-side metadata |
Review Comment:
I believe we only use this for Delete File Caching at the moment (no metadata)
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067420517
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
+| spark.sql.iceberg.advisory-partition-size | Table default | Advisory size (bytes) for data planning |
Review Comment:
Advisory Size (bytes) used for writing to the Table when Spark's Adaptive Query Execution is enabled. Used to size output files.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067431470
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
Review Comment:
How about this?
```
When true, co-locate scan tasks for the same partition in the same read split, used in Storage Partitioned Joins.
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#issuecomment-2873787495
Merged! Thanks @guykhazma for the PR, this will definitely make things easier for users. Thanks to @yogevyuval for reviewing as well (good catch!)
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067408761
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
Review Comment:
Validates the write schema column order matches the table schema order
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067354567
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
Review Comment:
This order doesn't look correct to me. Checking
https://github.com/apache/iceberg/blob/5ed88a5db0ffaea3fdd836c375fdce8d420d5956/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/SparkConfParser.java#L267-L300
The precedence is :
1. Option
2. Session
3. Table Property
4. Default
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067344194
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
Review Comment:
Do we need to specify "DataSource Api Read/Write Options"?
I just wonder if this is ambiguous for those not familiar with Spark APIs
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067416412
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
+| spark.sql.iceberg.data-planning-mode | Table default | Override for data planning mode |
+| spark.sql.iceberg.delete-planning-mode | Table default | Override for delete planning mode |
Review Comment:
Scan planning mode for delete files (AUTO, LOCAL, DISTRIBUTED)
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067411977
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,61 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. DataSource API Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Spark Session Configuration - Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+3. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+4. Default Value
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
+|--------------------------------------------------------|----------------------------------------------------------------|------------------------------------------------------------------------|
+| spark.sql.iceberg.vectorization.enabled | Table default | Enables vectorized reads of data files |
+| spark.sql.iceberg.parquet.reader-type | ICEBERG | Sets Parquet reader implementation (`ICEBERG`,`COMET`) |
+| spark.sql.iceberg.check-nullability | true | Whether to perform the nullability check during writes |
+| spark.sql.iceberg.check-ordering | true | Whether to check the order of fields during writes |
+| spark.sql.iceberg.planning.preserve-data-grouping | false | Whether to preserve the existing grouping of data while planning splits |
+| spark.sql.iceberg.aggregate-push-down.enabled | true | Enables pushdown of aggregate functions (MAX, MIN, COUNT) |
+| spark.sql.iceberg.distribution-mode | See [Spark Writes](spark-writes.md#writing-distribution-modes) | Controls distribution strategy during writes |
+| spark.wap.id | null | [Write-Audit-Publish](branching.md#audit-branch) snapshot staging ID |
+| spark.wap.branch | null | WAP branch name for snapshot commit |
+| spark.sql.iceberg.compression-codec | Table default | Write compression codec (e.g., `zstd`, `snappy`) |
+| spark.sql.iceberg.compression-level | Table default | Compression level for Parquet/Avro |
+| spark.sql.iceberg.compression-strategy | Table default | Compression strategy (for ORC) |
Review Comment:
```suggestion
| spark.sql.iceberg.compression-strategy | Table default | Compression strategy for ORC |
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067384545
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+3. Spark SQL Configurations – Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
Review Comment:
This table seems like we are duplicating the information in
Read options and Write options?
I would probably just add a note that any of the "read" or "write" options can be used as "Session Options" by prepending them with "spark.sql.iceberg." and link to the below subsections then add any missing properties to those tables
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on code in PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#discussion_r2067405320
##########
docs/docs/spark-configuration.md:
##########
@@ -145,6 +145,59 @@ Using those SQL commands requires adding Iceberg extensions to your Spark enviro
## Runtime configuration
+### Precedence of Configuration Settings
+Iceberg allows configurations to be specified at different levels. The effective configuration for a read or write operation is determined based on the following order of precedence:
+
+1. Read/Write Options – Explicitly passed to `.option(...)` in a read/write operation.
+
+2. Table Properties – Defined on the Iceberg table via `ALTER TABLE SET TBLPROPERTIES`.
+
+3. Spark SQL Configurations – Set globally in Spark via `spark.conf.set(...)`, `spark-defaults.conf`, or `--conf` in spark-submit.
+
+If a setting is not defined at a higher level, the next level is used as fallback. This allows flexibility while enabling global defaults when needed.
+
+### Spark SQL Options
+
+Iceberg supports setting various global behaviors using Spark SQL configuration options. These can be set via `spark.conf`, `SparkSession settings`, or Spark submit arguments.
+For example:
+
+```scala
+// disabling vectorization
+val spark = SparkSession.builder()
+ .appName("IcebergExample")
+ .master("local[*]")
+ .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
+ .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
+ .config("spark.sql.iceberg.vectorization.enabled", "false")
+ .getOrCreate()
+```
+
+| Spark option | Default | Description |
Review Comment:
I just don't want to have something in two places that may potentially diverge.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Docs: Add Spark SQL Configurations [iceberg]
Posted by "guykhazma (via GitHub)" <gi...@apache.org>.
guykhazma commented on PR #12931:
URL: https://github.com/apache/iceberg/pull/12931#issuecomment-2873429528
@yogevyuval sorry my bad, thanks for pointing this out. I will fix it.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org