MaxGekk commented on a change in pull request #32121:
URL: https://github.com/apache/spark/pull/32121#discussion_r611205596



##########
File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
##########
@@ -122,6 +124,12 @@ private[hive] class SparkExecuteStatementOperation(
           timeFormatters)
       case _: ArrayType | _: StructType | _: MapType | _: UserDefinedType[_] =>
         to += toHiveString((from.get(ordinal), dataTypes(ordinal)), false, 
timeFormatters)
+      case YearMonthIntervalType =>

Review comment:
       If I do as you propose, I get the exception on my test:
   ```
   [info]   Cause: java.lang.ClassCastException: java.lang.String cannot be 
cast to org.apache.hadoop.hive.common.type.HiveIntervalDayTime
   [info]   at 
org.apache.hive.service.cli.ColumnValue.toTColumnValue(ColumnValue.java:174)
   [info]   at 
org.apache.hive.service.cli.RowBasedSet.addRow(RowBasedSet.java:60)
   [info]   at 
org.apache.hive.service.cli.RowBasedSet.addRow(RowBasedSet.java:32)
   ```
   at
   ```java
       case INTERVAL_YEAR_MONTH_TYPE:
         return stringValue((HiveIntervalYearMonth) value);
       case INTERVAL_DAY_TIME_TYPE:
         return stringValue((HiveIntervalDayTime) value);
   ```
   Probably, I could just replace the casting by string casting. Let me try.




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to