-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Some JDBC driver don't implement the CREATE TABLE tablename AS SELECT... DDL.
This is the case for Firebird (e.g., Interbase), and it poses the problem that many connector tests fail not because of the functionality being tested, but because CREATE TABLE AS... is used to create the temp test table.
See: BaseConnectorTest.testDelete()
If no support is available, the following Trino commands can be used as a replacement:
CREATE TABLE tablename (LIKE sourceTable)INSERT INTO tablename SELECT * FROM sourceTable
The same problem is encountered if one tries to use transactional inserts (which is the default configuration), and it is necessary to disable their use by setting the insert.non-transactional-insert.enabled property to true.
In a perfect world, it should be possible to have a dedicated property for this type of support for each connector, and Trino should be able to function without problems in its tests and implementation of transactional insert /merge.
But adding such support will surely create difficulties that I'm currently struggling to anticipate. Thank you for any clarification.