Skip to content

[QST] - Can this be forced to an int and not bigint? #5331

Answered by revans2
eyalhir74 asked this question in General
Discussion options

You must be logged in to vote

I guess reducing the amount of memory and ops, by handling shorts/bytes/ints and not long, helps the CPU as well.

Actually the CPU UnsafeRow format stores everything smaller than 64-bit in a 64-bit memory location. So it does not actually help with CPU memory utilization nearly as much as you would hope.

What do you mean in newer spark versions?

Apache Spark 3.2.0 and above stopped inserting in the explicit cast before the sum.

Should I use a newer one to get this change?

We have seen a lot of performance improvements in Spark 3.2.x. I would recommend checking it out mostly for things like DPP and AQE. The cast modification is a really a minor change. I would not worry about it. I j…

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sameerz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #4905 on April 27, 2022 15:29.