You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/15 02:23:48 UTC

[GitHub] [arrow-datafusion] ygf11 opened a new issue, #4210: Add ambiguous check when generate projection plan

ygf11 opened a new issue, #4210:
URL: https://github.com/apache/arrow-datafusion/issues/4210

   **Describe the bug**
   When the two table both has `c0`, then the following sql will work:
   ```sql
   ❯ explain select c0 from test0, test1;
   +---------------+-----------------------------------------------------------------------------------------------------+
   | plan_type     | plan                                                                                                |
   +---------------+-----------------------------------------------------------------------------------------------------+
   | logical_plan  | Projection: test0.c0                                                                                |
   |               |   CrossJoin:                                                                                        |
   |               |     TableScan: test0 projection=[c0]                                                                |
   |               |     TableScan: test1 projection=[c0]                                                                |
   ```
   
   The projection part of this sql is not clear, datafusion should throw an error.
   
   **To Reproduce**
   Create two table test0 and test1, which both contain `c0`.
   Run sql `explain select c0 from test0, test1;`
   
   **Expected behavior**
   
   **Additional context**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] ygf11 commented on issue #4210: Add ambiguous check when generate projection plan

Posted by GitBox <gi...@apache.org>.
ygf11 commented on issue #4210:
URL: https://github.com/apache/arrow-datafusion/issues/4210#issuecomment-1316123771

   Like join and selection in PostgreSQL , it will report an error:
   
   ```sql
   psql -d "$POSTGRES_DB" -h "$POSTGRES_HOST" -p "$POSTGRES_PORT" -U "$POSTGRES_USER" -c "select c0 from test0, test1"
   ERROR:  column reference "c0" is ambiguous
   LINE 1: select c0 from test0, test1
                  ^
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] mingmwang commented on issue #4210: Add ambiguous check when generate projection plan

Posted by GitBox <gi...@apache.org>.
mingmwang commented on issue #4210:
URL: https://github.com/apache/arrow-datafusion/issues/4210#issuecomment-1315495949

   What's the behavior in other systems? Like SparkSQL and PostgreSQL ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb closed issue #4210: Add ambiguous check when generate projection plan

Posted by GitBox <gi...@apache.org>.
alamb closed issue #4210: Add ambiguous check when generate projection plan
URL: https://github.com/apache/arrow-datafusion/issues/4210


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org