Skip to content

bug: dropping a column from a table with >5 columns fails with sqlglot=28.0.0 #11775

@luca-ferreri

Description

@luca-ferreri

What happened?

When using Ibis with sqlglot=28.0.0, we encounter an error after dropping a column from a table that originally has more than five columns. For instance, the following

import ibis
import pandas as pd


df = pd.DataFrame(
    [["a", 1, 2, 5, 6], ["b", 3, 4, 7, 8]],
    columns=["one", "two", "three", "four", "five"],
    index=[5, 6],
)
t = ibis.memtable(df)
t.execute()
t = t.drop("three")
t.execute()

results in ValueError: schema names don't match input data columns

while we have no problem if the table has less than five columns

What version of ibis are you using?

11.0.0

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

duckdb==1.4.2

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