You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/09/08 10:08:11 UTC

[GitHub] [spark] MaxGekk opened a new pull request, #42856: [SPARK-45100][SQL][3.3] Fix an internal error from `reflect()`on `NULL` class and method

MaxGekk opened a new pull request, #42856:
URL: https://github.com/apache/spark/pull/42856

   ### What changes were proposed in this pull request?
   In the PR, I propose to check that the `class` and `method` arguments are not a NULL in `CallMethodViaReflection`. And if they are, throw an `AnalysisException` with new error class `DATATYPE_MISMATCH.UNEXPECTED_NULL`.
   
   This is a backport of https://github.com/apache/spark/pull/42849.
   
   ### Why are the changes needed?
   To fix the issue demonstrated by the example:
   ```sql
   $ spark-sql (default)> select reflect('java.util.UUID', CAST(NULL AS STRING));
   [INTERNAL_ERROR] The Spark SQL phase analysis failed with an internal error. You hit a bug in Spark or the Spark plugins you use. Please, report this bug to the corresponding communities or vendors, and provide the full stack trace.
   ``` 
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   By running new test:
   ```
   $ build/sbt "test:testOnly *.MiscFunctionsSuite"
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   
   Authored-by: Max Gekk <ma...@gmail.com>
   (cherry picked from commit fd424caf6c46e7030ac2deb2afbe3f4a5fc1095c)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on pull request #42856: [SPARK-45100][SQL][3.3] Fix an internal error from `reflect()`on `NULL` class and method

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #42856:
URL: https://github.com/apache/spark/pull/42856#issuecomment-1711897142

   All GAs passed. Merging to 3.3.
   Thank you, @dongjoon-hyun and @yaooqinn for review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk closed pull request #42856: [SPARK-45100][SQL][3.3] Fix an internal error from `reflect()`on `NULL` class and method

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #42856: [SPARK-45100][SQL][3.3] Fix an internal error from `reflect()`on `NULL` class and method
URL: https://github.com/apache/spark/pull/42856


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org