MaxGekk opened a new pull request #27645: 
[SPARK-29930][SPARK-30416][SQL][FOLLOWUP] Move deprecated/removed config checks 
from RuntimeConfig to SQLConf
URL: https://github.com/apache/spark/pull/27645
 
 
   ### What changes were proposed in this pull request?
   - Output warnings for deprecated SQL configs in `SQLConf. 
setConfWithCheck()` and in `SQLConf. unsetConf()`
   - Throw an exception for removed SQL configs in `SQLConf. 
setConfWithCheck()` when they set to non-default values
   - Remove checking of deprecated and removed SQL configs from RuntimeConfig
   
   ### Why are the changes needed?
   Currently, warnings/exceptions are printed only when a SQL config is set 
dynamically, for instance via `spark.conf.set()`. After the changes, 
removed/deprecated SQL configs will be checked when they set statically. For 
example:
   ```
   $ bin/spark-shell --conf spark.sql.fromJsonForceNullableSchema=false
   scala> spark.emptyDataFrame
   java.lang.IllegalArgumentException: Error while instantiating 
'org.apache.spark.sql.hive.HiveSessionStateBuilder':
   ...
   Caused by: org.apache.spark.sql.AnalysisException: The SQL config 
'spark.sql.fromJsonForceNullableSchema' was removed in the version 3.0.0. It 
was removed to prevent errors like SPARK-23173 for non-default value.
   ```
   ```
   $ bin/spark-shell --conf spark.sql.hive.verifyPartitionPath=false
   scala> spark.emptyDataFrame
   20/02/20 02:10:26 WARN SQLConf: The SQL config 
'spark.sql.hive.verifyPartitionPath' has been deprecated in Spark v3.0 and may 
be removed in the future. This config is replaced by 
'spark.files.ignoreMissingFiles'.
   ```
   
   ### Does this PR introduce any user-facing change?
   Yes
   
   ### How was this patch tested?
   By `SQLConfSuite`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to