Skip to content

Reusing the same name for WithExternalTable gives nondeterministic results #1724

@mdonkers

Description

@mdonkers

Heavily related to ClickHouse/ClickHouse#90678
But since I'm not getting a response I don't really know if I should treat this as a bug, or whether I somehow need to clean up old data.

Observed

  1. We're running several sequential queries using WithExternalTable but always with the same name. The data of the table is different every time though, and used for WHERE ... IN filtering
  2. Regularly (about 1/5 - 1/10 of the queries) we see results being returned that do not match with the supplied WithExternalTable data
  3. Investigating further shows that the incorrect results match data from a previous WithExternalTable usage, meaning that data must have somehow been kept around

Expected behaviour

Use of WithExternalTable is deterministic. Or it should be clear when/how to cleanup this data. We've tried DROP [TEMPORARY] TABLE ... but this always fails.

Details

See ClickHouse/ClickHouse#90678

Environment

  • clickhouse-go version: 2.40.2
  • Interface: ClickHouse API (native)
  • Go version: 1.25.4
  • Operating system: Linux
  • ClickHouse version: 25.6.13
  • Is it a ClickHouse Cloud? No
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved: -
  • Sample data for all these tables, use clickhouse-obfuscator if necessary

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions