WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Support for JDBC driver not providing CREATE TABLE AS #27510

@prrvchr

Description

@prrvchr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions