Dustin Smith created SPARK-62352:
------------------------------------
Summary: Compare decimals without building a Scala BigDecimal
Key: SPARK-62352
URL: https://issues.apache.org/jira/browse/SPARK-62352
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 5.0.0
Reporter: Dustin Smith
When a decimal stored as a long is compared with one stored as a BigDecimal,
{{Decimal.compare}} builds a Scala {{BigDecimal}} for the long on every call.
Decimal literals are stored as a BigDecimal, so a filter such as {{n IN (1.50,
2.50, ...)}} on a {{DECIMAL(15,2)}} column pays for this once per literal per
row.
Going through {{java.math.BigDecimal}} gives the same answer with much less
work.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]