-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor: a naive support for load data fields enclosed by #3759
Conversation
PTAL @zimulala |
PTAL @hanfei1991 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
executor/write.go
Outdated
if c, ok = escapeChar(str[i+1]); ok { | ||
i++ | ||
} | ||
c, _ = escapeChar(str[i+1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ignore ok? Any test case covers this?
if c, ok = escapeChar(str[i+1]); ok { | ||
i++ | ||
} | ||
c = escapeChar(str[i+1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will the result be if we meet "\c"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\c is escaped to c
LGTM |
Please update the |
A very naive way to support fields enclosed by xxx:
change
split(input, terminated)
to
split(input, enclosed+terminated+enclosed)
@zimulala @shenli