yashmayya commented on code in PR #15263: URL: https://github.com/apache/pinot/pull/15263#discussion_r2000358188
########## pinot-query-planner/src/test/resources/queries/JoinPlans.json: ########## @@ -405,10 +405,10 @@ "\nLogicalProject(col1=[$0])", "\n LogicalJoin(condition=[AND(=($0, $3), =($1, $4), >($2, $5))], joinType=[inner])", "\n PinotLogicalExchange(distribution=[hash[0, 1]])", - "\n LogicalProject(col1=[$0], col2=[$1], col4=[$3])", + "\n LogicalProject(col1=[$0], col2=[$1], EXPR$0=[CAST($3):DECIMAL(1000, 982) NOT NULL])", Review Comment: Seems somehow related to [this](https://github.com/apache/pinot/blob/22fde8d9280ec03e7f7613d18c1325f6035771d9/pinot-query-planner/src/main/java/org/apache/pinot/query/type/TypeSystem.java#L37-L47) (https://github.com/apache/pinot/pull/11151) because the values in the cast in this plan change depending on the values there. But even removing those overrides altogether (`deriveDecimal*Type`) results in a cast of `DECIMAL(1000, 980)` being added so there's something else going on here from the Calcite side as well. `a.col4` is a `BIG_DECIMAL` type column to which we're applying the default scale and precision of 1000 (each); if we use an `INTEGER` column instead (`a.col3`) the cast used is `DECIMAL(19, 1)` which makes sense because on the other side we're multiplying 0.5 with a `BIGINT` value (result of the sum). -- 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