You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2023/03/16 05:24:40 UTC

[GitHub] [arrow] wgtmac opened a new pull request, #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

wgtmac opened a new pull request, #34580:
URL: https://github.com/apache/arrow/pull/34580

   ### Rationale for this change
   
   `NoCompressionCodec` does not complain about an unsupported codec type. `ArrowFileReader` uses `NoCompressionCodec` by default and fails to decompress a compressed arrow file.
   
   ### What changes are included in this PR?
   
   `NoCompressionCodec` throws if unsupported codec type has been requested.
   
   ### Are these changes tested?
   
   Make sure all tests pass.
   
   ### Are there any user-facing changes?
   
   No.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34580:
URL: https://github.com/apache/arrow/pull/34580#issuecomment-1471338330

   :warning: GitHub issue #34432 **has been automatically assigned in GitHub** to PR creator.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wgtmac commented on a diff in pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #34580:
URL: https://github.com/apache/arrow/pull/34580#discussion_r1138484592


##########
java/vector/src/main/java/org/apache/arrow/vector/compression/NoCompressionCodec.java:
##########
@@ -61,6 +61,10 @@ public static class Factory implements CompressionCodec.Factory {
 
     @Override
     public CompressionCodec createCodec(CompressionUtil.CodecType codecType) {
+      if (codecType != CompressionUtil.CodecType.NO_COMPRESSION) {
+        throw new IllegalArgumentException(
+            "Unsupported codec type: " + codecType + " for NoCompressionCodec");

Review Comment:
   Sounds good. I have refined the error message.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wgtmac commented on pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #34580:
URL: https://github.com/apache/arrow/pull/34580#issuecomment-1472095638

   A simple round-trip test has been added. Mind take a look again? @lidavidm 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] davisusanibar commented on a diff in pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "davisusanibar (via GitHub)" <gi...@apache.org>.
davisusanibar commented on code in PR #34580:
URL: https://github.com/apache/arrow/pull/34580#discussion_r1138460739


##########
java/vector/src/main/java/org/apache/arrow/vector/compression/NoCompressionCodec.java:
##########
@@ -61,6 +61,10 @@ public static class Factory implements CompressionCodec.Factory {
 
     @Override
     public CompressionCodec createCodec(CompressionUtil.CodecType codecType) {
+      if (codecType != CompressionUtil.CodecType.NO_COMPRESSION) {
+        throw new IllegalArgumentException(
+            "Unsupported codec type: " + codecType + " for NoCompressionCodec");

Review Comment:
   How about recommending add compression module if codec type is ZSTD_FRAME or LZ4_FRAME? If not, an exception will be thrown.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wgtmac commented on pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #34580:
URL: https://github.com/apache/arrow/pull/34580#issuecomment-1472209924

   Thanks @davisusanibar @lidavidm for the review!


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm commented on pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #34580:
URL: https://github.com/apache/arrow/pull/34580#issuecomment-1471834462

   nit: can we add a unit test, if possible one that tries to read in a compressed file with the wrong codec type?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wgtmac commented on pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #34580:
URL: https://github.com/apache/arrow/pull/34580#issuecomment-1471491627

   @lidavidm Please take a look, thanks!


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #34580:
URL: https://github.com/apache/arrow/pull/34580#issuecomment-1472715918

   Benchmark runs are scheduled for baseline = 427f1b649e36ef3c64dd61ed86808463a440eb94 and contender = f32c27b470beb495c06bae1219b0256998728780. f32c27b470beb495c06bae1219b0256998728780 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/e2e45921c6b84ef4a841005f5d4d07f0...05bea9bb51a64c7596344b0ff017b0f8/)
   [Finished :arrow_down:0.24% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/f5b46d91df044acc8a8d2d0d97abb361...8be7818582044c508c2a463d767d8d10/)
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/b23af1ff504048f3b15aa49621d8b7ea...5818c87cfdb240099a34d528731c4487/)
   [Finished :arrow_down:1.23% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/75c3d62ba1534602a493b33071560534...0625104be3dd4bb6ababd70c52fa9a16/)
   Buildkite builds:
   [Finished] [`f32c27b4` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2532)
   [Finished] [`f32c27b4` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2562)
   [Finished] [`f32c27b4` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2530)
   [Finished] [`f32c27b4` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2553)
   [Finished] [`427f1b64` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2531)
   [Finished] [`427f1b64` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2561)
   [Finished] [`427f1b64` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2529)
   [Finished] [`427f1b64` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2552)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] lidavidm merged pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm merged PR #34580:
URL: https://github.com/apache/arrow/pull/34580


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #34580: GH-34432: [Java] NoCompressionCodec throws for unsupported codec type

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34580:
URL: https://github.com/apache/arrow/pull/34580#issuecomment-1471338288

   * Closes: #34432


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org