spark icon indicating copy to clipboard operation
spark copied to clipboard

[SPARK-49695][SQL] Postgres fix xor push-down

Open andrej-db opened this issue 5 months ago • 4 comments

What changes were proposed in this pull request?

This PR fixes the pushdown of ^ operator (XOR operator) for Postgres. Those two databases use this as exponent, rather then bitwise xor.

Fix is consisted of overriding the SQLExpressionBuilder to replace the '^' character with '#'.

Why are the changes needed?

Result is incorrect.

Does this PR introduce any user-facing change?

Yes. The user will now have a proper translation of the ^ operator.

How was this patch tested?

Was this patch authored or co-authored using generative AI tooling?

No.

andrej-db avatar Sep 18 '24 10:09 andrej-db