-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-46535][SQL][3.4] Fix NPE when describe extended a column without col stats #48160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@MaxGekk @yaooqinn @LuciferYang @guykhazma , this is a backport to 3.4 for #44524 can u please review this |
MaxGekk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saitharun15 Please, enable GAs in your fork.
| import org.apache.spark.sql.types.StringType | ||
| import org.apache.spark.util.Utils | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
@MaxGekk I have enabled GAs in my fork |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM. Thank you, @saitharun15 , @LuciferYang , @MaxGekk .
Although @saitharun15 needs to setup his fork more properly, we can see that SQL module tests passed in the CIs.
For Scala linter, I verified manually.
$ dev/scalastyle
Using SPARK_LOCAL_IP=localhost
Scalastyle checks passed.
Merged to branch-3.4 for Apache Spark 3.4.4.
…ut col stats ### What changes were proposed in this pull request? Backport [#44524 ] to 3.4 for [[SPARK-46535]](https://issues.apache.org/jira/browse/SPARK-46535)[SQL] Fix NPE when describe extended a column without col stats ### Why are the changes needed? Currently executing DESCRIBE TABLE EXTENDED a column without col stats with v2 table will throw a null pointer exception. ``` Cannot invoke "org.apache.spark.sql.connector.read.colstats.ColumnStatistics.min()" because the return value of "scala.Option.get()" is null java.lang.NullPointerException: Cannot invoke "org.apache.spark.sql.connector.read.colstats.ColumnStatistics.min()" because the return value of "scala.Option.get()" is null at org.apache.spark.sql.execution.datasources.v2.DescribeColumnExec.run(DescribeColumnExec.scala:63) at org.apache.spark.sql.execution.datasources.v2.V2CommandExec.result$lzycompute(V2CommandExec.scala:43) at org.apache.spark.sql.execution.datasources.v2.V2CommandExec.result(V2CommandExec.scala:43) at org.apache.spark.sql.execution.datasources.v2.V2CommandExec.executeCollect(V2CommandExec.scala:49) at org.apache.spark.sql.execution.QueryExecution$$anonfun$eagerlyExecuteCommands$1.$anonfun$applyOrElse$1(QueryExecution.scala:98) at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:118) at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:195) at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:103) ``` ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? Add a new test describe extended (formatted) a column without col stats ### Was this patch authored or co-authored using generative AI tooling? No Closes #48160 from saitharun15/SPARK-46535-branch-3.4. Lead-authored-by: saitharun15 <[email protected]> Co-authored-by: Sai Tharun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
Backport [#44524 ] to 3.4 for [SPARK-46535][SQL] Fix NPE when describe extended a column without col stats
Why are the changes needed?
Currently executing DESCRIBE TABLE EXTENDED a column without col stats with v2 table will throw a null pointer exception.
Does this PR introduce any user-facing change?
How was this patch tested?
Add a new test describe extended (formatted) a column without col stats
Was this patch authored or co-authored using generative AI tooling?
No