cloud-fan commented on a change in pull request #26716: [SPARK-30083][SQL] 
visitArithmeticUnary should wrap PLUS case with UnaryPositive for type checking

 File path: docs/
 @@ -254,6 +254,8 @@ license: |
+    - Since Spark 3.0, the unary arithmetic operator plus(`+`) only accepts 
string, numeric and interval type values as inputs. Besides, `+` with a 
integral string representation will be coerced to double value, e.g. `+'1'` 
results `1.0`. In Spark version 2.4 and earlier,  there is no type checking for 
it, thus, all type values with a `+` prefix are valid, e.g. `+ array(1, 2)` is 
valid and results `[1, 2]`. Besides, there is no implicit type coercion for `+` 
with string, e.g. in Spark 2.4, the result of `+'1'` is string `1`.
 Review comment:
   BTW it's worth mention that, in 2.4 the unary plus operator is ignored. 
There is no type coercion at all, not only for string type.

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:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to