Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue where virtual table slot keys were not being correctly identified, leading to potential errors in query planning. The changes ensure that the system accurately constructs slot keys for virtual tables by utilizing their reference names, and also refines the handling of primary timestamp column dependencies in virtual tables, improving the overall robustness of the query planner. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR addresses a planner failure (“slot key not found”) that occurs when building slot-key mappings for virtual table (vtable) scans, particularly around dependent/reference column handling.
Changes:
- Update
getSlotKey()to build slot keys forhasDepcolumns in virtual tables using the referenced (ref*) names rather than the virtual table’s own names. - Add logic in virtual normal/child table planning to convert a referenced primary timestamp column into a dependent column when no referenced-table scan nodes are created.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
source/libs/planner/src/planPhysiCreater.c |
Adjusts slot-key construction for dependent columns on virtual tables to use refDbName/refTableName/refColName. |
source/libs/planner/src/planLogicCreater.c |
Adds an edge-case handling block when pRefTablesMap is empty to flip primary-ts ref columns into dependent columns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b0daa43 to
af8caf7
Compare
af8caf7 to
d9e5dee
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ab215a1 to
a1984d9
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
source/libs/parser/src/parTranslater.c:5940
- This new
setColRef(&pMeta->colRef[0], ...)assumes that both the virtual table and the reference table have the timestamp column atschema[0]and thatcolRef[0]corresponds to that timestamp column. It would be safer to assert/checkpTsSchema->colId(andpRefTsSchema->colId) isPRIMARYKEY_TIMESTAMP_COL_ID(and thatpMeta->numOfColRefscovers index 0) before mutatingcolRef[0], otherwise this could accidentally set a ref for the wrong column if schema ordering differs.
// if there is only one reference table, we can set ts column's reference to it, which will be used when virtual
// table scan node is eliminated.
const SSchema* pTsSchema = &pMeta->schema[0];
const SSchema* pRefTsSchema = &pRTNode->pMeta->schema[0];
PAR_ERR_JRET(setColRef(&pMeta->colRef[0], pTsSchema->colId, (char*)pRefTsSchema->name, pRTNode->table.tableName,
pRTNode->table.dbName));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a1984d9 to
2c2f441
Compare
2c2f441 to
6edf7c8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ad path.
Description
Issue(s)
Checklist
Please check the items in the checklist if applicable.