Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use ThriftserverShimUtils to show support Type
  • Loading branch information
AngersZhuuuu committed Sep 6, 2019
commit aa1d7213b67dba4161ebd51f3cd7ec519acd4d9d
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import org.apache.hive.service.cli.session.HiveSession

import org.apache.spark.internal.Logging
import org.apache.spark.sql.SQLContext
import org.apache.spark.sql.hive.thriftserver.cli.Type
import org.apache.spark.util.{Utils => SparkUtils}

/**
Expand Down Expand Up @@ -68,11 +67,11 @@ private[hive] class SparkGetTypeInfoOperation(
parentSession.getUsername)

try {
Type.values.foreach(typeInfo => {
ThriftserverShimUtils.supportedType().foreach(typeInfo => {
val rowData = Array[AnyRef](
typeInfo.getName, // TYPE_NAME
typeInfo.toJavaSQLType.asInstanceOf[AnyRef], // DATA_TYPE
typeInfo.getMaxPrecision.getOrElse(null).asInstanceOf[AnyRef], // PRECISION
typeInfo.getMaxPrecision.asInstanceOf[AnyRef], // PRECISION
typeInfo.getLiteralPrefix, // LITERAL_PREFIX
typeInfo.getLiteralSuffix, // LITERAL_SUFFIX
typeInfo.getCreateParams, // CREATE_PARAMS
Expand Down
Loading