Skip to content

Commit

Permalink
[bugfix](paimon)paimon's field length judgment error (apache#35981)
Browse files Browse the repository at this point in the history
## Proposed changes

 Introduced from apache#35309
`fields.length` indicates the fields we want to read. If a table has 10
fields, but we only select a few fields, then the length of
`fields.length` will definitely be less than 10.
So the judgment condition here should be greater than.
  • Loading branch information
wuwenchi authored Jun 13, 2024
1 parent a0a0982 commit ba4b325
Show file tree
Hide file tree
Showing 3 changed files with 656 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void open() throws IOException {

private void initReader() throws IOException {
ReadBuilder readBuilder = table.newReadBuilder();
if (this.fields.length != this.paimonAllFieldNames.size()) {
if (this.fields.length > this.paimonAllFieldNames.size()) {
throw new IOException(
String.format(
"The jni reader fields' size {%s} is not matched with paimon fields' size {%s}."
Expand Down
Loading

0 comments on commit ba4b325

Please sign in to comment.