Closed cdmikechen closed 2 weeks ago
I think views will be listed with latest Databend, they were incorrectly excluded from the information_schema.tables at one point: https://github.com/datafuselabs/databend/issues/16039
I think views will be listed with latest Databend, they were incorrectly excluded from the information_schema.tables at one point: datafuselabs/databend#16039
@rad-pat Aha,thanks for reminding. This pr https://github.com/datafuselabs/databend/pull/16058 has made table
and view
both in information_scham.tables.
@hantmac I use databend v1.2.538-nightly. Does it mean I need to update databend to lastest version?
@hantmac I use databend v1.2.538-nightly. Does it mean I need to update databend to lastest version?
@hantmac I use databend v1.2.538-nightly. Does it mean I need to update databend to lastest version?
@cdmikechen Maybe we can use table
as default type and merge this pr. It will back capability. Some users do not want to upgrade databend. What do you think ?
I think that on current, or older versions where the bug does not exist, the user will get 2 views returned, one from the table query and one from the view query. The test in this PR is not accurate, it only tests that at least one view is returned. In the SQLAlchemy library, I had to allow for the bug in certain versions: https://github.com/datafuselabs/databend-sqlalchemy/blob/3226f10e0f8b6aa85185208583977037b33ec99f/databend_sqlalchemy/databend_dialect.py#L819
I think that on current, or older versions where the bug does not exist, the user will get 2 views returned, one from the table query and one from the view query. The test in this PR is not accurate, it only tests that at least one view is returned. In the SQLAlchemy library, I had to allow for the bug in certain versions: https://github.com/datafuselabs/databend-sqlalchemy/blob/3226f10e0f8b6aa85185208583977037b33ec99f/databend_sqlalchemy/databend_dialect.py#L819
There is a condition https://github.com/datafuselabs/databend-jdbc/pull/262/files#diff-edd43fca3337c0ab2e0fa92af785f7021454a5485f2aea20e11b73fc50ae51d4R889, only if the type == view
the SQL will return from view query
.
I think that on current, or older versions where the bug does not exist, the user will get 2 views returned, one from the table query and one from the view query. The test in this PR is not accurate, it only tests that at least one view is returned. In the SQLAlchemy library, I had to allow for the bug in certain versions: https://github.com/datafuselabs/databend-sqlalchemy/blob/3226f10e0f8b6aa85185208583977037b33ec99f/databend_sqlalchemy/databend_dialect.py#L819
There is a condition https://github.com/datafuselabs/databend-jdbc/pull/262/files#diff-edd43fca3337c0ab2e0fa92af785f7021454a5485f2aea20e11b73fc50ae51d4R889, only if the
type == view
the SQL will return fromview query
.
I'll be reworking the codes this week to make it as compatible and adaptable as possible with different versions of databend.
@cdmikechen Hi bro , what's the pr progressing?
@hantmac I'm sorry things have been a little busy lately. I will try to take care of this pr when I have time recently.
Linked issue: https://github.com/datafuselabs/databend-jdbc/issues/261