Chungmin Lee created SPARK-50680: ------------------------------------ Summary: DELETE fails on tables with CHAR(N) columns Key: SPARK-50680 URL: https://issues.apache.org/jira/browse/SPARK-50680 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 3.5.4 Reporter: Chungmin Lee
Repro (SQL): {code:java} create table test (a char(5)) using parquet; delete from test; {code} Error: {noformat} org.apache.spark.SparkException: [INTERNAL_ERROR] Unexpected table relation: Project [staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, readSidePadding, a#0, 5, true, false, true) AS a#1] +- HiveTableRelation [`spark_catalog`.`default`.`test`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [a#0], Partition Cols: []] at org.apache.spark.SparkException$.internalError(SparkException.scala:92) at org.apache.spark.SparkException$.internalError(SparkException.scala:96) at org.apache.spark.sql.execution.datasources.v2.DataSourceV2Strategy.apply(DataSourceV2Strategy.scala:326) ...{noformat} Single-line Docker command to repro the issue: {code:java} docker run -it --rm apache/spark /bin/bash -c '/opt/spark/bin/spark-sql -f <(echo "create table test (a char(5)); delete from test;")' {code} -- 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