HyukjinKwon opened a new pull request #32019:
URL: https://github.com/apache/spark/pull/32019


   ### What changes were proposed in this pull request?
   
   This PR fixes JDK 11 compilation failed:
   
   ```
   
/home/runner/work/spark/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TryCast.scala:35:
 error: annotation argument needs to be a constant; found: "_FUNC_(expr AS 
type) - Casts the value `expr` to the target data type `type`. ".+("This 
expression is identical to CAST with configuration `spark.sql.ansi.enabled` as 
").+("true, except it returns NULL instead of raising an error. Note that the 
behavior of this ").+("expression doesn\'t depend on configuration 
`spark.sql.ansi.enabled`.")
       "true, except it returns NULL instead of raising an error. Note that the 
behavior of this " +
   ```
   
   For whatever reason, it doesn't know that the string is actually a constant. 
This PR simply switches it to multi-line style (which is actually more 
correct). Reference:
   
   
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala#L52-L55
   
   ### Why are the changes needed?
   
   To recover the build.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, dev-only.
   
   ### How was this patch tested?
   
   It was NOT tested yet. I opened a PR first to speed up to recover the 
builds. I will use CI to verify.


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to