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-3960] Default comment should be null when adding columns #3898

Closed
wants to merge 1 commit into from

Conversation

QiangCai
Copy link
Contributor

Why is this PR needed?

  1. column comment is an empty string by default when adding a column
  2. there are too many redundancy codes

What changes were proposed in this PR?

  1. change default column comment to null
  2. re-factory code

Does this PR introduce any user interface change?

  • No

Is any new testcase added?

  • Yes

@QiangCai QiangCai changed the title [CARBONDATA-3960] Default column comment should be null [CARBONDATA-3960] Default comment should be null when adding columns Aug 25, 2020
@CarbonDataQA1
Copy link

Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3862/

@CarbonDataQA1
Copy link

Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2121/

@@ -693,7 +693,7 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser {
var columnComment: String = ""
var plainComment: String = ""
if (col.getComment().isDefined) {
columnComment = " comment \"" + col.getComment().get + "\""
columnComment = " comment '" + col.getComment().get + "'"
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change? I didn't get the reason

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Double quotes will lead column comments to be null in some spark versions.

@@ -624,9 +625,7 @@ class TableNewProcessor(cm: TableModel) {
if (isVarcharColumn(colName)) {
columnSchema.setDataType(DataTypes.VARCHAR)
}
// TODO: Need to fill RowGroupID, converted type
Copy link
Contributor

Choose a reason for hiding this comment

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

is this TODO is completed/not required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not required now

@akashrn5
Copy link
Contributor

akashrn5 commented Sep 1, 2020

retest this please

@CarbonDataQA1
Copy link

Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2207/

@CarbonDataQA1
Copy link

Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3947/

@akashrn5
Copy link
Contributor

akashrn5 commented Sep 1, 2020

retest this please

@CarbonDataQA1
Copy link

Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3955/

@CarbonDataQA1
Copy link

Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2215/

@akashrn5
Copy link
Contributor

akashrn5 commented Sep 2, 2020

LGTM

@asfgit asfgit closed this in 77bbc69 Sep 2, 2020
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

3 participants