walterddr commented on code in PR #10814:
URL: https://github.com/apache/pinot/pull/10814#discussion_r1228464036
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/RelToPlanNodeConverter.java:
##########
@@ -209,8 +209,8 @@ public static DataSchema.ColumnDataType
convertToColumnDataType(RelDataType relD
case DECIMAL:
return resolveDecimal(relDataType);
case FLOAT:
- return isArray ? DataSchema.ColumnDataType.FLOAT_ARRAY :
DataSchema.ColumnDataType.FLOAT;
case REAL:
+ return isArray ? DataSchema.ColumnDataType.FLOAT_ARRAY :
DataSchema.ColumnDataType.FLOAT;
Review Comment:
let's add a comment --> this is where we convert from Calcite's REAL data
type to Pinot's FLOAT data type
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/type/TypeFactory.java:
##########
@@ -60,8 +60,8 @@ private RelDataType toRelDataType(FieldSpec fieldSpec) {
return fieldSpec.isSingleValueField() ?
createSqlType(SqlTypeName.BIGINT)
: createArrayType(createSqlType(SqlTypeName.BIGINT), -1);
case FLOAT:
- return fieldSpec.isSingleValueField() ?
createSqlType(SqlTypeName.FLOAT)
- : createArrayType(createSqlType(SqlTypeName.FLOAT), -1);
+ return fieldSpec.isSingleValueField() ? createSqlType(SqlTypeName.REAL)
+ : createArrayType(createSqlType(SqlTypeName.REAL), -1);
Review Comment:
add comments: this is where we convert the Pinot's FLOAT data type to
Calcite's REAL data type, b/c calcite's FLOAT is actually "DOUBLE", we have to
make sure calcite understands the precision/scale configuration of Pinot's
FLOAT is actually Calcite's REAL.
--
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]