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

[GitHub] [arrow] mapleFU opened a new pull request, #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ### What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Add `::arrow::MemoryPool` to Decoder builder.
   
   ### Are these changes tested?
   
   no
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ### Are there any user-facing changes?
   
   Parquet user can pass memory pool to decoder now
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
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] wjones127 commented on pull request #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   Test failure is unrelated.


-- 
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 #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   :warning: GitHub issue #34802 **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] github-actions[bot] commented on pull request #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   * Closes: #34802


-- 
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 #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   > Thanks for doing this. FYI we'd eventually like to make sure we are always passing down the right memory pool and guarantee it with unit tests #34058
   
   That's a good improvement!


-- 
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] mapleFU commented on a diff in pull request #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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


##########
cpp/src/parquet/encoding.cc:
##########
@@ -3417,7 +3417,8 @@ std::unique_ptr<Encoder> MakeEncoder(Type::type type_num, Encoding::type encodin
 }
 
 std::unique_ptr<Decoder> MakeDecoder(Type::type type_num, Encoding::type encoding,
-                                     const ColumnDescriptor* descr) {
+                                     const ColumnDescriptor* descr,
+                                     ::arrow::MemoryPool* pool) {

Review Comment:
   Some decoders, like `DeltaBitPacked` may requires a pool, so I added. Currently, Plain doesn't need a Pool



-- 
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] mapleFU commented on pull request #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   @wgtmac @wjones127 Mind take a look?
   
   By the way, this change the api for `MakeDecoder`, it's a `PARQUET_EXPORT` function. If it effects, I can add a new function like `MakeDecoderWithMemoryPool`


-- 
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] wjones127 merged pull request #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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


-- 
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 #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   ['Python', 'R'] benchmarks have high level of regressions.
   [test-mac-arm](https://conbench.ursa.dev/compare/runs/2d7116dc95e94e7f9fdfb44ba9e63897...0277e2980dc14ed89bfc7e16c532da18/)
   


-- 
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] mapleFU commented on pull request #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   ```
   =================================== FAILURES ===================================
   _____________________________ test_generic_options _____________________________
   
       @pytest.mark.requires_testing_data
       def test_generic_options():
           """Test setting generic client options."""
           certs = example_tls_certs()
       
           with ConstantFlightServer(tls_certificates=certs["certificates"]) as s:
               # Try setting a string argument that will make requests fail
               options = [("grpc.ssl_target_name_override", "fakehostname")]
               client = flight.connect(('localhost', s.port),
                                       tls_root_certs=certs["root_cert"],
                                       generic_options=options)
               with pytest.raises(flight.FlightUnavailableError):
                   client.do_get(flight.Ticket(b'ints'))
               client.close()
               # Try setting an int argument that will make requests fail
               options = [("grpc.max_receive_message_length", 32)]
               client = flight.connect(('localhost', s.port),
                                       tls_root_certs=certs["root_cert"],
                                       generic_options=options)
               with pytest.raises(pa.ArrowInvalid):
   >               client.do_get(flight.Ticket(b'ints'))
   
   /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyarrow/tests/test_flight.py:2049: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
   pyarrow/_flight.pyx:1560: in pyarrow._flight.FlightClient.do_get
       ???
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
   
   >   ???
   E   pyarrow._flight.FlightCancelledError: Flight cancelled call, with message: CANCELLED. gRPC client debug context: UNKNOWN:Error received from peer localhost:49550 {created_time:"2023-03-30T15:01:41.683403+00:00", grpc_status:1, grpc_message:"CANCELLED"}. Client context: IOError: Server never sent a data message. Detail: Internal
   
   pyarrow/_flight.pyx:62: FlightCancelledError
   ----------------------------- Captured stderr call -----------------------------
   E0330 15:01:41.652588000 1[231](https://github.com/apache/arrow/actions/runs/4565610290/jobs/8056976961?pr=34803#step:6:232)45583906816 ssl_transport_security.cc:1854] No match found for server name: fakehostname.
   E0330 15:01:41.663294000 123145583906816 ssl_transport_security.cc:1854] No match found for server name: fakehostname.
   =============================== warnings summary ===============================
   ```
   
   oops, seems not caused by me


-- 
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 #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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


##########
cpp/src/parquet/encoding.h:
##########
@@ -458,7 +459,8 @@ std::unique_ptr<DictDecoder<DType>> MakeDictDecoder(
 
 template <typename DType>
 std::unique_ptr<typename EncodingTraits<DType>::Decoder> MakeTypedDecoder(
-    Encoding::type encoding, const ColumnDescriptor* descr = NULLPTR) {
+    Encoding::type encoding, const ColumnDescriptor* descr = NULLPTR,
+    ::arrow::MemoryPool* pool = ::arrow::default_memory_pool()) {
   using OutType = typename EncodingTraits<DType>::Decoder;
   std::unique_ptr<Decoder> base = MakeDecoder(DType::type_num, encoding, descr);

Review Comment:
   Do this require a pool?



##########
cpp/src/parquet/encoding.cc:
##########
@@ -3417,7 +3417,8 @@ std::unique_ptr<Encoder> MakeEncoder(Type::type type_num, Encoding::type encodin
 }
 
 std::unique_ptr<Decoder> MakeDecoder(Type::type type_num, Encoding::type encoding,
-                                     const ColumnDescriptor* descr) {
+                                     const ColumnDescriptor* descr,
+                                     ::arrow::MemoryPool* pool) {

Review Comment:
   Plain decoder does not need a pool?



-- 
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] mapleFU commented on a diff in pull request #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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


##########
cpp/src/parquet/encoding.h:
##########
@@ -458,7 +459,8 @@ std::unique_ptr<DictDecoder<DType>> MakeDictDecoder(
 
 template <typename DType>
 std::unique_ptr<typename EncodingTraits<DType>::Decoder> MakeTypedDecoder(
-    Encoding::type encoding, const ColumnDescriptor* descr = NULLPTR) {
+    Encoding::type encoding, const ColumnDescriptor* descr = NULLPTR,
+    ::arrow::MemoryPool* pool = ::arrow::default_memory_pool()) {
   using OutType = typename EncodingTraits<DType>::Decoder;
   std::unique_ptr<Decoder> base = MakeDecoder(DType::type_num, encoding, descr);

Review Comment:
   Fixed



-- 
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 #34803: GH-34802: [C++][Parquet] Allow passing pool to decoder

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

   Benchmark runs are scheduled for baseline = 660d259f525d301f7ff5b90416622698fa8a5e9c and contender = 131f3eaa5a61902b49f6c82c83c2535e225cdf79. 131f3eaa5a61902b49f6c82c83c2535e225cdf79 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/5debbb7e469d4997b90329868b710e27...2f927c7f82de480cb2fe4333db574cfb/)
   [Finished :arrow_down:1.54% :arrow_up:0.06%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/2d7116dc95e94e7f9fdfb44ba9e63897...0277e2980dc14ed89bfc7e16c532da18/)
   [Finished :arrow_down:5.1% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/e125bd0dfc484fca931b3c160c25c448...b2a1cbee0f5945c28613f5dc19b0818b/)
   [Finished :arrow_down:0.83% :arrow_up:0.12%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/e373c094fb664ba1bffdf8b44ec2a9a3...e0f313ef112c4a51bbb930c115ee7272/)
   Buildkite builds:
   [Finished] [`131f3eaa` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2597)
   [Finished] [`131f3eaa` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2627)
   [Finished] [`131f3eaa` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2595)
   [Finished] [`131f3eaa` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2618)
   [Finished] [`660d259f` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2596)
   [Finished] [`660d259f` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2626)
   [Finished] [`660d259f` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2594)
   [Finished] [`660d259f` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2617)
   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