You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/10/16 09:17:00 UTC

[jira] [Assigned] (SPARK-49507) Fix Expected only partition pruning predicates exception

     [ https://issues.apache.org/jira/browse/SPARK-49507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot reassigned SPARK-49507:
--------------------------------------

    Assignee: Apache Spark

> 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, 3.5.3
>            Reporter: Yuming Wang
>            Assignee: Apache Spark
>            Priority: Major
>              Labels: pull-request-available
>
> 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