Skip to content

bug: create_table/insert wrong context execution for Table #11683

@memeplex

Description

@memeplex

What happened?

I believe this may be a bug.

import ibis

bq_con = ibis.bigquery.connect(...)
dd_con = ibis.duckdb.connect()

bq_t = bq_con.table("foo")
dd_con.create_table("foo", bq_t.head(10), overwrite=True)

raises BinderException: Binder Error: Catalog "..." does not exist!, where ... is a catalog referenced from the source expression that doesn't exist in the target database and IMO should be resolved against the source database instead.

Also

dd_t = dd_con.create_table("head", schema=bq_t.schema(), overwrite=True)
dd_con.insert("head", bq_t.head(10))

suffers from the same issue.

Related discussion: #11681

What version of ibis are you using?

10.8.2

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

duckdb, bigquery (but can be reproduced with just two duckdb databases)

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