-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Redshift] Increase String Precision - Part 2 #955
Conversation
@@ -126,6 +127,10 @@ func (c *Columns) UpsertColumn(colName string, arg UpsertColumnArg) { | |||
col.backfilled = *arg.Backfilled | |||
} | |||
|
|||
if arg.StringPrecision != nil { | |||
col.KindDetails.OptionalStringPrecision = arg.StringPrecision |
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.
Since this has access to the existing column metadata, is this a better place to check that the new precision is greater than the previous?
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.
We already have guardrail in how NewLength is being set, I can add something here as well?
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.
My main concern was addressed on the other comment, but yeah it might be nice to add a backup check here too, just in case.
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.
Yeah I don't see why not. I'll add it
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.
I'm gonna open up another PR to add error
to the signature for UpsertColumn so there's less diff
Part one - #953
Background
This is the second PR to enable automatic string precision for Redshift.
Scope