[SPARK-34455][SQL] Deprecate spark.sql.legacy.replaceDatabricksSparkAvro.enabled
### What changes were proposed in this pull request? 1. Put the SQL config `spark.sql.legacy.replaceDatabricksSparkAvro.enabled` to the list of deprecated configs `deprecatedSQLConfigs` 2. Update docs for the Avro datasource <img width="982" alt="Screenshot 2021-02-17 at 21 04 26" src="https://user-images.githubusercontent.com/1580697/108249890-abed7180-7166-11eb-8cb7-0c246d2a34fc.png"> ### Why are the changes needed? The config exists for enough time. We can deprecate it, and recommend users to use `.format("avro")` instead. ### Does this PR introduce _any_ user-facing change? Should not except of the warning with the recommendation to use the `avro` format. ### How was this patch tested? 1. By generating docs via: ``` $ SKIP_API=1 SKIP_SCALADOC=1 SKIP_PYTHONDOC=1 SKIP_RDOC=1 jekyll serve --watch ``` 2. Manually checking the warning: ``` scala> spark.conf.set("spark.sql.legacy.replaceDatabricksSparkAvro.enabled", false) 21/02/17 21:20:18 WARN SQLConf: The SQL config 'spark.sql.legacy.replaceDatabricksSparkAvro.enabled' has been deprecated in Spark v3.2 and may be removed in the future. Use `.format("avro")` in `DataFrameWriter` or `DataFrameReader` instead. ``` Closes #31578 from MaxGekk/deprecate-replaceDatabricksSparkAvro. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
This commit is contained in:
parent
bdcad33d8b
commit
7b549c3e53
|
@ -295,6 +295,7 @@ Configuration of Avro can be done using the `setConf` method on SparkSession or
|
|||
<td>
|
||||
If it is set to true, the data source provider <code>com.databricks.spark.avro</code> is mapped
|
||||
to the built-in but external Avro data source module for backward compatibility.
|
||||
<br><b>Note:</b> the SQL config has been deprecated in Spark 3.2 and might be removed in the future.
|
||||
</td>
|
||||
<td>2.4.0</td>
|
||||
</tr>
|
||||
|
|
|
@ -3145,7 +3145,9 @@ object SQLConf {
|
|||
DeprecatedConfig(AVRO_REBASE_MODE_IN_WRITE.alternatives.head, "3.2",
|
||||
s"Use '${AVRO_REBASE_MODE_IN_WRITE.key}' instead."),
|
||||
DeprecatedConfig(AVRO_REBASE_MODE_IN_READ.alternatives.head, "3.2",
|
||||
s"Use '${AVRO_REBASE_MODE_IN_READ.key}' instead.")
|
||||
s"Use '${AVRO_REBASE_MODE_IN_READ.key}' instead."),
|
||||
DeprecatedConfig(LEGACY_REPLACE_DATABRICKS_SPARK_AVRO_ENABLED.key, "3.2",
|
||||
"""Use `.format("avro")` in `DataFrameWriter` or `DataFrameReader` instead.""")
|
||||
)
|
||||
|
||||
Map(configs.map { cfg => cfg.key -> cfg } : _*)
|
||||
|
|
Loading…
Reference in a new issue