gortiz commented on code in PR #15263: URL: https://github.com/apache/pinot/pull/15263#discussion_r2015835850
########## pinot-query-planner/src/main/java/org/apache/pinot/query/type/TypeSystem.java: ########## @@ -62,16 +62,36 @@ public boolean shouldConvertRaggedUnionTypesToVarying() { return true; } + @Override + public int getMaxScale(SqlTypeName typeName) { + return typeName == SqlTypeName.DECIMAL ? MAX_DECIMAL_SCALE : super.getMaxScale(typeName); + } + @Override public int getMaxNumericScale() { return MAX_DECIMAL_SCALE; } + @Override + public int getDefaultScale(SqlTypeName typeName) { + return typeName == SqlTypeName.DECIMAL ? MAX_DECIMAL_SCALE : super.getDefaultScale(typeName); + } + + @Override + public int getMaxPrecision(SqlTypeName typeName) { + return typeName == SqlTypeName.DECIMAL ? MAX_DECIMAL_PRECISION : super.getMaxPrecision(typeName); + } + @Override public int getMaxNumericPrecision() { return MAX_DECIMAL_PRECISION; } + @Override + public int getDefaultPrecision(SqlTypeName typeName) { + return typeName == SqlTypeName.DECIMAL ? MAX_DECIMAL_PRECISION : super.getDefaultPrecision(typeName); Review Comment: Then, let's use other values larger than 10 without using the same value for precision and scale. I suggest using a precision that is at least twice the scale so we have enough room after and before the dot. Then, after this PR is merged, we can test the performance implications of using smaller precision and scale. If it is significantly better to use smaller values, open a new PR where the default precision and scale can be changed at startup time. -- 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. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org