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

Uros Stankovic commented on SPARK-48286:
----------------------------------------

[~melin] It should be defined here 
[https://github.com/apache/spark/blob/df4156aa3217cf0f58b4c6cbf33c967bb43f7155/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala#L3603]

Compile would not pass without existence of method.

> Analyze 'exists' default expression instead of 'current' default expression 
> in structField to v2 column conversion
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-48286
>                 URL: https://issues.apache.org/jira/browse/SPARK-48286
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 4.0.0
>            Reporter: Uros Stankovic
>            Assignee: Uros Stankovic
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 4.0.0, 3.5.2
>
>
> org.apache.spark.sql.catalyst.util.ResolveDefaultColumns#analyze method 
> accepts 3 parameter
> 1) Field to analyze
> 2) Statement type - String
> 3) Metadata key - CURRENT_DEFAULT or EXISTS_DEFAULT
> Method 
> org.apache.spark.sql.connector.catalog.CatalogV2Util#structFieldToV2Column
> pass fieldToAnalyze and EXISTS_DEFAULT as second parameter, so it is not 
> metadata key, instead of that, it is statement type, so bad expression is 
> analyzed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to