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

Dongjoon Hyun resolved SPARK-40429.
-----------------------------------
    Fix Version/s: 3.4.0
         Assignee: Huaxin Gao
       Resolution: Fixed

This is resolved via [https://github.com/apache/spark/pull/37886]

> Only set KeyGroupedPartitioning when the referenced column is in the output
> ---------------------------------------------------------------------------
>
>                 Key: SPARK-40429
>                 URL: https://issues.apache.org/jira/browse/SPARK-40429
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.3.0, 3.4.0
>            Reporter: Huaxin Gao
>            Assignee: Huaxin Gao
>            Priority: Minor
>             Fix For: 3.4.0
>
>
> {code:java}
>       sql(s"CREATE TABLE $tbl (id bigint, data string) PARTITIONED BY (id)")
>       sql(s"INSERT INTO $tbl VALUES (1, 'a'), (2, 'b'), (3, 'c')")
>       checkAnswer(
>         spark.table(tbl).select("index", "_partition"),
>         Seq(Row(0, "3"), Row(0, "2"), Row(0, "1"))
>       )
> {code}
> failed with 
> ScalaTestFailureLocation: org.apache.spark.sql.QueryTest at 
> (QueryTest.scala:226)
> org.scalatest.exceptions.TestFailedException: AttributeSet(id#994L) was not 
> empty The optimized logical plan has missing inputs:
> RelationV2[index#998, _partition#999] testcat.t



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

Reply via email to