-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-12820][SQL]Resolve db.table.column #10753
Conversation
When we have a database named "a", and two tables:
What happens if the user specifies "a.b.c"? |
It would return attribute c in table b up on this patch. Any suggestion? throw ambiguous exception for such case? |
What do we do if the user specifies "a.b" right now? I'd say we should follow that, and make sure we have a test case for it. |
Would return attribute b in table a. resolved within the logic of |
Test build #49381 has finished for PR 10753 at commit
|
I would say we'd better keep the same checking logic with mysql/hive for the |
@chenghao-intel , mysql(5.5) doesn't support nested data type for now, and hive(1.2.1) doesn't support the usage of "db.table.field" in projection list at the moment. I guess most of the user work around this by using alias. |
Test build #51930 has finished for PR 10753 at commit
|
Test build #52031 has finished for PR 10753 at commit
|
Thanks for the pull request. I'm going through a list of pull requests to cut them down since the sheer number is breaking some of the tooling we have. Due to lack of activity on this pull request, I'm going to push a commit to close it. Feel free to reopen it or create a new one. We can also continue the discussion on the JIRA ticket. |
Currently spark only support to specify col name like:
table.col
, orcol
in projection, but it's very common that user usedb.table.col
especially when join table across database.Hive doesn't support this for now but it has been used in lot of other traditional db like mysql.