-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-40710][DOCS] Supplement undocumented parquet configurations in documentation #38160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -454,6 +454,28 @@ Configuration of Parquet can be done using the `setConf` method on `SparkSession | |||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>1.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.int96TimestampConversion</code></td> | ||||||||||||||||||||||||
| <td>false</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| This controls whether timestamp adjustments should be applied to INT96 data when | ||||||||||||||||||||||||
| converting to timestamps, for data written by Impala. This is necessary because Impala | ||||||||||||||||||||||||
| stores INT96 data with a different timezone offset than Hive & Spark. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>2.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.outputTimestampType</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 911 to 921 in 309638e
|
||||||||||||||||||||||||
| <td>INT96</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| Sets which Parquet timestamp type to use when Spark writes data to Parquet files. | ||||||||||||||||||||||||
| INT96 is a non-standard but commonly used timestamp type in Parquet. TIMESTAMP_MICROS | ||||||||||||||||||||||||
| is a standard timestamp type in Parquet, which stores number of microseconds from the | ||||||||||||||||||||||||
| Unix epoch. TIMESTAMP_MILLIS is also standard, but with millisecond precision, which | ||||||||||||||||||||||||
| means Spark has to truncate the microsecond portion of its timestamp value. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>2.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.compression.codec</code></td> | ||||||||||||||||||||||||
| <td>snappy</td> | ||||||||||||||||||||||||
|
|
@@ -473,6 +495,17 @@ Configuration of Parquet can be done using the `setConf` method on `SparkSession | |||||||||||||||||||||||
| <td>Enables Parquet filter push-down optimization when set to true.</td> | ||||||||||||||||||||||||
| <td>1.2.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.aggregatePushdown</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1003 to 1010 in 309638e
|
||||||||||||||||||||||||
| <td>false</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| If true, aggregates will be pushed down to Parquet for optimization. Support MIN, MAX | ||||||||||||||||||||||||
| and COUNT as aggregate expression. For MIN/MAX, support boolean, integer, float and date | ||||||||||||||||||||||||
| type. For COUNT, support all data types. If statistics is missing from any Parquet file | ||||||||||||||||||||||||
| footer, exception would be thrown. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>3.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.hive.convertMetastoreParquet</code></td> | ||||||||||||||||||||||||
| <td>true</td> | ||||||||||||||||||||||||
|
|
@@ -493,6 +526,17 @@ Configuration of Parquet can be done using the `setConf` method on `SparkSession | |||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>1.5.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.respectSummaryFiles</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 872 to 879 in 309638e
|
||||||||||||||||||||||||
| <td>false</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| When true, we make assumption that all part-files of Parquet are consistent with | ||||||||||||||||||||||||
| summary files and we will ignore them when merging schema. Otherwise, if this is | ||||||||||||||||||||||||
| false, which is the default, we will merge all part-files. This should be considered | ||||||||||||||||||||||||
| as expert-only option, and shouldn't be enabled before knowing what it means exactly. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>1.5.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.writeLegacyFormat</code></td> | ||||||||||||||||||||||||
| <td>false</td> | ||||||||||||||||||||||||
|
|
@@ -505,6 +549,84 @@ Configuration of Parquet can be done using the `setConf` method on `SparkSession | |||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>1.6.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.enableVectorizedReader</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1033 to 1038 in 309638e
|
||||||||||||||||||||||||
| <td>true</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| Enables vectorized parquet decoding. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>2.0.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.enableNestedColumnVectorizedReader</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1040 to 1046 in 309638e
|
||||||||||||||||||||||||
| <td>true</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| Enables vectorized Parquet decoding for nested columns (e.g., struct, list, map). | ||||||||||||||||||||||||
| Requires <code>spark.sql.parquet.enableVectorizedReader</code> to be enabled. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>3.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.recordLevelFilter.enabled</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1048 to 1056 in 309638e
|
||||||||||||||||||||||||
| <td>false</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| If true, enables Parquet's native record-level filtering using the pushed down filters. | ||||||||||||||||||||||||
| This configuration only has an effect when <code>spark.sql.parquet.filterPushdown</code> | ||||||||||||||||||||||||
| is enabled and the vectorized reader is not used. You can ensure the vectorized reader | ||||||||||||||||||||||||
| is not used by setting <code>spark.sql.parquet.enableVectorizedReader</code> to false. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>2.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.columnarReaderBatchSize</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1058 to 1063 in 309638e
|
||||||||||||||||||||||||
| <td>4096</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| The number of rows to include in a parquet vectorized reader batch. The number should | ||||||||||||||||||||||||
| be carefully chosen to minimize overhead and avoid OOMs in reading data. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>2.4.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.fieldId.write.enabled</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1065 to 1072 in 309638e
|
||||||||||||||||||||||||
| <td>true</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| Field ID is a native field of the Parquet schema spec. When enabled, | ||||||||||||||||||||||||
| Parquet writers will populate the field Id metadata (if present) in the Spark schema to the Parquet schema. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>3.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.fieldId.read.enabled</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1074 to 1081 in 309638e
|
||||||||||||||||||||||||
| <td>false</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| Field ID is a native field of the Parquet schema spec. When enabled, Parquet readers | ||||||||||||||||||||||||
| will use field IDs (if present) in the requested Spark schema to look up Parquet | ||||||||||||||||||||||||
| fields instead of using column names. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>3.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.fieldId.read.ignoreMissing</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1083 to 1090 in 309638e
|
||||||||||||||||||||||||
| <td>false</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| When the Parquet file doesn't have any field IDs but the | ||||||||||||||||||||||||
| Spark read schema is using field IDs to read, we will silently return nulls | ||||||||||||||||||||||||
| when this flag is enabled, or error otherwise. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>3.3.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td><code>spark.sql.parquet.timestampNTZ.enabled</code></td> | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala Lines 1092 to 1101 in 309638e
|
||||||||||||||||||||||||
| <td>true</td> | ||||||||||||||||||||||||
| <td> | ||||||||||||||||||||||||
| Enables <code>TIMESTAMP_NTZ</code> support for Parquet reads and writes. | ||||||||||||||||||||||||
| When enabled, <code>TIMESTAMP_NTZ</code> values are written as Parquet timestamp | ||||||||||||||||||||||||
| columns with annotation isAdjustedToUTC = false and are inferred in a similar way. | ||||||||||||||||||||||||
| When disabled, such values are read as <code>TIMESTAMP_LTZ</code> and have to be | ||||||||||||||||||||||||
| converted to <code>TIMESTAMP_LTZ</code> for writes. | ||||||||||||||||||||||||
| </td> | ||||||||||||||||||||||||
| <td>3.4.0</td> | ||||||||||||||||||||||||
| </tr> | ||||||||||||||||||||||||
| <tr> | ||||||||||||||||||||||||
| <td>spark.sql.parquet.datetimeRebaseModeInRead</td> | ||||||||||||||||||||||||
| <td><code>EXCEPTION</code></td> | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spark/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
Lines 899 to 905 in 309638e