DaltonModlin commented on issue #166:
URL:
https://github.com/apache/arrow-datafusion/issues/166#issuecomment-1209772849
I'm looking into this issue and seeing a new error message:
`Error: NotImplemented("Unsupported SQL statement: Some(\"CREATE VIEW
revenue0 (supplier_no, total_revenue) AS SELECT l_suppkey, sum(l_extendedprice
* (1 - l_discount)) FROM lineitem WHERE l_shipdate >= DATE '1996-01-01' AND
l_shipdate < DATE '1996-01-01' + INTERVAL '3' MONTH GROUP BY l_suppkey\")")`
This comes from missing a match case's if statement at
`datafusion/sql/src/planner.rs: line 192`. Query 15's defined aliases
(supplier_no, total_revenue) are populating the columns, thus,
`columns.is_empty()` returns false. Removing the check for empty columns allows
the view to be generated, but new issues arise when the second SQL statement in
Q15 attempts to query the view via:
```
select
s_suppkey,
s_name,
s_address,
s_phone,
total_revenue
from
supplier,
revenue0
```
where 'total_revenue' is a column in 'revenue0' which is the view.
The table default_catalog.default_schema.revenue0 can't be found in session
context via the code path:
`datafusion/sql/src/planner.rs: line 684 ->
datafusion/core/src/execution/context.rs: line 1539`
This doesn't currently generate useful error output, but debugging led me
here.
Before moving forward too much further, I'd like context on the
columns.is_empty() check if possible. I feel I may be missing something here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]