Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitozi committed Nov 14, 2024
1 parent 286da6f commit 60c70ed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/content/maintenance/system-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,13 @@ the update before and update after will be packed in one row.
```
/*
+------------------+----------------------+-----------------------+
| rowkind | column_0 | column_1 |
| rowkind | column_0 | column_1 |
+------------------+----------------------+-----------------------+
| +I | [col_0, null] | [col_1, null] |
| +I | [col_0] | [col_1] |
+------------------+----------------------+-----------------------+
| +U | [col_0_ub, col_0_ua] | [col_1_ub, col_1_ua] |
+------------------+----------------------+-----------------------+
| -D | [col_0, null] | [col_1, null] |
| -D | [col_0] | [col_1] |
+------------------+----------------------+-----------------------+
*/
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,13 @@ private InternalRow convertToArray(
GenericRow row = new GenericRow(row1.getFieldCount());
for (int i = 0; i < row1.getFieldCount(); i++) {
Object o1 = fieldGetters[i].getFieldOrNull(row1);
Object o2 = null;
Object o2;
if (row2 != null) {
o2 = fieldGetters[i].getFieldOrNull(row2);
row.setField(i, new GenericArray(new Object[] {o1, o2}));
} else {
row.setField(i, new GenericArray(new Object[] {o1}));
}
row.setField(i, new GenericArray(new Object[] {o1, o2}));
}
// If no row2 provided, then follow the row1 kind.
if (row2 == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public void testBinlogTableStreamRead() throws Exception {
List<Row> rows = iterator.collect(3);
assertThat(rows)
.containsExactly(
Row.of("+I", new Integer[] {1, null}, new Integer[] {2, null}),
Row.of("+I", new Integer[] {1}, new Integer[] {2}),
Row.of("+U", new Integer[] {1, 1}, new Integer[] {2, 3}),
Row.of("+I", new Integer[] {2, null}, new Integer[] {2, null}));
Row.of("+I", new Integer[] {2}, new Integer[] {2}));
iterator.close();
}

Expand All @@ -60,7 +60,7 @@ public void testBinlogTableBatchRead() throws Exception {
List<Row> rows = sql("SELECT * FROM T$binlog /*+ OPTIONS('scan.mode' = 'latest') */");
assertThat(rows)
.containsExactly(
Row.of("+I", new Integer[] {1, null}, new Integer[] {3, null}),
Row.of("+I", new Integer[] {2, null}, new Integer[] {2, null}));
Row.of("+I", new Integer[] {1}, new Integer[] {3}),
Row.of("+I", new Integer[] {2}, new Integer[] {2}));
}
}

0 comments on commit 60c70ed

Please sign in to comment.