Skip to content

Commit 402fe8a

Browse files
committed
fix: the npe of ReorderableStruct reorder method
1 parent c050fc1 commit 402fe8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

odps-sdk/odps-sdk-core/src/main/java/com/aliyun/odps/data/ReorderableStruct.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ public synchronized void reorder(StructTypeInfo orderedType) {
119119
}
120120

121121
public static Object reorderNestedType(Object value, TypeInfo oldTypeInfo, TypeInfo newTypeInfo) {
122+
if (value == null) {
123+
return null;
124+
}
122125
if (oldTypeInfo != null && oldTypeInfo.getOdpsType() != newTypeInfo.getOdpsType()) {
123126
throw new IllegalArgumentException("The nested type is not compatible");
124127
}

0 commit comments

Comments
 (0)