fanluoo commented on code in PR #3808:
URL: https://github.com/apache/calcite/pull/3808#discussion_r1625399135
##########
core/src/main/java/org/apache/calcite/sql/dialect/StarRocksSqlDialect.java:
##########
@@ -109,6 +109,20 @@ public StarRocksSqlDialect(Context context) {
@Override public @Nullable SqlNode getCastSpec(RelDataType type) {
switch (type.getSqlTypeName()) {
+ case INTEGER:
+ return new SqlDataTypeSpec(
+ new SqlAlienSystemTypeNameSpec(
+ "INT",
+ type.getSqlTypeName(),
+ SqlParserPos.ZERO),
+ SqlParserPos.ZERO);
+ case BIGINT:
+ return new SqlDataTypeSpec(
+ new SqlAlienSystemTypeNameSpec(
+ "BIGINT",
Review Comment:
> The BIGINT exists in SqlBasicTypeNameSpec. So maybe we can use :
SqlBasicTypeNameSpec like VARCHAR in MySQL dialect.
Thank you for your suggestion, but I am not very clear about the essential
difference between these two writing methods, or is the latter a standardized
writing method
--
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]