Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Jun 1, 2020

What changes were proposed in this pull request?

  1. Modified ParquetFilters.valueCanMakeFilterOn() to accept filters with java.time.Instant attributes.
  2. Added ParquetFilters.timestampToMicros() to support both types java.sql.Timestamp and java.time.Instant in conversions to microseconds.
  3. Re-used timestampToMicros in constructing of Parquet filters.

Why are the changes needed?

To support pushed down filters with java.time.Instant 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?

Modified tests to ParquetFilterSuite to check the case when Java 8 API is enabled.

@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 1, 2020

The changes are similar to #28259. @cloud-fan @HyukjinKwon Please, review this PR.

@SparkQA
Copy link

SparkQA commented Jun 1, 2020

Test build #123385 has finished for PR 28696 at commit eca11d4.

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

@SparkQA
Copy link

SparkQA commented Jun 2, 2020

Test build #123420 has finished for PR 28696 at commit a0a5923.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 2, 2020

jenkins, retest this, please

@SparkQA
Copy link

SparkQA commented Jun 2, 2020

Test build #123422 has finished for PR 28696 at commit a0a5923.

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

@cloud-fan
Copy link
Contributor

cloud-fan commented Jun 2, 2020

thanks, merging to master/3.0!

@cloud-fan cloud-fan closed this in 00b355b Jun 2, 2020
cloud-fan pushed a commit that referenced this pull request Jun 2, 2020
…down

1. Modified `ParquetFilters.valueCanMakeFilterOn()` to accept filters with `java.time.Instant` attributes.
2. Added `ParquetFilters.timestampToMicros()` to support both types `java.sql.Timestamp` and `java.time.Instant` in conversions to microseconds.
3. Re-used `timestampToMicros` in constructing of Parquet filters.

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

No

Modified tests to `ParquetFilterSuite` to check the case when Java 8 API is enabled.

Closes #28696 from MaxGekk/support-instant-parquet-filters.

Authored-by: Max Gekk <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
@MaxGekk MaxGekk deleted the support-instant-parquet-filters branch June 5, 2020 19:45
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.

4 participants