yashmayya commented on code in PR #13616:
URL: https://github.com/apache/pinot/pull/13616#discussion_r1682023711
##########
pinot-query-planner/src/test/java/org/apache/pinot/query/type/TypeFactoryTest.java:
##########
@@ -58,20 +58,8 @@ public Iterator<Object[]> relDataTypeConversion() {
basicType = TYPE_FACTORY.createSqlType(SqlTypeName.BIGINT);
break;
}
- // Map float and double to the same RelDataType so that queries like
- // `select count(*) from table where aFloatColumn = 0.05` works
correctly in multi-stage query engine.
- //
- // If float and double are mapped to different RelDataType,
- // `select count(*) from table where aFloatColumn = 0.05` will be
converted to
- // `select count(*) from table where CAST(aFloatColumn as "DOUBLE") =
0.05`. While casting
- // from float to double does not always produce the same double value
as the original float value, this leads to
- // wrong query result.
- //
- // With float and double mapped to the same RelDataType, the behavior
in multi-stage query engine will be the
- // same as the query in v1 query engine.
case FLOAT: {
- basicType = TYPE_FACTORY.createSqlType(SqlTypeName.DOUBLE);
- arrayType = TYPE_FACTORY.createSqlType(SqlTypeName.REAL);
Review Comment:
Good point, done.
--
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]