-
Notifications
You must be signed in to change notification settings - Fork 1
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: Cap length of column name #104
fix: Cap length of column name #104
Conversation
4ffb4e0
to
bcadc16
Compare
fc171a9
to
0f4f5fa
Compare
0f4f5fa
to
2c5ec05
Compare
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.
Looks good
sanitizedSqlName = $"_{sanitizedSqlName}"; | ||
} | ||
|
||
if (sanitizedSqlName.Length > 127) // 127 instead of 128, since we need space for parameter declaration '@' |
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 thought about doing that for values over 118. If they are larger than that, we should calculate hash for them.
In this case the chance of just having a vocalubary key with a collision hash is lower or statistically negligible.
With the current approach it's possible for people to mimic hash value by just having columns of length of 127
Description
Work Item ID: AB#30770
Cap length of column names.
Test approach
Run stream/new unit test
Release Note
fix: Cap length of column names. If names are longer than 127 characters, we cut off anything after character 116, and append hash value of the entire name.