xiaochen-zhou commented on code in PR #4132:
URL: https://github.com/apache/calcite/pull/4132#discussion_r1908355396
##########
core/src/main/java/org/apache/calcite/sql/dialect/PrestoSqlDialect.java:
##########
@@ -146,7 +148,14 @@ private static void unparseUsingLimit(SqlWriter writer,
@Nullable SqlNode offset
}
@Override public @Nullable SqlNode getCastSpec(RelDataType type) {
- return super.getCastSpec(type);
+ switch (type.getSqlTypeName()) {
+ // PRESTO only supports REALăDOUBLE for floating point types.
+ case FLOAT:
+ return new SqlDataTypeSpec(
+ new SqlBasicTypeNameSpec(SqlTypeName.DOUBLE, SqlParserPos.ZERO),
SqlParserPos.ZERO);
Review Comment:
Calcite FLOAT and DOUBLE are the same type,

--
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]