cloud-fan commented on a change in pull request #29303:
URL: https://github.com/apache/spark/pull/29303#discussion_r464379318
##########
File path:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -141,17 +179,17 @@ private[hive] class SparkGetColumnsOperation(
column.name, // COLUMN_NAME
toJavaSQLType(column.dataType.sql).asInstanceOf[AnyRef], // DATA_TYPE
column.dataType.sql, // TYPE_NAME
- null, // COLUMN_SIZE
+ getColumnSize(column.dataType).map(_.asInstanceOf[AnyRef]).orNull,
// COLUMN_SIZE
null, // BUFFER_LENGTH, unused
- null, // DECIMAL_DIGITS
- null, // NUM_PREC_RADIX
+
getDecimalDigits(column.dataType).map(_.asInstanceOf[AnyRef]).orNull, //
DECIMAL_DIGITS
+ getNumPrecRadix(column.dataType).map(_.asInstanceOf[AnyRef]).orNull,
// NUM_PREC_RADIX
(if (column.nullable) 1 else 0).asInstanceOf[AnyRef], // NULLABLE
column.getComment().getOrElse(""), // REMARKS
null, // COLUMN_DEF
null, // SQL_DATA_TYPE
null, // SQL_DATETIME_SUB
null, // CHAR_OCTET_LENGTH
- null, // ORDINAL_POSITION
+ pos.asInstanceOf[AnyRef], // ORDINAL_POSITION
"YES", // IS_NULLABLE
Review comment:
Should this respect `column.nullable`?
----------------------------------------------------------------
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]