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/04/26 13:07:27 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue #82: [DataFusion] Add validation for unreferenced table in query

alamb opened a new issue #82:
URL: https://github.com/apache/arrow-datafusion/issues/82


   *Note*: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-8260
   
   This is an edge case but the query "SELECT 1 FROM t" causes an error in the Parquet reader because we are not reading any columns. We should have the query planner recognize this and fail the query is invalid.


-- 
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-datafusion] jackwener removed a comment on issue #82: [DataFusion] Add validation for unreferenced table in query

Posted by GitBox <gi...@apache.org>.
jackwener removed a comment on issue #82:
URL: https://github.com/apache/arrow-datafusion/issues/82#issuecomment-1065834212


   I find the column `1` isn't handled in `validate_schema_satisfies_exprs`.
    
   Whene column is `1`, run
   ```sql
   select * from information_schema.tables;
   ```
   
   `validate_schema_satisfies_exprs`
   doesn't actually go into the handler code segment
   ``` rust
   |col| match col {
   ....
   }
   ```


-- 
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 #82: [DataFusion] Add validation for unreferenced table in query

Posted by GitBox <gi...@apache.org>.
alamb closed issue #82:
URL: https://github.com/apache/arrow-datafusion/issues/82


   


-- 
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 edited a comment on issue #82: [DataFusion] Add validation for unreferenced table in query

Posted by GitBox <gi...@apache.org>.
alamb edited a comment on issue #82:
URL: https://github.com/apache/arrow-datafusion/issues/82#issuecomment-1065946701


   I am not sure this issue is relevant anymore . Sorry for the poor ticket hygiene @jackwener 
   
   I tried the query and it works fine now
   
   ```shell
   cargo run --bin datafusion-cli
   ...
   
   DataFusion CLI v7.0.0
   ❯ create table t1 as select * from (values (11, 'a'), (22, 'b'), (33, 'c'), (44, 'd'), (77, 'e')) as sq;
   0 rows in set. Query took 0.047 seconds.
   ❯ select 1 from t1;
   +----------+
   | Int64(1) |
   +----------+
   | 1        |
   | 1        |
   | 1        |
   | 1        |
   | 1        |
   +----------+
   5 rows in set. Query took 0.008 seconds.
   
   ```


-- 
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] jackwener commented on issue #82: [DataFusion] Add validation for unreferenced table in query

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


   When column is `1`,  match  `col` should match `_ => Err(`, but it didn't.
   
   I'm confused.
   
   


-- 
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] jackwener commented on issue #82: [DataFusion] Add validation for unreferenced table in query

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


   I find the column `1` isn't handled in `validate_schema_satisfies_exprs`.
    
   Whene column is `1`, run
   ```sql
   select * from information_schema.tables;
   ```
   
   `validate_schema_satisfies_exprs`
   doesn't actually go into the handler code segment
   ``` rust
   |col| match col {
   ....
   }
   ```


-- 
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 commented on issue #82: [DataFusion] Add validation for unreferenced table in query

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


   I am not sure this issue is relevant anymore . Sorry for the poor ticket hygiene @jackwener 
   
   
   ```shell
   cargo run --bin datafusion-cli
   ...
   
   DataFusion CLI v7.0.0
   ❯ create table t1 as select * from (values (11, 'a'), (22, 'b'), (33, 'c'), (44, 'd'), (77, 'e')) as sq;
   0 rows in set. Query took 0.047 seconds.
   ❯ select 1 from t1;
   +----------+
   | Int64(1) |
   +----------+
   | 1        |
   | 1        |
   | 1        |
   | 1        |
   | 1        |
   +----------+
   5 rows in set. Query took 0.008 seconds.
   
   ```


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