lidavidm commented on code in PR #34873:
URL: https://github.com/apache/arrow/pull/34873#discussion_r1174222296
##########
java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowStreamWriter.java:
##########
@@ -76,12 +76,13 @@ public ArrowStreamWriter(VectorSchemaRoot root,
DictionaryProvider provider, Wri
* @param option IPC write options
* @param compressionFactory Compression codec factory
* @param codecType Codec type
+ * @param compressionLevel Compression level
* @param out WritableByteChannel for writing.
*/
public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider,
WritableByteChannel out,
IpcOption option, CompressionCodec.Factory
compressionFactory,
- CompressionUtil.CodecType codecType) {
Review Comment:
Ditto here.
##########
java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowWriter.java:
##########
@@ -72,7 +72,7 @@ protected ArrowWriter(VectorSchemaRoot root,
DictionaryProvider provider, Writab
}
protected ArrowWriter(VectorSchemaRoot root, DictionaryProvider provider,
WritableByteChannel out, IpcOption option) {
- this(root, provider, out, option, NoCompressionCodec.Factory.INSTANCE,
CompressionUtil.CodecType.NO_COMPRESSION);
+ this(root, provider, out, option, NoCompressionCodec.Factory.INSTANCE,
CompressionUtil.CodecType.NO_COMPRESSION, 3);
Review Comment:
Use a constant for the integer?
##########
java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowFileWriter.java:
##########
@@ -73,8 +73,8 @@ public ArrowFileWriter(VectorSchemaRoot root,
DictionaryProvider provider, Writa
public ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider,
WritableByteChannel out,
Map<String, String> metaData, IpcOption option,
CompressionCodec.Factory compressionFactory,
- CompressionUtil.CodecType codecType) {
- super(root, provider, out, option, compressionFactory, codecType);
+ CompressionUtil.CodecType codecType, int
compressionLevel) {
Review Comment:
Well, now this is a breaking change, since the old constructor isn't
available anymore.
##########
java/vector/src/main/java/org/apache/arrow/vector/ipc/ArrowWriter.java:
##########
@@ -119,6 +119,53 @@ protected ArrowWriter(VectorSchemaRoot root,
DictionaryProvider provider, Writab
this.schema = new Schema(fields, root.getSchema().getCustomMetadata());
}
+ /**
+ * Note: fields are not closed when the writer is closed.
+ *
+ * @param root the vectors to write to the output
+ * @param provider where to find the dictionaries
+ * @param out the output where to write
+ * @param option IPC write options
+ * @param compressionFactory Compression codec factory
+ * @param codecType Compression codec
+ * @param compressionLevel Compression level
+ */
+ protected ArrowWriter(VectorSchemaRoot root, DictionaryProvider provider,
WritableByteChannel out, IpcOption option,
Review Comment:
This now breaks compatibility. I don't think that's what Gang was suggesting
with a delegate constructor.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]