Skip to content

bug: Flink dialect generate incorrect DDL for Create expression #11633

@gabry-lab

Description

@gabry-lab

What happened?

For example, here is a Create expression

create_table = exp.Create(
        kind="TABLE",
        this=exp.Schema(
            this=exp.Table(this=exp.Identifier(this="employees")),
            expressions=[
                exp.ColumnDef(this=exp.Identifier(this="id"), kind=exp.DataType.build("INT")),
                exp.ColumnDef(this=exp.Identifier(this="name"), kind=exp.DataType.build("STRING")),
            ],
        ),
        properties=exp.Properties(
            expressions=[exp.Property(this=exp.Literal.string("connector"), value=exp.Literal.string("kafka"))]
        ),
    )

The Flink dialect will generate SQL like this

CREATE TABLE employees (id INT, name VARCHAR) TBLPROPERTIES ('connector'='kafka')

The DDL should be this

CREATE TABLE employees (id INT, name VARCHAR) WITH ('connector'='kafka')

What version of ibis are you using?

4.0.1

What backend(s) are you using, if any?

No response

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior inside of ibis

    Type

    No type

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions