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-3216] Fix enableLocalDictionary with false issue in CSDK #3035

Closed
wants to merge 4 commits into from

Conversation

xubo245
Copy link
Contributor

@xubo245 xubo245 commented Dec 29, 2018

1.enableLocalDictionary can' t set false

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

  • Any interfaces changed?
    No
  • Any backward compatibility impacted?
    NO
  • Document update required?
    No
  • Testing done
    No
  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
    JIRA2951

1.enableLocalDictionary can' t set false
@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@xubo245
Copy link
Contributor Author

xubo245 commented Jan 3, 2019

@KanakaKumar @ajantha-bhat @jackylk @ravipesala Please review it.

@@ -853,7 +854,7 @@ int main(int argc, char *argv[]) {
} else {
int batch = 32000;
int printNum = 32000;

//
Copy link
Contributor

Choose a reason for hiding this comment

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

remove unwanted changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, done

@@ -291,9 +291,6 @@ void CarbonWriter::localDictionaryThreshold(int localDictionaryThreshold) {
}

void CarbonWriter::enableLocalDictionary(bool enableLocalDictionary) {
if (enableLocalDictionary == NULL) {
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 give some description in the PR, how removing this solving the issue?

Copy link
Member

Choose a reason for hiding this comment

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

@KanakaKumar : In CPP, boolean false value is same as NULL. Both are zero. Hence when we pass false, it always throws exception due to this wrong code. Hence he removed.

@xubo245 : This is just two removal, no need separate PR. you can do with #3048

@@ -546,7 +546,7 @@ bool testWriteData(JNIEnv *env, char *path, int argc, char *argv[]) {
writer.withCsvInput(jsonSchema);
writer.withLoadOption("complex_delimiter_level_1", "#");
writer.writtenBy("CSDK");
writer.taskNo(185);
writer.taskNo(15541554.81);
Copy link
Contributor

Choose a reason for hiding this comment

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

This change not related to fix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some different between CPP and java: java taskNo don't support double, but CPP will convert double to long.

@@ -709,6 +709,7 @@ bool testWithTableProperty(JNIEnv *env, char *path, int argc, char **argv) {
writer.outputPath(path);
writer.withCsvInput(jsonSchema);
writer.withTableProperty("sort_columns", "shortField");
writer.enableLocalDictionary(false);
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 test if there is any possibility to give NULL in C and how it is sent to java layer ? true or false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add test code for it. In CPP, it will convert NULL to false when user invoke CarbonWriter::enableLocalDictionary.

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@xubo245
Copy link
Contributor Author

xubo245 commented Jan 4, 2019

@ajantha-bhat @KanakaKumar Please review it.

@ajantha-bhat
Copy link
Member

LGTM

@xubo245 xubo245 changed the title [CARBONDATA-3216] Fix some bugs in CSDK [CARBONDATA-3216] Fix enableLocalDictionary with false issue in CSDK Jan 4, 2019
@asfgit asfgit closed this in 9fa045d Jan 4, 2019
asfgit pushed a commit that referenced this pull request Jan 21, 2019
qiuchenjian pushed a commit to qiuchenjian/carbondata that referenced this pull request Jun 14, 2019
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