You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "judahrand (via GitHub)" <gi...@apache.org> on 2023/08/30 15:19:31 UTC
[GitHub] [arrow] judahrand opened a new pull request, #37469: Allow `write_page_index` to be set for Datasets
judahrand opened a new pull request, #37469:
URL: https://github.com/apache/arrow/pull/37469
I think this may have been missed when this feature was added.
<!--
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.
-->
### Are these changes tested?
<!--
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?
<!--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727130846
> > Any updates? Should we rerun `continuous-integration/appveyor/pr` and checkin if it's a unrelated flacky test?
>
> The failing AppVeyor test would be fixed with rebasing the branch (#37555).
Thanks, I've done this now.
> It would be good to see if something can be done regarding the documentation ([see](https://github.com/apache/arrow/pull/37469#issuecomment-1721611686)) before merging.
I can try to make time to get to this but it feels like a pretty independent issue - especially as the `WriteOptions` classes don't even appear in the Python docs: https://arrow.apache.org/docs/python/api/dataset.html#classes. It feels like it would make more sense to add documentation for IPC, CSV, ORC, and Parquet FileWriteOptions all in one PR?
--
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] AlenkaF commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727115731
> Any updates? Should we rerun `continuous-integration/appveyor/pr` and checkin if it's a unrelated flacky test?
The failing AppVeyor test would be fixed with rebasing the branch (https://github.com/apache/arrow/issues/37555).
It would be good to see if something can be done regarding the documentation ([see](https://github.com/apache/arrow/pull/37469#issuecomment-1721611686)) before merging.
--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727115758
> Any updates? Should we rerun `continuous-integration/appveyor/pr` and checkin if it's a unrelated flacky test?
Yes, please - if it doesn't pass on a second run I'll look into it today.
--
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 #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1714301521
> That is indeed what you were saying as the test shows! That behaviour strikes me as quite unintuitive!
Cause I'm the author of that behavior lol
When disable collect statistics, currently it would be hard to collect the `ColumnIndex`, because `ColumnIndex` relies on `Statistics`.
Also, by the way, by default, if column index is enabled, the page header statistics will not be written. (Since spec says if column index exists, page header is not tent to be written)
--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727151061
> Agree totally, it deserves a special issue for sure! What you propose sounds great, thank you! It would be enough for now just to open a separate issue and link it from here, so we do not forget.
#37800
--
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] AlenkaF commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1721611686
One thought: would it be worth adding docstrings for `ParquetFileWriteOptions` and adding examples of use to the [Python user guide](https://arrow.apache.org/docs/dev/python/dataset.html)? As a separate issue?
--
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 #37469: Allow `write_page_index` to be set for Datasets
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1699385172
Would you mind create a Github issue, and rename the title to:
```
GH-{issue-id}: [Python][Parquet] ...
```
--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1714360578
> The logic is ok here, however, I think we should export the flag to `parquet/core.py`, and from that to `_dataset_parquet.pyx`. You can take a look at your another patch ( #37665 ). Since just a `_dataset_parquet` config is hard to use for users.
The flags are already there! They were just never added to the `ParquetFileWriteOptions`:
https://github.com/apache/arrow/blob/e56726c161df1d588f2f6197dbdd0c0011f14855/python/pyarrow/parquet/core.py#L976
--
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 #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727093442
Any updates? Should we rerun `continuous-integration/appveyor/pr` and checkin if it's a unrelated flacky test?
--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1712137084
> > Great! I'll take a careful round later. By the way we can disable statistics to just disable Column Index but write offset index. Maybe this could be add to doc later.
>
> Are you saying `write_statistics=False, wrtie_page_index=True` will write the OffsetIndex but not the ColumnIndex? If that's the case then I'd absolutely agree the docs should be updated as currently they suggest that `write_statistics` is ignored if `write_page_index=True`! But this should probably be a separate PR as the docs will need updating in `pyarrow.parquet` too?
That is indeed what you were saying as the test shows! That behaviour strikes me as quite unintuitive!
--
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 #37469: Allow `write_page_index` to be set for Datasets
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1699383218
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Thanks for opening a pull request!
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}
See also:
* [Other pull requests](https://github.com/apache/arrow/pulls/)
* [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
--
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] AlenkaF merged pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF merged PR #37469:
URL: https://github.com/apache/arrow/pull/37469
--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1714355320
> When disable collect statistics, currently it would be hard to collect the `ColumnIndex`, because `ColumnIndex` relies on `Statistics`.
Yeah, that makes sense! Would be good to clarify in the docs - will see if I get to it in another PR.
> Also, by the way, by default, if column index is enabled, the page header statistics will not be written. (Since spec says if column index exists, page header is not tent to be written)
Yeah, what gets written and what doesn't is quite confusing. In fact the spec doesn't techincally say that the page-level statistics when writing the ColumnIndex but that it isn't recommended (one might want both in order to support old readers).
https://github.com/apache/parquet-format/blob/master/PageIndex.md#technical-approach
It's probably sensible default behaviour but it'd be nice to force being able to write both.
--
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] AlenkaF commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727265585
Great, will merge 👍
--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1711835221
> Would you mind add a test for `write_page_index`? Since we need to ensure page index would be written.
I've added a basic test for this.
--
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] judahrand commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "judahrand (via GitHub)" <gi...@apache.org>.
judahrand commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1712126774
> Great! I'll take a careful round later. By the way we can disable statistics to just disable Column Index but write offset index. Maybe this could be add to doc later.
Are you saying `write_statistics=False, wrtie_page_index=True` will write the OffsetIndex but not the ColumnIndex? If that's the case then I'd absolutely agree the docs should be updated as currently they suggest that `write_statistics` is ignored if `write_page_index=True`! But this should probably be separate as the docs will need updating in `pyarrow.parquet` too?
--
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] conbench-apache-arrow[bot] commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727589243
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit f52ebbbf76df5d5a16257aae2504d23319723ae5.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/16962470842) has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.
--
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 #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727181751
All test passed now, can we try to checkin this patch? :-)
--
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] AlenkaF commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1727142950
> I can try to make time to get to this but it feels like a pretty independent issue - especially as the `WriteOptions` classes don't even appear in the Python docs: https://arrow.apache.org/docs/python/api/dataset.html#classes. It feels like it would make more sense to add documentation for IPC, CSV, ORC, and Parquet FileWriteOptions all in one PR?
Agree totally, it deserves a special issue for sure! What you propose sounds great, thank you!
It would be enough for now just to open a separate issue and link it from here, so we do not forget.
--
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 #37469: GH-37470: Allow `write_page_index` to be set for Datasets
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1699387426
:warning: GitHub issue #37470 **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] mapleFU commented on pull request #37469: GH-37470: [Python][Parquet] Add missing arguments to `ParquetFileWriteOptions`
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #37469:
URL: https://github.com/apache/arrow/pull/37469#issuecomment-1711848106
Great! I'll take a careful round later. By the way we can disable statistics to just disable Column Index but write offset index. Maybe this could be add to doc later.
--
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