loredanacirstea opened a new issue #10187:
URL: https://github.com/apache/arrow/issues/10187
After concatenating two tables, their row indexes are not recalculated. This
is counter intuitive, so I suspect it is a bug. In the example below I would
have expected that "name1" row has index 0 and "name2" row has index 1. Now,
they both have rowIndex 0, hence the index given by scan has no utility.
```
const AType = new Struct([Field.new({ name: "name", type: new Utf8() })])
const table1 = Table.from({
type: AType,
values: [{name:"name1"}]
})
const table2 = Table.from({
type: AType,
values: [{name:"name2"}]
})
const table3 = table1.concat(table2);
// 0 0
console.log(table3.get(0)[Symbol.for('rowIndex')],
table3.get(1)[Symbol.for('rowIndex')])
table3.filter(predicate.col('name').eq('name2')).scan((idx, batch) => {
// 0 Row {name: "name1", Symbol(rowIndex): 0, 0: "name1"}
console.log('idx', idx, table3.get(idx));
})
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]