From cc2bdc118cb12af5307a345faa049803b1f5013e Mon Sep 17 00:00:00 2001 From: sjgllgh Date: Fri, 22 Dec 2023 09:15:01 +0000 Subject: [PATCH] When reading data using JDBC, add support for the smallint and tinyint data types --- .../scala/org/apache/linkis/ujes/jdbc/UJESSQLResultSet.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/UJESSQLResultSet.scala b/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/UJESSQLResultSet.scala index 0ed47925c6..dd5ace50e7 100644 --- a/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/UJESSQLResultSet.scala +++ b/linkis-computation-governance/linkis-jdbc-driver/src/main/scala/org/apache/linkis/ujes/jdbc/UJESSQLResultSet.scala @@ -244,6 +244,8 @@ class UJESSQLResultSet( case null => throw new LinkisSQLException(LinkisSQLErrorCode.METADATA_EMPTY) case "char" | "varchar" | "nvarchar" | "string" => value case "short" => value.toShort + case "smallint" => value.toShort + case "tinyint" => value.toShort case "int" => value.toInt case "long" => value.toLong case "float" => value.toFloat