Skip to content

Conversation

@xy720
Copy link
Member

@xy720 xy720 commented Aug 31, 2020

Proposed changes

fix #4490

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@xy720 xy720 changed the title [Spark load][Bug] Fix column terminate for spark load [Spark load][Bug] Fix column terminator for spark load Aug 31, 2020
this.fileFieldNames = fileFieldNames;
this.columnsFromPath = columnsFromPath;
this.columnSeparator = columnSeparator;
this.columnSeparator = Strings.isNullOrEmpty(columnSeparator)?'\t': columnSeparator.charAt(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
this.columnSeparator = Strings.isNullOrEmpty(columnSeparator)?'\t': columnSeparator.charAt(0);
this.columnSeparator = Strings.isNullOrEmpty(columnSeparator) ? '\t' : columnSeparator.charAt(0);

record -> {
scannedRowsAcc.add(1);
String[] attributes = record.split(fileGroup.columnSeparator);
char sep = fileGroup.columnSeparator;
Copy link
Contributor

Choose a reason for hiding this comment

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

Make it execute only once.

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman self-assigned this Sep 1, 2020
@morningman morningman added approved Indicates a PR has been approved by one committer. area/spark-load Issues or PRs related to the spark load kind/fix Categorizes issue or PR as related to a bug. labels Sep 1, 2020
@morningman morningman merged commit f5ee854 into apache:master Sep 2, 2020
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/spark-load Issues or PRs related to the spark load kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Spark load][Bug] Spark load's column terminator is not consistent with Broker load

2 participants