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/10/19 20:53:10 UTC

[GitHub] [arrow-datafusion] alamb commented on pull request #3882: simplify unqualified col name aliases

alamb commented on PR #3882:
URL: https://github.com/apache/arrow-datafusion/pull/3882#issuecomment-1284561242

   Here is what postgres does:
   
   ```
   postgres=# select * from foo;
    val | time 
   -----+------
    A   |  1.0
    B   |  2.0
    C   |  3.0
   (3 rows)
   
   postgres=# select trim(val), trim(val) from foo;
    btrim | btrim 
   -------+-------
    A     | A
    B     | B
    C     | C
   (3 rows)
   
   postgres=# 
   ```
   
   Here is what datafusion-cli does from master:
   
   ```
   DataFusion CLI v13.0.0
   ❯ create table foo as select column1 as val, column2 as time from (values ('A', 1.0), ('B', 2.0), ('C', 3.0)) as sq;
   
   0 rows in set. Query took 0.023 seconds.
   ❯ select trim(val), trim(val) from foo;
   Plan("Projections require unique expression names but the expression \"trim(foo.val)\" at position 0 and \"trim(foo.val)\" at position 1 have the same name. Consider aliasing (\"AS\") one of them.")
   ```


-- 
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