-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: do not throw error if VALUE_DELIMITER is set on non-DELIMITED topic #4366
Conversation
@@ -261,6 +261,7 @@ private Format getValueFormat(final Sink sink) { | |||
if (sink.getProperties().getValueDelimiter().isPresent()) { | |||
return sink.getProperties().getValueDelimiter(); | |||
} | |||
|
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.
extra new line?
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.
it's intentional - I thought it was cleaner to read with a new line than without
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
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.
Would a C* statement with DELIMITED
set for a none DELIMIITED
format no longer fail with this change? e.g.
CREATE TABLE FOO (...) WITH (VALUE_FORMAT='JSON', DELIMITER=',');
???
Allowing the above would be poor UX IMHO, as we're allowing the user to set something that doesn't make sense. If this no longer fails then I think we need a follow up PR to check for DELIMITER
purely in CT/CS statements.
This is correct, I had thought about that (see the description) - it no longer fails, and I think that's OK. It does do something, it indicates that any |
fixes #4200
Description
The
VALUE_DELIMITER
only makes sense in the context ofDELIMITED
format and today we throw an error if it is set in any other format. This PR removes that error and just ignores it if it is set on a non-delimited stream. This way:Alternatively, we can just not pipe the delimiter and use the default if going from a non-delimited format back to delimited.
Testing done
Reviewer checklist