-
Notifications
You must be signed in to change notification settings - Fork 586
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
Support duplicate column names in SDKs #3885
Comments
Why we must return error? It brokes some conversations like JDBC standard. From here Column names used as input to getter methods are case insensitive. When a getter method is called with a column name and several columns have the same name, the value of the first matching column will be returned. |
It's worth to discus. Since currently i.e. NodeJS SDK has no mechanism to fetch columns by index at all. As a solution, we could think about adding an index to the column name if the name is duplicated |
This behavour will be at server queries and it is safest way - we always can start to support duplicated names, but it is difficult to change behavior. may be reaction way need more research. Main idea was:
|
Our API has always supported the columns with any names, including duplicated. So these is no difference - does server support it or doesn't, the SDKs have to support it already. The only think we have to decide - the behavior of various SDKs must be equal. I checked Java SDK and it returns the last matching column - but it seems very as non conversational behavior. What about others SDK? |
I think about it will be better to sync not only SDK, but server too - for have same behaviour of SDK and YQL/SQL. |
For prevent customer unexpected issues after #3553
If result has duplicate column names and user access to one of them by name - SK must return error.
If user access to the column by index, or access to other columns (without name duplications) - sdk must work fine.
The text was updated successfully, but these errors were encountered: