Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent NPE in Struct with Array that contains null elements #1107

Merged
merged 1 commit into from Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1550,15 +1550,15 @@ private Value getValue(int fieldIndex) {
Type elementType = fieldType.getArrayElementType();
switch (elementType.getCode()) {
case BOOL:
return Value.boolArray(value.getBooleanArray(fieldIndex));
return Value.boolArray(value.getBooleanList(fieldIndex));
case INT64:
return Value.int64Array(value.getLongArray(fieldIndex));
return Value.int64Array(value.getLongList(fieldIndex));
case STRING:
return Value.stringArray(value.getStringList(fieldIndex));
case BYTES:
return Value.bytesArray(value.getBytesList(fieldIndex));
case FLOAT64:
return Value.float64Array(value.getDoubleArray(fieldIndex));
return Value.float64Array(value.getDoubleList(fieldIndex));
case NUMERIC:
return Value.numericArray(value.getBigDecimalList(fieldIndex));
case DATE:
Expand Down