nineinchnick / trino-faker

Trino plugin that generates fake data
Apache License 2.0
13 stars 2 forks source link

Support CREATE TABLE AS ... WITH NO DATA #25

Closed nineinchnick closed 2 years ago

nineinchnick commented 2 years ago

Implement a noop page sink so that queries like this would work:

create table faker.default.query_plan as select * from postgresql.public.query_plan with no data;

instead of throwing an error like:

No page sink provider for catalog 'faker'

Using CTAS is a workaround for CREATE TABLE LIKE not working across different catalogs.

nineinchnick commented 2 years ago

OTOH maybe Trino should not require a sink in this case.

nineinchnick commented 2 years ago

Done in 67534f7869707641092b18b32bf8d2b81f8368e1