Skip to content

Double quotes inconsistency in WITH clause #710

Open
@gandroz

Description

@gandroz

Working with Oracle databases can be tricky sometime, especially with double quotes and aliases. In the current state, there is a bug around the WITH clause that does not encapsulate the alias inside double quotes which is inconsistent with other clauses. It can lead to invalid identifier on Oracale as demonstrated with the query

sub_query = Query().from_(my_table).where(my_table.ID == "12345").select(my_table.ID)

QN = AliasedQuery("sub_query_with")

query = (
    Query()
    .with_(sub_query, "sub_query_with")
    .from_(QN)
    .select(
        QN.star
    )
)

df_temp = claim_conn.read_dataframe(query.get_sql())

A workaround has been proposed here working with UPPERCASE aliases, but with a proper management of double quotes inside WITH clause it would be better

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions