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 2021/01/24 17:12:01 UTC

[GitHub] [arrow] gangliao opened a new issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

gangliao opened a new issue #9307:
URL: https://github.com/apache/arrow/issues/9307


   ```shell
   "Schema contains duplicate unqualified field name \'a\'")
   thread 'tests::simple_join' panicked at 'assertion failed: `(left == right)`
     left: `1`,
    right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure'
   ```
   
   ```rust  
         let schema1 = Arc::new(Schema::new(vec![
               Field::new("a", DataType::Utf8, false),
               Field::new("b", DataType::Int32, false),
           ]));
           let schema2 = Arc::new(Schema::new(vec![
               Field::new("a", DataType::Utf8, false),
               Field::new("d", DataType::Int32, false),
           ]));
   
           // define data.
           let batch1 = RecordBatch::try_new(
               schema1.clone(),
               vec![
                   Arc::new(StringArray::from(vec!["a", "b", "c", "d"])),
                   Arc::new(Int32Array::from(vec![1, 10, 10, 100])),
               ],
           )?;
           // define data.
           let batch2 = RecordBatch::try_new(
               schema2.clone(),
               vec![
                   Arc::new(StringArray::from(vec!["a", "b", "c", "d"])),
                   Arc::new(Int32Array::from(vec![1, 10, 10, 100])),
               ],
           )?;
   
           let mut ctx = ExecutionContext::new();
   
           let table1 = MemTable::try_new(schema1, vec![vec![batch1]])?;
           let table2 = MemTable::try_new(schema2, vec![vec![batch2]])?;
   
           ctx.register_table("t1", Box::new(table1));
           ctx.register_table("t2", Box::new(table2));
   
           let sql = concat!(
               "SELECT a, b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   
           let plan = ctx.create_logical_plan(&sql)?;
           let plan = ctx.optimize(&plan)?;
           let plan = ctx.create_physical_plan(&plan)?;
   ```


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

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



[GitHub] [arrow] gangliao edited a comment on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
gangliao edited a comment on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766417028


    I tried two solutions:
   
   ```rust
           let sql = concat!(
               "SELECT b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   
           let sql = concat!(
               "SELECT t1.a as a, b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   ```
   
   But I still got the same error.
   
   ```shell
   Schema contains duplicate unqualified field name \'a\'")
   thread 'tests::simple_join' panicked at 'assertion failed: `(left == right)`
     left: `1`,
    right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure'
   ```


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

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



[GitHub] [arrow] Dandandan edited a comment on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
Dandandan edited a comment on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766404237


   @gangliao I believe this is a SQL error, the `a` is ambiguous in the projection. Could you try: `SELECT t1.a as a, b, d`?


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

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



[GitHub] [arrow] gangliao commented on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
gangliao commented on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766417028


    I tried two solutions:
   
   ```rust
           let sql = concat!(
               "SELECT b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   
           let sql = concat!(
               "SELECT t1.a as a, b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   ```
   
   But I still got the same error.
   
   ```shell
   thread 'tests::simple_join' panicked at 'assertion failed: `(left == right)`
     left: `1`,
    right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure'
   ```


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

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



[GitHub] [arrow] emkornfield closed issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
emkornfield closed issue #9307:
URL: https://github.com/apache/arrow/issues/9307


   


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

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



[GitHub] [arrow] Dandandan commented on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
Dandandan commented on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766404237


   @gangliao I believe this is a SQL error, the `a` is ambiguous in the projection. Could you try: `SELECT t1.a as a, b, d`


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

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



[GitHub] [arrow] Dandandan edited a comment on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
Dandandan edited a comment on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766404237


   @gangliao I believe this is a SQL error, the `a` is ambiguous in the projection. Could you try: `SELECT t1.a as a, b, d`?


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

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



[GitHub] [arrow] gangliao commented on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
gangliao commented on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-770014905


   Sure.


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

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



[GitHub] [arrow] emkornfield commented on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
emkornfield commented on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-770164672


   going to close this issue for now.


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

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



[GitHub] [arrow] gangliao commented on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
gangliao commented on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766417028


    I tried two solutions:
   
   ```rust
           let sql = concat!(
               "SELECT b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   
           let sql = concat!(
               "SELECT t1.a as a, b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   ```
   
   But I still got the same error.
   
   ```shell
   thread 'tests::simple_join' panicked at 'assertion failed: `(left == right)`
     left: `1`,
    right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure'
   ```


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

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



[GitHub] [arrow] Dandandan commented on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
Dandandan commented on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766404237


   @gangliao I believe this is a SQL error, the `a` is ambiguous in the projection. Could you try: `SELECT t1.a as a, b, d`


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

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



[GitHub] [arrow] gangliao edited a comment on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
gangliao edited a comment on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-766417028


    I tried two solutions:
   
   ```rust
           let sql = concat!(
               "SELECT b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   
           let sql = concat!(
               "SELECT t1.a as a, b, d ",
               "FROM t1 JOIN t2 ON t1.a = t2.a ",
               "ORDER BY b ASC ",
               "LIMIT 3"
           );
   ```
   
   But I still got the same error.
   
   ```shell
   Schema contains duplicate unqualified field name \'a\'")
   thread 'tests::simple_join' panicked at 'assertion failed: `(left == right)`
     left: `1`,
    right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure'
   ```


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

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



[GitHub] [arrow] jorgecarleitao commented on issue #9307: [Rust][DataFusion] Join Statement: Schema contains duplicate unqualified field name

Posted by GitBox <gi...@apache.org>.
jorgecarleitao commented on issue #9307:
URL: https://github.com/apache/arrow/issues/9307#issuecomment-769956201


   Seems like a bug to me. :( Could you add it to [JIRA](https://issues.apache.org/jira/issues/?jql=project%20%3D%20ARROW%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20in%20(Rust%2C%20%22Rust%20-%20DataFusion%22)%20ORDER%20BY%20updated%20DESC%2C%20created%20DESC%2C%20priority%20DESC)?


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

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