Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Apr 19, 2020

What changes were proposed in this pull request?

  1. Modified ParquetFilters.valueCanMakeFilterOn() to accept filters with java.time.LocalDate attributes.
  2. Modified ParquetFilters.dateToDays() to support both types java.sql.Date and java.time.LocalDate in conversions to days.
  3. Add implicit conversion from LocalDate to Expression (Literal).

Why are the changes needed?

To support pushed down filters with java.time.LocalDate attributes. Before the changes, date filters are not pushed down to Parquet datasource when spark.sql.datetime.java8API.enabled is true.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added a test to ParquetFilterSuite

@SparkQA
Copy link

SparkQA commented Apr 19, 2020

Test build #121479 has finished for PR 28259 at commit 1804a66.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk
Copy link
Member Author

MaxGekk commented Apr 20, 2020

@cloud-fan @HyukjinKwon Please, review the PR.

@cloud-fan
Copy link
Contributor

We don't need to fix parquet if we follow #28261 (comment)

@MaxGekk
Copy link
Member Author

MaxGekk commented Apr 23, 2020

jenkins, retest this, please

@SparkQA
Copy link

SparkQA commented Apr 23, 2020

Test build #121687 has finished for PR 28259 at commit 1804a66.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 23, 2020

Test build #121695 has finished for PR 28259 at commit 54512cd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

thanks, merging to master/3.0!

@cloud-fan cloud-fan closed this in 2616542 Apr 24, 2020
cloud-fan pushed a commit that referenced this pull request Apr 24, 2020
…shdown

### What changes were proposed in this pull request?
1. Modified `ParquetFilters.valueCanMakeFilterOn()` to accept filters with `java.time.LocalDate` attributes.
2. Modified `ParquetFilters.dateToDays()` to support both types `java.sql.Date` and `java.time.LocalDate` in conversions to days.
3. Add implicit conversion from `LocalDate` to `Expression` (`Literal`).

### Why are the changes needed?
To support pushed down filters with `java.time.LocalDate` attributes. Before the changes, date filters are not pushed down to Parquet datasource when `spark.sql.datetime.java8API.enabled` is `true`.

### Does this PR introduce any user-facing change?
No

### How was this patch tested?
Added a test to `ParquetFilterSuite`

Closes #28259 from MaxGekk/parquet-filter-java8-date-time.

Authored-by: Max Gekk <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit 2616542)
Signed-off-by: Wenchen Fan <[email protected]>
@MaxGekk MaxGekk deleted the parquet-filter-java8-date-time branch June 5, 2020 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants