[ 
https://issues.apache.org/jira/browse/SPARK-35673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17359524#comment-17359524
 ] 

Fu Chen commented on SPARK-35673:
---------------------------------

Hi, [~maropu] 

This is because [Spark-28292|https://issues.apache.org/jira/browse/SPARK-28292] 
move rule RemoveAllHints after batch Resolution.
The rule ResolveReferences is executed before rule RemoveAllHints. when the 
plan(Project[*]) contains an unresolved child(UnresolvedHint), means 
`plan.childrenResolved == false`, so ResolveReferences can't expand stars,

But we can't put the rule RemoveAllHints before batch Resolution, because the 
user-defined hint is injected in batch Resolution.

Any idea or suggestions to fix it?

 

 

> Spark fails on unrecognized hint in subquery
> --------------------------------------------
>
>                 Key: SPARK-35673
>                 URL: https://issues.apache.org/jira/browse/SPARK-35673
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.2, 3.1.1, 3.1.2, 3.2.0
>            Reporter: Willi Raschkowski
>            Priority: Major
>
> Spark queries to fail on unrecognized hints in subqueries. An example to 
> reproduce:
> {code:sql}
> SELECT /*+ use_hash */ 42;
> -- 21/06/08 01:28:05 WARN HintErrorLogger: Unrecognized hint: use_hash()
> -- 42
> SELECT *
> FROM (
>     SELECT /*+ use_hash */ 42
> );
> -- 21/06/08 01:28:07 WARN HintErrorLogger: Unrecognized hint: use_hash()
> -- Error in query: unresolved operator 'Project [*];
> -- 'Project [*]
> -- +- SubqueryAlias __auto_generated_subquery_name
> --    +- Project [42 AS 42#2]
> --       +- OneRowRelation
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to