Skip to content

Commit

Permalink
fix meta field compatibility in partition info table
Browse files Browse the repository at this point in the history
Signed-off-by: chenxu <[email protected]>
  • Loading branch information
dmetasoul01 committed Oct 8, 2023
1 parent df5aa7e commit f315b45
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ public static PartitionInfo partitionInfoFromResultSet(ResultSet rs) throws SQLE
.setTimestamp(rs.getLong("timestamp"));
Array snapshotArray = rs.getArray("snapshot");
partitionInfo.addAllSnapshot(Arrays.stream((UUID[]) snapshotArray.getArray()).map(DBUtil::toProtoUuid).collect(Collectors.toList()));
partitionInfo.setExpression(rs.getString("expression"));
String expr = rs.getString("expression");
partitionInfo.setExpression(expr == null ? "" : expr);
return partitionInfo.build();
}

Expand All @@ -617,7 +618,8 @@ public static PartitionInfo partitionInfoFromResultSetWithoutTimestamp(ResultSet
.setCommitOp(CommitOp.valueOf(rs.getString("commit_op")));
Array snapshotArray = rs.getArray("snapshot");
partitionInfo.addAllSnapshot(Arrays.stream((UUID[]) snapshotArray.getArray()).map(DBUtil::toProtoUuid).collect(Collectors.toList()));
partitionInfo.setExpression(rs.getString("expression"));
String expr = rs.getString("expression");
partitionInfo.setExpression(expr == null ? "" : expr);
return partitionInfo.build();
}
}

0 comments on commit f315b45

Please sign in to comment.