cloud-fan commented on pull request #30350:
URL: https://github.com/apache/spark/pull/30350#issuecomment-799671579
I found a behavior change here.
Before this commit
```
scala> sql("select conv(-100, 10, 10)").show(20, false)
+----------------------------------+
|conv(CAST(-100 AS STRING), 10, 10)|
+----------------------------------+
|18446744073709551516 |
+----------------------------------+
```
After this commit
```
scala> sql("select conv(-100, 10, 10)").show(20, false)
+------------------+
|conv(-100, 10, 10)|
+------------------+
|-100 |
+------------------+
```
If the `toBase` is positive, the result is unsigned. It's a bit hard to
reason about how to put a negative value into an unsigned value, but MySQL
returns the same result as before this commit and the overflow behavior seems
to be desirable. @AngersZhuuuu can you take a look?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]