rdblue commented on a change in pull request #227: ORC column map fix
URL: https://github.com/apache/incubator-iceberg/pull/227#discussion_r296334708
##########
File path: orc/src/main/java/org/apache/iceberg/orc/OrcIterable.java
##########
@@ -59,10 +59,17 @@
@SuppressWarnings("unchecked")
@Override
public Iterator<T> iterator() {
+ final Reader orcFileReader = newFileReader(file, config);
+ final ColumnMap colMapping =
orcFileReader.hasMetadataValue(ORC.COLUMN_NUMBERS_ATTRIBUTE) ?
+ ColumnMap.deserialize(orcFileReader.getSchema(),
+ orcFileReader.getMetadataValue(ORC.COLUMN_NUMBERS_ATTRIBUTE)) :
new ColumnMap();
Review comment:
This is a good place for a "TODO" comment for adding a default mapping. In
Parquet, for example, when there are no IDs, we assign IDs using position to
read older data. This would also need to check whether each column has a null
value and set the required/optional flag for the column correctly.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]