Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CARBONDATA-3359]Fix data mismatch issue for decimal column after delete operation #3189

Closed
wants to merge 1 commit into from

Conversation

akashrn5
Copy link
Contributor

Problem:

after delete operation is performed, the decimal column data is wrong. This is because, during filling vector for decimal column, we were not considering the deleted rows if present any, we were filling all the row data for decimal.

Solution

in case of decimal, get the vector from ColumnarVectorWrapperDirectFactory and then put data, which will take care of the deleted rows

How this is tested?

Added functional test case for the issue.

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

  • Any interfaces changed?
    NA

  • Any backward compatibility impacted?
    NA

  • Document update required?
    NA

  • Testing done
    Yes
    Please provide details on
    - Whether new unit test cases have been added or why no new tests are required?
    - How it is tested? Please attach test report.
    - Is it a performance related change? Please attach the performance test report.
    - Any additional information to help reviewers in testing this change.

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
    NA

@akashrn5 akashrn5 mentioned this pull request Apr 25, 2019
5 tasks
@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2976/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11240/

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3209/

@akashrn5
Copy link
Contributor Author

retest this please

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2981/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11245/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3214/

@akashrn5
Copy link
Contributor Author

@QiangCai please review

@QiangCai
Copy link
Contributor

LGTM

@QiangCai
Copy link
Contributor

some test cases of decimal type are commented in TestAlterTableSortColumnsProperty.
can you open and check the result of the test cases?

@akashrn5
Copy link
Contributor Author

@QiangCai i checked the class, i didn't find any test cases either ignored or commented, are you referring the correct class??

int newMeasureScale = info.measure.getMeasure().getScale();
@Override public void fillVector(Object valuesToBeConverted, int size,
ColumnVectorInfo vectorInfo, BitSet nullBitSet, DataType pageType) {
CarbonColumnVector vector = vectorInfo.vector;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you refactor this code, move to some method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@CarbonDataQA
Copy link

Build Failed with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11308/

@akashrn5
Copy link
Contributor Author

akashrn5 commented May 1, 2019

retest this please

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/3046/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/3245/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/11310/

@kumarvishal09
Copy link
Contributor

LGTM

@asfgit asfgit closed this in eb7a833 May 2, 2019
asfgit pushed a commit that referenced this pull request May 16, 2019
…ete operation

Problem:
after delete operation is performed, the decimal column data is wrong. This is because, during filling vector for decimal column,
 we were not considering the deleted rows if present any, we were filling all the row data for decimal.

Solution
in case of decimal, get the vector from ColumnarVectorWrapperDirectFactory and then put data, which will take care of the deleted rows

This closes #3189
qiuchenjian pushed a commit to qiuchenjian/carbondata that referenced this pull request Jun 14, 2019
…ete operation

Problem:
after delete operation is performed, the decimal column data is wrong. This is because, during filling vector for decimal column,
 we were not considering the deleted rows if present any, we were filling all the row data for decimal.

Solution
in case of decimal, get the vector from ColumnarVectorWrapperDirectFactory and then put data, which will take care of the deleted rows

This closes apache#3189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants