Hi Shaurya, Thank you for the proposal and for initiating the Draft PR (#17270). The approach you've outlined for supporting the DESCRIBE QUERY statement in the Table Model looks solid, especially the integration with TableModelStatementMemorySourceVisitor to handle the metadata return.
The plan to skip full execution and return only the analyzed schema via QueryExecution is the correct direction for this feature. I will continue to follow your progress on the PR and provide more detailed feedback there as you integrate the MemorySource logic. Looking forward to seeing the updates. Best regards, Yuan Tian On Sun, Mar 8, 2026 at 13:53 Shaurya Vardhan <[email protected]> wrote: > Hi everyone, > > I am Shaurya Vardhan Singh Chauhan, a B.Tech Computer Science student and > an aspiring contributor to Apache IoTDB. I am writing to propose and > discuss the implementation of the *DESCRIBE QUERY* statement for the IoTDB > Table Model. > > *Goal:* The goal is to allow users to extract relational metadata (column > names and data types) from a given query without actually executing the > full query. This is particularly useful for client-side applications and BI > tools that need to understand the schema of a result set beforehand. > > *Proposed Implementation:* I have already initiated a Draft Pull Request ( > *#17270*) to start the framework. Based on initial feedback from Yuan Tian > (@JackieTien97), the planned approach is: > > 1. > > *Grammar & AST:* Added DESCRIBE QUERY syntax and corresponding AST > nodes. > 2. > > *Analysis:* Using StatementAnalyzer to perform semantic analysis and > extract output symbols. > 3. > > *Execution:* Instead of creating a new physical operator, I will use > TableModelStatementMemorySourceVisitor to return the metadata as a > result set. > 4. > > *Optimization:* Handling the logic in QueryExecution to ensure the > actual query execution is skipped when isDescribe is true, returning > only the analyzed schema. > > *Current Progress:* The local build is successful, and the analyzer is > currently able to log the metadata. I am now working on integrating the > MemorySource logic as suggested by the mentors. > > I would highly appreciate any feedback, suggestions, or concerns the > community might have regarding this approach. > > *Draft PR Link:* https://github.com/apache/iotdb/pull/17270 > > Regards, Shaurya Vardhan Singh Chauhan >
