You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/09/11 12:47:44 UTC

[GitHub] [calcite] ffmax commented on a change in pull request #1443: [CALCITE-3282] HiveSqlDialect unparse Interger type as Int in order to be compatible for Hive1.x

ffmax commented on a change in pull request #1443: [CALCITE-3282] HiveSqlDialect unparse Interger type as Int in order to be compatible for Hive1.x
URL: https://github.com/apache/calcite/pull/1443#discussion_r323220324
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/sql/dialect/HiveSqlDialect.java
 ##########
 @@ -149,6 +127,22 @@ private void unparseTrim(SqlWriter writer, SqlCall call, int leftPrec,
   @Override public boolean supportsCharSet() {
     return false;
   }
+
+  @Override public SqlNode getCastSpec(final RelDataType type) {
+    if (type instanceof BasicSqlType) {
+      switch (type.getSqlTypeName()) {
+      case INTEGER:
+        final SqlBasicTypeNameSpec typeNameSpec = new SqlBasicTypeNameSpec(
+            INT,
+            type.getPrecision(),
+            type.getScale(),
 
 Review comment:
   Thx

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services