srowen commented on a change in pull request #22807: [SPARK-25811][PySpark] 
Raise a proper error when unsafe cast is detected by PyArrow
URL: https://github.com/apache/spark/pull/22807#discussion_r246813366
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
 ##########
 @@ -1331,6 +1331,16 @@ object SQLConf {
       .booleanConf
       .createWithDefault(true)
 
+  val PANDAS_ARROW_SAFE_TYPE_CONVERSION =
+    buildConf("spark.sql.execution.pandas.arrowSafeTypeConversion")
+      .internal()
+      .doc("When true, enabling Arrow do safe type conversion check when 
converting" +
+        "Pandas.Series to Arrow Array during serialization. Arrow will raise 
errors " +
+        "when detecting unsafe type conversion. When false, disabling Arrow's 
type " +
+        "check and do type conversions anyway.")
+      .booleanConf
+      .createWithDefault(true)
 
 Review comment:
   I'd favor true by default. Do we even need this flag? As in many such cases, 
I'm just not clear a) how a user would find this option and b) when they would 
disable it. Disabling allows something to continue that is going to also fail 
or give an incorrect answer, right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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