You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zhangstar333 (via GitHub)" <gi...@apache.org> on 2023/02/21 02:08:44 UTC
[GitHub] [doris] zhangstar333 commented on a diff in pull request #16958: [BugFix](Jdbc Catalog) Fix null pointer exception in JdbcExecutor
zhangstar333 commented on code in PR #16958:
URL: https://github.com/apache/doris/pull/16958#discussion_r1112464804
##########
fe/java-udf/src/main/java/org/apache/doris/udf/JdbcExecutor.java:
##########
@@ -315,11 +316,19 @@ private void shortPutToByte(Object[] column, boolean isNullable, int numRows, lo
public void copyBatchTinyIntResult(Object columnObj, boolean isNullable, int numRows, long nullMapAddr,
long columnAddr) {
Object[] column = (Object[]) columnObj;
- if (column[0] instanceof BigDecimal) {
+ int firstNotNullIndex = 0;
+ if (isNullable) {
+ firstNotNullIndex = getFirstNotNullObject(column, numRows, nullMapAddr);
+ }
Review Comment:
here, if the column all data is null, so the firstNotNullIndex==numRows, and then check column[firstNotNullIndex], will be out of range?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org