Skip to content

SqlCatalog table operations should filter on iceberg_type #3337

Open

Description

@geruh

Feature Request / Improvement

In #3263, the iceberg_type column was added to the SQLCatalog and filters it in list_tables, but the other table operations (i.e. load_table, drop_table, rename_table, commit_table) don't check it yet. That means a view row written by iceberg java or iceberg-rust can bleed in pythons SQLCatalog table operations.

Java's V1 catalog applies WHERE (iceberg_type = 'TABLE' OR iceberg_type IS NULL) everywhere (JdbcUtil.java#L168). We should do the same.

Probably worth extracting a small helper since the predicate would now appear in ~5+ places.

Repro steps:

catalog = SqlCatalog("test", uri="sqlite:///...", warehouse="...")
catalog.create_namespace("ns")

# bypass and sim java/rust writing a view row
with catalog.engine.connect() as conn:
    conn.execute(text(
        "INSERT INTO iceberg_tables VALUES "
        "('test', 'ns', 'a_view', 's3://fake/m.json', NULL, 'VIEW')"
    ))
    conn.commit()

catalog.drop_table(("ns", "a_view"))  # Silently deletes the view row :/

Activity

  1. assigned and unassigned on May 8, 2026
  2. geruh commented on May 8, 2026

    @geruh
    MemberAuthor

    Looks like @rchowell will take this up!

  3. github-actions commented on Nov 5, 2026

    @github-actions

    This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions