stackabletech / stackabletech/superset-operator

"SEE TABLE SCHEMA" queries to trino never finish

Open
#661 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
35
Forks
4
Avg merge
12h 20m
Merged PRs (30d)
10

Description

We found a very ugly issue when connecting superset to trino. A user has reported that superset is very slow and no query is processed sometimes. We found out that superset does not finish its queries when somebody selects a table (iceberg) in the "SEE TABLE SCHEMA" dropdown. Combined with our resource pools (users can submit only 5 queries at a time, 6th will be queued) that's definitely a customer facing problem for us.

Image

3 Queries to trino are fired from superset which are all the same

SELECT * FROM default."tablename$partitions"
Image

Superset already gets a result after couple of seconds and displays the table schema but the query stays in state "FINISHING" until a timeout of ~5mins is hit. The query then is abandoned by trino itself.

io.trino.spi.TrinoException: Query 20250828_082847_00409_ksycd was abandoned by the client, as it may have exited or stopped checking for query results. Query results have not been accessed since 2025-08-28T08:28:49.874Z: currentTime 2025-08-28T08:33:50.786Z
	at io.trino.execution.QueryTracker.failAbandonedQueries(QueryTracker.java:275)
	at io.trino.execution.QueryTracker.lambda$start$0(QueryTracker.java:83)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Do you have an idea what to do? Maybe you know that already?

Edit: The tables have a bigger amount of partitions, we didn't manage to optimize them yet. Some of the tables have ~10.000 partitions (they are streaming destinations partitioned by processing-time for a spark application with 10min batches). Maybe that's relevant, but I don't think so because superset displays the schema just in time - it feels like just a thing of non terminating queries. According to trino superset fetches ~10000 rows and 5mb from those queries.

We are running superset:4.0.2-stackable25.3.0 and trino:451-stackable24.11.0 in that environment

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are identified in the issue. Start by reproducing the Superset "SEE TABLE SCHEMA" flow against Trino with an Iceberg table containing many partitions, then trace the three SELECT queries and their result polling. Done means the schema is displayed and the related Trino queries terminate instead of remaining in FINISHING until timeout.

Written by the indexing model from the issue text.

Assessment

Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.