This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch branch-1.10
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.10 by this push:
new 9a0f28fead [KYUUBI #6828][FOLLOWUP] Fix NPE in
KyuubiBaseResultSet::getBigDecimal
9a0f28fead is described below
commit 9a0f28fead36f6df18c1e54786f7a07c761f3b42
Author: Wang, Fei <[email protected]>
AuthorDate: Tue Apr 22 20:46:43 2025 -0700
[KYUUBI #6828][FOLLOWUP] Fix NPE in KyuubiBaseResultSet::getBigDecimal
### Why are the changes needed?
It is missed in #6828
https://github.com/apache/hive/blob/733d4f09011f27bea17a5301537a9c6174f28874/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java#L151-L159
### How was this patch tested?
Minor change.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #7038 from turboFei/fixNPE.
Closes #6828
2785e97be [Wang, Fei] Fix NPE
Authored-by: Wang, Fei <[email protected]>
Signed-off-by: Wang, Fei <[email protected]>
(cherry picked from commit f0c31e2f78d991f9b36329499e48db54ff8a5a5a)
Signed-off-by: Wang, Fei <[email protected]>
---
.../src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiBaseResultSet.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiBaseResultSet.java
b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiBaseResultSet.java
index d9576a2986..ffc3008cf3 100644
---
a/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiBaseResultSet.java
+++
b/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiBaseResultSet.java
@@ -67,6 +67,9 @@ public abstract class KyuubiBaseResultSet implements
SQLResultSet {
@Override
public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
final Object val = getObject(columnIndex);
+ if (val == null) {
+ return null;
+ }
if (val instanceof BigDecimal) {
return (BigDecimal) val;
}