You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/11/20 19:23:00 UTC

[jira] [Assigned] (SPARK-33505) Fix insert into `InMemoryPartitionTable`

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

Apache Spark reassigned SPARK-33505:
------------------------------------

    Assignee: Apache Spark

> Fix insert into `InMemoryPartitionTable`
> ----------------------------------------
>
>                 Key: SPARK-33505
>                 URL: https://issues.apache.org/jira/browse/SPARK-33505
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.1.0
>            Reporter: Maxim Gekk
>            Assignee: Apache Spark
>            Priority: Major
>
> Currently, INSERT INTO a partitioned table in V2 in-memory catalog doesn't create partitions. The example below demonstrates the issue:
> {code:scala}
>   test("insert into partitioned table") {
>     val t = "testpart.ns1.ns2.tbl"
>     withTable(t) {
>       spark.sql(
>         s"""
>            |CREATE TABLE $t (id bigint, name string, data string)
>            |USING foo
>            |PARTITIONED BY (id, name)""".stripMargin)
>       spark.sql(s"INSERT INTO $t PARTITION(id = 1, name = 'Max') SELECT 'abc'")
>       val partTable = catalog("testpart").asTableCatalog
>         .loadTable(Identifier.of(Array("ns1", "ns2"), "tbl")).asInstanceOf[InMemoryPartitionTable]
>       assert(partTable.partitionExists(InternalRow.fromSeq(Seq(1, UTF8String.fromString("Max")))))
>     }
>   }
> {code}
> The partitionExists() function return false for the partitions that must be created.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org