Support Dwrf Sequence Ids in Writer#16037
Conversation
arunthirupathi
left a comment
There was a problem hiding this comment.
Left some minor comments, but the change looks good once they are addressed. I will approve them once they are addressed.
presto-orc/src/main/java/com/facebook/presto/orc/metadata/Stream.java
Outdated
Show resolved
Hide resolved
presto-orc/src/main/java/com/facebook/presto/orc/writer/ByteColumnWriter.java
Outdated
Show resolved
Hide resolved
presto-orc/src/main/java/com/facebook/presto/orc/stream/DecimalOutputStream.java
Outdated
Show resolved
Hide resolved
|
Can you please rebase on the latest master ? This change will have lot of merge conflicts with, 30cd883 |
0867ec0 to
ffb9aca
Compare
presto-orc/src/main/java/com/facebook/presto/orc/metadata/DwrfMetadataWriter.java
Outdated
Show resolved
Hide resolved
presto-orc/src/main/java/com/facebook/presto/orc/metadata/DwrfMetadataWriter.java
Outdated
Show resolved
Hide resolved
presto-orc/src/main/java/com/facebook/presto/orc/metadata/OrcMetadataReader.java
Outdated
Show resolved
Hide resolved
presto-orc/src/main/java/com/facebook/presto/orc/metadata/Stream.java
Outdated
Show resolved
Hide resolved
presto-orc/src/main/java/com/facebook/presto/orc/stream/LongOutputStream.java
Outdated
Show resolved
Hide resolved
fcf3ba4 to
f79a5d0
Compare
arunthirupathi
left a comment
There was a problem hiding this comment.
It looks good once both the comments are addressed.
presto-orc/src/main/java/com/facebook/presto/orc/metadata/DwrfMetadataWriter.java
Outdated
Show resolved
Hide resolved
presto-orc/src/main/java/com/facebook/presto/orc/writer/BooleanColumnWriter.java
Outdated
Show resolved
Hide resolved
ee7515e to
1ce3d07
Compare
There was a problem hiding this comment.
- stream will always call stream.toString() which will create garbage. Remove the + stream or use format specifier.
There was a problem hiding this comment.
Stream has custom toString already implemented.
There was a problem hiding this comment.
nit: use format instead of concat
There was a problem hiding this comment.
It will print the right details (some readable string, instead of some memory address), that is not a concern. Calling toString will create a temporary string and lot of string concatenation. We want to avoid that.
two ways to avoid it are
- Do not include the stream in the error message. less perfereable, as we will not see what stream failed.
- call checkArgument(condition, "some message {}", object). Here object.toString() will be only called condition is false and avoiding the garbage on the hot path.
There was a problem hiding this comment.
Done. Also fixed the checkArgument in toColumnEncoding() to use format instead of concat
presto-orc/src/main/java/com/facebook/presto/orc/metadata/DwrfMetadataReader.java
Outdated
Show resolved
Hide resolved
presto-orc/src/test/java/com/facebook/presto/orc/TestDecryption.java
Outdated
Show resolved
Hide resolved
Sequence Ids are used by Dwrf FlatMap implementations. This commit introduces sequence for DWRF writer. Following PR of flat map implementation will use this sequence id to add multiple streams per column.
Sequence Ids are used by Dwrf FlatMap implementations. This commit introduces sequence for DWRF writer.
Following PR of flat map implementation will use this sequence id to add multiple streams per column.