FrankChen021 commented on issue #18010: URL: https://github.com/apache/druid/issues/18010#issuecomment-6465535228
@havefunatcode Currently if a string column is used on a numeric aggregator, druid implicitly convert it into numer. Simply rejecting a string column on nuemric aggregator would change existing behaviour that people may depeond on it. We can apply strict type check and reject implicit type conversion globally and require explicit type conversion from users, but this is broader change and may need wide discussion. Currently the problem is that string literal is not check whether they're numbers at planning time. I think we can put a check in `Aggregations.toDruidExpressionForNumericAggregator`, next to the existing implicit conversion for STRING columns. A string literal is converted the same way, but since its value is known at planning time, a literal that can’t be parsed as a number should throw `InvalidSqlInput` there. This covers all numeric aggregators, not just the quantile ones. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
