Skip to content

Conversation

@kevinyu98
Copy link
Contributor

Hello Michael & All: Here I am submitting another approach to solve this problem. Can you verify ?

I think the problem is related to change from spark-10829,

before that PR change, the projects and filters are done inside buildPartitionedTableScan.
With that PR change, the filter expression divide to 3 parts, the filter left outside of the scan (combineFilters ) needs a different projection.

So the fix is to create a combine projection for the outside filter and beyond.

Thanks for your comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use use an AttributeSet anytime we are dealing with AttributeReference objects.

@marmbrus
Copy link
Contributor

ok to test

@SparkQA
Copy link

SparkQA commented Dec 14, 2015

Test build #47682 has finished for PR 10299 at commit 2333c6d.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@kevinyu98
Copy link
Contributor Author

Hello Michael: I fixed the scala style issue, can you help re-run the test? Thanks.

@marmbrus
Copy link
Contributor

ok to test

@SparkQA
Copy link

SparkQA commented Dec 15, 2015

Test build #47690 has finished for PR 10299 at commit 4d47076.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 15, 2015

Test build #47691 has finished for PR 10299 at commit 4d47076.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@kevinyu98
Copy link
Contributor Author

The failure is because of the changed project, will submit an updated patch tomorrow.

@kevinyu98
Copy link
Contributor Author

I will create a new PR.

@kevinyu98 kevinyu98 closed this Dec 18, 2015
ghost pushed a commit to dbtsai/spark that referenced this pull request Dec 28, 2015
…uildPartitionedTableScan

Hello Michael & All:

We have some issues to submit the new codes in the other PR(apache#10299), so we closed that PR and open this one with the fix.

The reason for the previous failure is that the projection for the scan when there is a filter that is not pushed down (the "left-over" filter) could be different, in elements or ordering, from the original projection.

With this new codes, the approach to solve this problem is:

Insert a new Project if the "left-over" filter is nonempty and (the original projection is not empty and the projection for the scan has more than one elements which could otherwise cause different ordering in projection).

We create 3 test cases to cover the otherwise failure cases.

Author: Kevin Yu <[email protected]>

Closes apache#10388 from kevinyu98/spark-12231.
asfgit pushed a commit that referenced this pull request Feb 1, 2016
…uildPartitionedTableScan

Hello Michael & All:

We have some issues to submit the new codes in the other PR(#10299), so we closed that PR and open this one with the fix.

The reason for the previous failure is that the projection for the scan when there is a filter that is not pushed down (the "left-over" filter) could be different, in elements or ordering, from the original projection.

With this new codes, the approach to solve this problem is:

Insert a new Project if the "left-over" filter is nonempty and (the original projection is not empty and the projection for the scan has more than one elements which could otherwise cause different ordering in projection).

We create 3 test cases to cover the otherwise failure cases.

Author: Kevin Yu <[email protected]>

Closes #10388 from kevinyu98/spark-12231.

(cherry picked from commit fd50df4)
Signed-off-by: Cheng Lian <[email protected]>
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.

3 participants