Open findepi opened 4 years ago
So this should create table as connector supports this?
Yes, the expected behavior from my POV is that beginCreateTable()
should not be called, and createTable
should be called instead.
cc @kokosing @martint
Sounds good to me. I think the current implementation in the engine is a hack that needs to be fixed.
The thing is that this query should not run any sql query execution. It should be a DDL task. All we care is the output schema of query, so output from analysis should be enough.
io.prestosql.spi.connector.ConnectorMetadata#createTable
), but not creating tables with data (io.prestosql.spi.connector.ConnectorMetadata#beginCreateTable
).CREATE TABLE new_table AS SELECT * FROM tpch.tiny.nation WITH NO DATA
Currently this fails with:
-- the exception message ("... with data") is confusing, since user explicitly asked to create table WITHOUT data.