Skip to content

Commit

Permalink
[Feature] Suppor††t clickhouse jdbc datasource(StarRocks#40894)
Browse files Browse the repository at this point in the history
  • Loading branch information
DataScientistSamChan committed Mar 24, 2024
1 parent 115fb8a commit 7706785
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public class UDFHelper {
private static final ThreadLocal<DateFormat> formatter =
ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
private static final DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");

private static final TimeZone timeZone = TimeZone.getDefault();

private static void getBooleanBoxedResult(int numRows, Boolean[] boxedArr, long columnAddr) {
Expand Down Expand Up @@ -233,7 +235,7 @@ private static void getStringLocalDateResult(int numRows, LocalDate[] column, lo
String[] results = new String[numRows];
for (int i = 0; i < numRows; i++) {
if (column[i] != null) {
results[i] = dateTimeFormatter.format(column[i]);
results[i] = dateFormatter.format(column[i]);
}
}
getStringBoxedResult(numRows, results, columnAddr);
Expand Down

0 comments on commit 7706785

Please sign in to comment.