From ba55aeb7f2922c77058315792c911787abd9b661 Mon Sep 17 00:00:00 2001 From: samcchen Date: Sun, 24 Mar 2024 18:46:35 +0800 Subject: [PATCH] [Feature] Support clickhouse jdbc datasource(#40894) --- .../src/main/java/com/starrocks/udf/UDFHelper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java-extensions/udf-extensions/src/main/java/com/starrocks/udf/UDFHelper.java b/java-extensions/udf-extensions/src/main/java/com/starrocks/udf/UDFHelper.java index 6032ea35f94308..847dc5cfcc13cc 100644 --- a/java-extensions/udf-extensions/src/main/java/com/starrocks/udf/UDFHelper.java +++ b/java-extensions/udf-extensions/src/main/java/com/starrocks/udf/UDFHelper.java @@ -343,7 +343,13 @@ public static void getResultFromBoxedArray(int type, int numRows, Object boxedRe break; } case TYPE_DATE:{ - getStringDateResult(numRows, (Date[]) boxedResult, columnAddr); + if (boxedResult instanceof Date[]) { + getStringDateResult(numRows, (Date[]) boxedResult, columnAddr); + } else if(boxedResult instanceof String[]){ + getStringBoxedResult(numRows, (String[]) boxedResult, columnAddr); + }else { + throw new UnsupportedOperationException("unsupported type:" + boxedResult); + } break; } default: