-
Notifications
You must be signed in to change notification settings - Fork 2
Add system tables functionality #14
Add system tables functionality #14
Conversation
# Conflicts: # mr/src/main/java/org/apache/iceberg/mr/IcebergInputFormat.java # mr/src/test/java/org/apache/iceberg/mr/TestIcebergInputFormat.java
…stream-wip-pr Prepare for upstream WIP PR
…ctors' into if-all-the-things
massdosage
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks pretty good
| import org.apache.iceberg.FileScanTask; | ||
| import org.apache.iceberg.Schema; | ||
| import org.apache.iceberg.StructLike; | ||
| import org.apache.iceberg.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to run the whole build as I'm sure the checkstyle plugin will moan about this.
| default: | ||
| throw new UnsupportedOperationException( | ||
| String.format("Cannot read %s file: %s", file.format().name(), file.path())); | ||
| String.format("Cannot read %s file: %s", file.format().name(), file.path())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous indentation here is more what Iceberg uses.
| .filter(task.residual()) | ||
| .caseSensitive(caseSensitive) | ||
| .split(task.start(), task.length()); | ||
| .read(inputFile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto for all the indentation changes here and below.
| List<Object[]> result = shell.executeStatement("SELECT * FROM source_db.table_a"); | ||
|
|
||
| assertEquals(3, result.size()); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the @ignore annotations from the tests below?
| .toString()); | ||
|
|
||
| List<Object[]> result = shell.executeStatement("SELECT * FROM source_db.table_a__snapshots"); | ||
| List<Object[]> result = shell.executeStatement("SELECT * FROM source_db.table_a"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything we can verify to check that it actually read a history table rather than just a normal table? Are there some fields that are unique to the history who's values we can check?
|
|
||
| List<Object[]> result = shell.executeStatement("SELECT * FROM source_db.table_a"); | ||
|
|
||
| assertEquals(3, result.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything we can verify to check that it actually read a snapshot table rather than just a normal table? Are there some fields that are unique to the snapshot who's values we can check?
massdosage
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this branch into an EG branch so it can be worked on from within this org
This PR is based on feedback from the IF PR.
SnapshotIterableclass entirelySnapshotstable and theHistorytable for now(Also apologies about the formatting changes, I'll revert those)