Skip to content

Compatible with CockroachDB function TO_DATE #23889

@intech

Description

@intech

In file /superset/db_engine_specs/cockroachdb.py need to add the override method:

if isinstance(sqla_type, Date):
return f"TO_DATE('{dttm.date().isoformat()}', 'YYYY-MM-DD')"

And change to the TO_CHAR function:

return f"TO_CHAR('{dttm.date().isoformat()}', 'YYYY-MM-DD')" 

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