-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache short decimal type instances #14523
Cache short decimal type instances #14523
Conversation
I know this isn't very representative, as TPC-DS tables aren't very wide and my data set isn't comprised from a large number of files. Still, it's kind of surprising to see this show up in a profile, among code that does some IO. |
Most of that time is in the constructor of TypeSignature, and my guess is that it is related to all the validation and list processing. Caching is an ok workaround for now, but it doesn't solve the underlying problem (which is to fix/get rid of TypeSignature) |
https://github.com/trinodb/trino/actions/runs/3205780736/jobs/5240103859 fail may be not related
will retry |
filed #14526 |
@@ -42,7 +43,23 @@ | |||
{ | |||
private static final TypeOperatorDeclaration TYPE_OPERATOR_DECLARATION = extractOperatorDeclaration(ShortDecimalType.class, lookup(), long.class); | |||
|
|||
ShortDecimalType(int precision, int scale) | |||
private static final ShortDecimalType[][] shortDecimalTypes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize SHORT_DECIMAL_TYPES. I might just call it CACHE or INSTANCES, though.
When profiling Iceberg planning on TPC-DS data set, it was found out that 10% of time spend inside `TableStatisticsMaker` is actually spent inside `ShortDecimalType` constructor.
ed9cad1
to
b4b1f37
Compare
When profiling Iceberg planning on TPC-DS data set, it was found out that 10% of time spend inside
TableStatisticsMaker
is actually spent insideShortDecimalType
constructor.