Hi Yuan Tian, I have updated the PR (#17270) with the suggested changes:
1. *Syntax*: The syntax is now DESCRIBE <selectStatement>. I have removed the redundant QUERY keyword as suggested. 2. *Debug Info*: All System.out.println statements have been removed from StatementAnalyzer.java, QueryExecution.java, and other files. 3. *Comments*: I have refined the code comments and removed any redundant artifacts or AI-generated noise. 4. *Code Quality*: I have verified the build and applied formatting using mvn spotless:apply. Please let me know if any further adjustments are needed. Thank you for your guidance! Best regards, *Shaurya Vardhan Singh Chauhan* On Mon, Mar 9, 2026 at 6:54 AM Yuan Tian <[email protected]> wrote: > You can fix all the comments by copilot, and before you think the pr is > ready for review, you should double-check by yourself, avoid debug info > like `System.out.println ` codes in your pr. > > On Sun, Mar 8, 2026 at 10:43 PM Shaurya Vardhan < > [email protected]> wrote: > > > SUBJECT: Update on PR #17270: Implementation of DescribeQuery with > > MemorySource Integration > > > > Hi Yuan Tian, > > > > I hope you're doing well. > > > > Following your suggestions in the previous email, I have successfully > > integrated the *DescribeQuery* feature with the *MemorySource* framework > in > > the latest update to *PR #17270*. > > > > *Here is a summary of the implementation details:* > > > > 1. > > > > *StatementAnalyzer*: I have implemented the visitDescribeQuery method > > and used analysis.setFinishQueryAfterAnalyze(true) to signal that the > > physical execution should be bypassed after the analysis phase. > > 2. > > > > *QueryExecution*: I updated the skipExecute() logic to check for the > > isFinishQueryAfterAnalyze flag. This ensures that the engine skips the > > logical and distributed planning and directly triggers > > constructResultForMemorySource(). > > 3. > > > > *MemorySource Integration*: I've implemented the > > TableModelStatementMemorySourceVisitor to construct the result TsBlock > > containing the column names and data types, as per your guidance. > > 4. > > > > *Verification*: I have formatted the code using mvn spotless:apply and > > verified the build with mvn clean install -pl iotdb-core/datanode -am > > -DskipTests. The build is successful. > > > > The PR is now ready for your review. I am looking forward to any feedback > > or further suggestions you may have. > > > > Best regards, > > > > *Shaurya Vardhan Singh Chauhan* > > > > Computer Science & Engineering Student > > > > NIT Kurukshetra > > > > On Sun, Mar 8, 2026 at 2:17 PM Yuan Tian <[email protected]> wrote: > > > > > 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 > > > > > > > > > >
