> delete working incorrectly while using segment.starttime before '<any_date_value>'
> ----------------------------------------------------------------------------------
>
> Key: CARBONDATA-1412
> URL:
https://issues.apache.org/jira/browse/CARBONDATA-1412> Project: CarbonData
> Issue Type: Bug
> Components: data-query, test
> Environment: Spark-2.1
> Reporter: Sangeeta Gulia
> Assignee: anubhav tarar
> Priority: Minor
> Fix For: 1.2.0
>
>
> Issue exists in the below query :
> delete from table uniqdata_delete where segment.starttime before 'starttime_of_last_segment_created';
> It should mark all those segments for delete whose start-time is before the given time and should not delete the segment with the given time.
> But it is marking the segment for delete which is having the exact start time also.
> To replicate the issue:
> CREATE TABLE uniqdata_delete (CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION string, DOB timestamp, DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double, INTEGER_COLUMN1 int) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ("TABLE_BLOCKSIZE"= "256 MB")
> LOAD DATA INPATH 'hdfs://localhost:54310/user/hduser/input-files/3000_UniqData.csv' into table uniqdata_delete OPTIONS('FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1')
> LOAD DATA INPATH 'hdfs://localhost:54310/user/hduser/input-files/3000_UniqData.csv' into table uniqdata_delete OPTIONS('FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1')
> delete from table uniqdata_delete where segment.starttime before 'starttime_of_last_segment_created';