Skip to content

CTE(common table expression) support for query #1326

@linux-china

Description

@linux-china

CTE is a very important feature for complex query, and now it's forbidden because of SQL query validation.

    @Test
    fun testJdbc() {
        val conn = pgConnection()
        conn.readDataFrame(
            "WITH shop_item2 AS (SELECT * FROM shop_item) SELECT * FROM shop_item2", dbType = PostgreSql
        ).print()
    }

Stacktrace:

SQL query should start from SELECT and contain one query for reading data without any manipulation. Also it should not contain any separators like `;`.
java.lang.IllegalArgumentException: SQL query should start from SELECT and contain one query for reading data without any manipulation. Also it should not contain any separators like `;`.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions