edgarRd commented on a change in pull request #227: ORC column map fix
URL: https://github.com/apache/incubator-iceberg/pull/227#discussion_r299275037
##########
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:
Yeah, this part creates a default column mapping using position (relative to
the flattened ORC schema) as well to assign IDs. I've added a `TODO` item to
add the checks for nulls to determine whether columns are `required` or
`optional`.
----------------------------------------------------------------
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]