questdb / questdb/questdb

selecting from a pseudo-table like table_partitions with a dot-prefixed name causes assertion error

Open
#6,406 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug external SQL
Dominant language
Java
Stars
17.3k
Forks
1.6k
Avg merge
5d 10h
Merged PRs (30d)
28

Description

To reproduce

Repro test:

 @Test
    public void testPseudoTableErrorOut() throws Exception {
        assertMemoryLeak(() -> {
            execute("create table \"a.b\" (ts timestamp);");
            assertPlanNoLeakCheck("select table_partitions('a.b');", "abc");
        });
    }

Expected behaviour:

Image

It is a pseudo table so should not be selected as a column. But it is allowed, if the table name has no ., it will return a record column filled with nulls.

QuestDB version:

9.2.0+

OS, in case of Docker specify Docker and the Host OS:

N/A

File System, in case of Docker specify Host File System:

N/A

Full Name:

Nick Woolmer

Affiliation:

QuestDB

Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?
  • Yes, I have
Additional context

No response

Contributor guide

Open the contributing guide

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

Start with the provided testPseudoTableErrorOut reproduction and trace how the pseudo-table name is resolved when it contains a dot. Run the reproduction against the existing query-planning tests, then verify that the dotted pseudo-table produces the expected error while the non-dotted case retains its documented behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.