You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2024/09/04 03:47:00 UTC
[jira] [Created] (SPARK-49507) Fix Expected only partition pruning predicates exception
Yuming Wang created SPARK-49507:
-----------------------------------
Summary: Fix Expected only partition pruning predicates exception
Key: SPARK-49507
URL: https://issues.apache.org/jira/browse/SPARK-49507
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 3.5.0, 4.0.0
Reporter: Yuming Wang
How to reproduce:
{code:scala}
sql("CREATE TABLE t (ID BIGINT, DT STRING) USING parquet PARTITIONED BY (DT)")
sql("set spark.sql.hive.metastorePartitionPruningFastFallback=true")
sql("select * from t where dt=20240820").show
{code}
{noformat}
org.apache.spark.sql.AnalysisException: Expected only partition pruning predicates: List(isnotnull(DT#21), (cast(DT#21 as bigint) = 20240820)).
at org.apache.spark.sql.errors.QueryCompilationErrors$.nonPartitionPruningPredicatesNotExpectedError(QueryCompilationErrors.scala:2414)
at org.apache.spark.sql.catalyst.catalog.ExternalCatalogUtils$.generatePartitionPredicateByFilter(ExternalCatalo
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org