Bruce Robbins created SPARK-41205: ------------------------------------- Summary: Bad error message when try_to_binary called with non-foldable format Key: SPARK-41205 URL: https://issues.apache.org/jira/browse/SPARK-41205 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 3.3.1, 3.4.0 Reporter: Bruce Robbins
For example: {noformat} spark-sql> SELECT try_to_binary(col1, col2) from values ('abc', 'utf-8') as data(col1, col2); [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. org.apache.spark.SparkException: [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. at org.apache.spark.SparkException$.internalError(SparkException.scala:88) ... Caused by: java.lang.AssertionError: assertion failed at scala.Predef$.assert(Predef.scala:208) at org.apache.spark.sql.catalyst.expressions.ToBinary.$anonfun$replacement$1(stringExpressions.scala:2597) at scala.Option.map(Option.scala:230) at org.apache.spark.sql.catalyst.expressions.ToBinary.replacement$lzycompute(stringExpressions.scala:2596) at org.apache.spark.sql.catalyst.expressions.ToBinary.replacement(stringExpressions.scala:2596) at org.apache.spark.sql.catalyst.expressions.RuntimeReplaceable.dataType(Expression.scala:354) {noformat} Compare to {{to_binary}}: {noformat} spark-sql> SELECT to_binary(col1, col2) from values ('abc', 'utf-8') as data(col1, col2); The 'format' parameter of function 'to_binary' needs to be a string literal.; line 1 pos 7 spark-sql> {noformat} -- 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