Skip to content

[SPARK-38266][SQL] GetDateFieldOperations should skip unresolved nodes#35568

Closed
Ngone51 wants to merge 1 commit intoapache:masterfrom
Ngone51:SPARK-35937-followup
Closed

[SPARK-38266][SQL] GetDateFieldOperations should skip unresolved nodes#35568
Ngone51 wants to merge 1 commit intoapache:masterfrom
Ngone51:SPARK-35937-followup

Conversation

@Ngone51
Copy link
Member

@Ngone51 Ngone51 commented Feb 18, 2022

What changes were proposed in this pull request?

Skip nodes whose children have not been resolved yet within GetDateFieldOperations.

Why are the changes needed?

The current GetDateFieldOperations could result in org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType on unresolved object in some cases. See the example added in unit test.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added a unit test.

@github-actions github-actions bot added the SQL label Feb 18, 2022
@Ngone51
Copy link
Member Author

Ngone51 commented Feb 18, 2022

cc @gengliangwang @cloud-fan

@cloud-fan
Copy link
Contributor

cloud-fan commented Feb 18, 2022

thanks, merging to master/3.2!

@cloud-fan cloud-fan closed this in 15532c7 Feb 18, 2022
cloud-fan pushed a commit that referenced this pull request Feb 18, 2022
…solved nodes

### What changes were proposed in this pull request?

Skip nodes whose children have not been resolved yet within `GetDateFieldOperations`.

### Why are the changes needed?

The current `GetDateFieldOperations` could result in `org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType on unresolved object` in some cases. See the example added in unit test.

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

No.

### How was this patch tested?

Added a unit test.

Closes #35568 from Ngone51/SPARK-35937-followup.

Authored-by: yi.wu <yi.wu@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 15532c7)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@cloud-fan
Copy link
Contributor

@Ngone51 can you create a new JIRA ticket? SPARK-35937 is in 3.2

@Ngone51
Copy link
Member Author

Ngone51 commented Feb 21, 2022

Created the new ticket: https://issues.apache.org/jira/browse/SPARK-38266

@Ngone51 Ngone51 changed the title [SPARK-35937][FOLLOW-UP][SQL] GetDateFieldOperations should skip unresolved nodes [SPARK-38266][FOLLOW-UP][SQL] GetDateFieldOperations should skip unresolved nodes Feb 21, 2022
@Ngone51 Ngone51 changed the title [SPARK-38266][FOLLOW-UP][SQL] GetDateFieldOperations should skip unresolved nodes [SPARK-38266][SQL] GetDateFieldOperations should skip unresolved nodes Feb 21, 2022
kazuyukitanimura pushed a commit to kazuyukitanimura/spark that referenced this pull request Aug 10, 2022
…solved nodes

### What changes were proposed in this pull request?

Skip nodes whose children have not been resolved yet within `GetDateFieldOperations`.

### Why are the changes needed?

The current `GetDateFieldOperations` could result in `org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType on unresolved object` in some cases. See the example added in unit test.

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

No.

### How was this patch tested?

Added a unit test.

Closes apache#35568 from Ngone51/SPARK-35937-followup.

Authored-by: yi.wu <yi.wu@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 15532c7)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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