You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Weiyang Zhao (Jira)" <ji...@apache.org> on 2020/11/15 20:17:00 UTC

[jira] [Comment Edited] (ARROW-10574) [Python][Parquet] Enhance hive partition filtering

    [ https://issues.apache.org/jira/browse/ARROW-10574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17232387#comment-17232387 ] 

Weiyang Zhao edited comment on ARROW-10574 at 11/15/20, 8:16 PM:
-----------------------------------------------------------------

Hi, [~jorisvandenbossche]

Just saw your comments. I don't know where Jira sent me the notification email.

Currently if I pass in a filter like this:

('x', 'in', ['a', 'b'])

It will not work because of line 876 in parquet.py:
 {{if isinstance(f_value, set)}}
 You see that it only checks 'set'.

I also enhanced the documents to make it clear.

I dropped the 'like' enhancement because it is not supported in the cython version and I am unfamiliar with cython.

I have submitted a pull request. You can see the details there.

Thanks.


was (Author: wyzhao):
Hi, [~jorisvandenbossche]

Just saw your comments. I don't know where Jira sent me the notification email.

Currently if I pass in a filter like this:

('x', 'in', ['a', 'b'])

It will not work because of line 876 in parquet.py:
{{if isinstance(f_value, set)}}
You see that it only checks 'set'.

I also enhanced the documents to make it clear.

I dropped the 'like' enhancement because it is not supported in the cython version and I am unfamiliar with cython.

Thanks.

> [Python][Parquet] Enhance hive partition filtering
> --------------------------------------------------
>
>                 Key: ARROW-10574
>                 URL: https://issues.apache.org/jira/browse/ARROW-10574
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Weiyang Zhao
>            Assignee: Weiyang Zhao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I would like to enhance partition filters in methods such as:
> {{pyarrow.parquet.ParquetDataset(path, filters)}}
> I am proposing the below enhancements:
>  # for operator "in", "not in", the value should be any typing.Iteratable (also a container). But currently only set is supported while other iteratable, such as list, tuple cannot function correctly. I would like to change it to accept any iteratable.
>  # Enhance the documents about the partition filters.
>  # Check when no partition can satisfy the filters, raise an exception with meaningful error message.
> I see there is a new version implemented with 
> _ParquetDatasetV2 which already accepts an iterable. So the documentation update is fine for the new version as well.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)