Cannot Insert data to table with a partitions in Spark in EMR
- Dominant language
- Scala
- Stars
- 1.5k
- Forks
- 694
- PR merge metrics
- No merged PRs in 30d
Description
After https://github.com/apache/carbondata/commit/42f69827e0a577b6128417104c0a49cd5bf21ad7
I have successfully created a table with partitions, but when I trying insert data the job end with a success
but the segment is marked as "Marked for Delete"
I am running:
```sql
CREATE TABLE lior_carbon_tests.mark_for_del_bug(
timestamp string,
name string
)
STORED AS carbondata
PARTITIONED BY (dt string, hr string)
```
```sql
INSERT INTO lior_carbon_tests.mark_for_del_bug select '2021-07-07T13:23:56.012+00:00','spark','2021-07-07','13'
```
```sql
select * from lior_carbon_tests.mark_for_del_bug
```
gives
```
+---------+----+---+---+
|timestamp|name| dt| hr|
+---------+----+---+---+
+---------+----+---+---+
```
And
```sql
show segments for TABLE lior_carbon_tests.mark_for_del_bug
```
gives
```
+---+-----------------+-----------------------+---------------+---------+---------+----------+-----------+
|ID |Status |Load Start Time |Load Time Taken|Partition|Data Size|Index Size|File Format|
+---+-----------------+-----------------------+---------------+---------+---------+----------+-----------+
|0 |Marked for Delete|2021-09-02 15:24:21.022|11.798S |NA |NA |NA |columnar_v3|
+---+-----------------+-----------------------+---------------+---------+---------+----------+-----------+
```
I took a looking at the folder structure in S3 and it seems fine
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the SQL CREATE TABLE and INSERT in Spark on EMR, then inspect the table's segment status and the S3 folder structure as described. Done means the inserted row is returned by SELECT and the resulting segment is not marked for delete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, scala, spark
- Domain
- data-engineering, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100