Skip to content

Conversation

@hvanhovell
Copy link
Contributor

What changes were proposed in this pull request?

This makes ProtoToPlanTestSuite use analyzed plans instead of parsed plans.

Why are the changes needed?

This is to increase the fidelity of the ProtoToPlanTestSuite, especially since we are going to be adding functions. Functions are special because the spark connect planner leaves them unresolved, the actual binding only happens in the analyzer. Without running the analyzer we would not know if the bindings are correct.

Does this PR introduce any user-facing change?

No

How was this patch tested?

It is a test change.

}

override def toString: String = target.map(_ + ".").getOrElse("") + "*"
override def toString: String = target.map(_.mkString("", ".", ".")).getOrElse("") + "*"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering if this will be a kind of breaking change that some users use toString already to match plans, etc.

cc @cloud-fan

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is already merged code. I hope they don't rely on this because moving from 2.12 to 2.13 would break their code.

# Conflicts:
#	connector/connect/common/src/test/resources/query-tests/explain-results/column_as_multi.explain
#	connector/connect/common/src/test/resources/query-tests/explain-results/column_star_with_target.explain
#	connector/connect/common/src/test/resources/query-tests/explain-results/join_inner_using_multiple_col_array.explain
#	connector/connect/common/src/test/resources/query-tests/explain-results/join_inner_using_multiple_col_seq.explain
#	connector/connect/common/src/test/resources/query-tests/explain-results/join_inner_using_single_col.explain
#	connector/connect/common/src/test/resources/query-tests/explain-results/join_using_multiple_col_array.explain
#	connector/connect/common/src/test/resources/query-tests/explain-results/join_using_multiple_col_seq.explain
#	connector/connect/common/src/test/resources/query-tests/explain-results/join_using_single_col.explain
Copy link
Contributor

@amaliujia amaliujia left a comment

Choose a reason for hiding this comment

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

LGTM

@hvanhovell
Copy link
Contributor Author

For the reviews, I have manually tested this with 2.13.

@hvanhovell
Copy link
Contributor Author

Alright merging this.

hvanhovell added a commit that referenced this pull request Feb 16, 2023
… instead of parsed plans

### What changes were proposed in this pull request?
This makes `ProtoToPlanTestSuite` use analyzed plans instead of parsed plans.

### Why are the changes needed?
This is to increase the fidelity of the `ProtoToPlanTestSuite`, especially since we are going to be adding functions. Functions are special because the spark connect planner leaves them unresolved, the actual binding only happens in the analyzer. Without running the analyzer we would not know if the bindings are correct.

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

### How was this patch tested?
It is a test change.

Closes #40056 from hvanhovell/SPARK-42465.

Authored-by: Herman van Hovell <herman@databricks.com>
Signed-off-by: Herman van Hovell <herman@databricks.com>
(cherry picked from commit 64aa84b)
Signed-off-by: Herman van Hovell <herman@databricks.com>
@dongjoon-hyun
Copy link
Member

For the reviews, I have manually tested this with 2.13.

Thank you so much, @hvanhovell !

snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
… instead of parsed plans

### What changes were proposed in this pull request?
This makes `ProtoToPlanTestSuite` use analyzed plans instead of parsed plans.

### Why are the changes needed?
This is to increase the fidelity of the `ProtoToPlanTestSuite`, especially since we are going to be adding functions. Functions are special because the spark connect planner leaves them unresolved, the actual binding only happens in the analyzer. Without running the analyzer we would not know if the bindings are correct.

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

### How was this patch tested?
It is a test change.

Closes apache#40056 from hvanhovell/SPARK-42465.

Authored-by: Herman van Hovell <herman@databricks.com>
Signed-off-by: Herman van Hovell <herman@databricks.com>
(cherry picked from commit 64aa84b)
Signed-off-by: Herman van Hovell <herman@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants