Skip to content

[SPARK-16199][SQL] Add a method to list the referenced columns in data source Filter #13901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

rxin
Copy link
Contributor

@rxin rxin commented Jun 24, 2016

What changes were proposed in this pull request?

It would be useful to support listing the columns that are referenced by a filter. This can help simplify data source planning, because with this we would be able to implement unhandledFilters method in HadoopFsRelation.

How was this patch tested?

N/A

@SparkQA
Copy link

SparkQA commented Jun 24, 2016

Test build #61209 has finished for PR 13901 at commit 846c0e4.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class Filter
    • case class EqualTo(attribute: String, value: Any) extends Filter
    • case class EqualNullSafe(attribute: String, value: Any) extends Filter
    • case class GreaterThan(attribute: String, value: Any) extends Filter
    • case class GreaterThanOrEqual(attribute: String, value: Any) extends Filter
    • case class LessThan(attribute: String, value: Any) extends Filter
    • case class LessThanOrEqual(attribute: String, value: Any) extends Filter
    • case class IsNull(attribute: String) extends Filter
    • case class IsNotNull(attribute: String) extends Filter
    • case class And(left: Filter, right: Filter) extends Filter
    • case class Or(left: Filter, right: Filter) extends Filter
    • case class Not(child: Filter) extends Filter
    • case class StringStartsWith(attribute: String, value: String) extends Filter
    • case class StringEndsWith(attribute: String, value: String) extends Filter
    • case class StringContains(attribute: String, value: String) extends Filter

@gatorsmile
Copy link
Member

LGTM

@marmbrus
Copy link
Contributor

No tests?

@rxin rxin closed this Jul 12, 2016
asfgit pushed a commit that referenced this pull request Jul 12, 2016
…a source Filter

## What changes were proposed in this pull request?
It would be useful to support listing the columns that are referenced by a filter. This can help simplify data source planning, because with this we would be able to implement unhandledFilters method in HadoopFsRelation.

This is based on rxin's patch (#13901) and adds unit tests.

## How was this patch tested?
Added a new suite FiltersSuite.

Author: petermaxlee <petermaxlee@gmail.com>
Author: Reynold Xin <rxin@databricks.com>

Closes #14120 from petermaxlee/SPARK-16199.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants