You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "shauryachats (via GitHub)" <gi...@apache.org> on 2026/01/15 06:01:40 UTC

[PR] [timeseries] Added query options and explain plan support for Controller UI [pinot]

shauryachats opened a new pull request, #17511:
URL: https://github.com/apache/pinot/pull/17511

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [timeseries] Introduced query options and explain plan support for Controller UI [pinot]

Posted by "jayeshchoudhary (via GitHub)" <gi...@apache.org>.
jayeshchoudhary commented on PR #17511:
URL: https://github.com/apache/pinot/pull/17511#issuecomment-3753777730

   Some questions and suggestions
   
   - why is explain plan a checkbox? can't it run everytime query runs just like the V2 engine?
   - do we support visual rendering of explain plan? I see only text now. 
   - In query options - what if we pass a valid json but incorrect or unrecognised value / keys? 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [timeseries] Introduced query options and explain plan support for Controller UI [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #17511:
URL: https://github.com/apache/pinot/pull/17511#issuecomment-3753136132

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/17511?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 55.51%. Comparing base ([`d0a6aba`](https://app.codecov.io/gh/apache/pinot/commit/d0a6aba30bdad4dc0179ecd189d42ff2913b71a9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a8b0634`](https://app.codecov.io/gh/apache/pinot/commit/a8b0634687c96131736e2393cd2a13ba6eb1dc92?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 4 commits behind head on master.
   > :exclamation:  There is a different number of reports uploaded between BASE (d0a6aba) and HEAD (a8b0634). Click for more details.
   > 
   > <details><summary>HEAD has 20 uploads less than BASE</summary>
   >
   >| Flag | BASE (d0a6aba) | HEAD (a8b0634) |
   >|------|------|------|
   >|java-21|3|1|
   >|unittests1|2|1|
   >|unittests|4|1|
   >|temurin|6|1|
   >|java-11|3|0|
   >|unittests2|2|0|
   >|integration|2|0|
   >|integration2|2|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #17511      +/-   ##
   ============================================
   - Coverage     63.21%   55.51%   -7.71%     
   + Complexity     1470      702     -768     
   ============================================
     Files          3167     2473     -694     
     Lines        189248   139816   -49432     
     Branches      28960    22290    -6670     
   ============================================
   - Hits         119642    77617   -42025     
   + Misses        60307    55642    -4665     
   + Partials       9299     6557    -2742     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.51% <ø> (-7.69%)` | :arrow_down: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.51% <ø> (-7.71%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.51% <ø> (-7.71%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.51% <ø> (-0.04%)` | :arrow_down: |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/17511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/17511?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [timeseries] Introduced query options and explain plan support for Controller UI [pinot]

Posted by "shauryachats (via GitHub)" <gi...@apache.org>.
shauryachats commented on code in PR #17511:
URL: https://github.com/apache/pinot/pull/17511#discussion_r2696710849


##########
pinot-controller/src/main/resources/app/components/Query/TimeseriesQueryPage.tsx:
##########
@@ -448,25 +560,61 @@ const TimeseriesQueryPage = () => {
       )}
 
       <Grid item xs={12} className={classes.rightPanel}>
-        <Resizable
-          defaultSize={{ width: '100%', height: 148 }}
-          minHeight={148}
-          maxWidth={'100%'}
-          maxHeight={'50vh'}
-          enable={{bottom: true}}>
-          <div className={classes.sqlDiv}>
+        <div className={classes.editorRow} ref={editorContainerRef}>
+          <Resizable
+            size={{ width: `${editorWidthPercent}%`, height: editorHeight }}
+            minHeight={EDITOR_MIN_HEIGHT}
+            minWidth={`${EDITOR_MIN_WIDTH_PERCENT}%`}
+            maxWidth={`${EDITOR_MAX_WIDTH_PERCENT}%`}
+            maxHeight={'50vh'}
+            enable={{ bottom: true, right: true, bottomRight: true }}
+            onResize={(event, direction, ref) => {
+              setEditorHeight(ref.offsetHeight);
+              if (editorContainerRef.current && (direction === 'right' || direction === 'bottomRight')) {
+                const containerWidth = editorContainerRef.current.offsetWidth;
+                const newPercent = Math.min(EDITOR_MAX_WIDTH_PERCENT, Math.max(EDITOR_MIN_WIDTH_PERCENT, (ref.offsetWidth / containerWidth) * 100));
+                setEditorWidthPercent(newPercent);
+              }
+            }}
+          >
+            <div className={classes.sqlDiv}>
+              <TableToolbar
+                name="Timeseries Query Editor"
+                showSearchBox={false}
+                showTooltip={true}
+                tooltipText="This editor supports timeseries queries. Enter your M3QL query here."
+              />
+              <CodeMirror
+                value={config.query}
+                onChange={handleQueryChange}
+                options={{
+                  lineNumbers: true,
+                  mode: 'text/plain',
+                  theme: 'default',
+                  lineWrapping: true,
+                  indentWithTabs: true,
+                  smartIndent: true,
+                  readOnly: supportedLanguages.length === 0,
+                }}
+                className={classes.codeMirror}
+                autoCursor={false}
+                onKeyDown={(editor, event) => handleQueryInterfaceKeyDownRef.current(editor, event)}
+              />
+            </div>
+          </Resizable>
+          <div className={`${classes.sqlDiv} ${classes.queryOptionsPanel}`} style={{ height: editorHeight }}>
             <TableToolbar
-              name="Timeseries Query Editor"
+              name="Query Options (JSON)"
               showSearchBox={false}
               showTooltip={true}
-              tooltipText="This editor supports timeseries queries. Enter your M3QL query here."
+              tooltipText={`Enter query options as a JSON map of strings, e.g. {"enableNullHandling": "true"}`}
             />

Review Comment:
   Addressed.
   <img width="313" height="254" alt="Screenshot 2026-01-15 at 7 15 37 PM" src="https://github.com/user-attachments/assets/9837abf0-a9db-4bf2-8c89-1bd95faf80aa" />
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [timeseries] Introduced query options and explain plan support for Controller UI [pinot]

Posted by "jayeshchoudhary (via GitHub)" <gi...@apache.org>.
jayeshchoudhary commented on code in PR #17511:
URL: https://github.com/apache/pinot/pull/17511#discussion_r2693643011


##########
pinot-controller/src/main/resources/app/components/Query/TimeseriesQueryPage.tsx:
##########
@@ -448,25 +560,61 @@ const TimeseriesQueryPage = () => {
       )}
 
       <Grid item xs={12} className={classes.rightPanel}>
-        <Resizable
-          defaultSize={{ width: '100%', height: 148 }}
-          minHeight={148}
-          maxWidth={'100%'}
-          maxHeight={'50vh'}
-          enable={{bottom: true}}>
-          <div className={classes.sqlDiv}>
+        <div className={classes.editorRow} ref={editorContainerRef}>
+          <Resizable
+            size={{ width: `${editorWidthPercent}%`, height: editorHeight }}
+            minHeight={EDITOR_MIN_HEIGHT}
+            minWidth={`${EDITOR_MIN_WIDTH_PERCENT}%`}
+            maxWidth={`${EDITOR_MAX_WIDTH_PERCENT}%`}
+            maxHeight={'50vh'}
+            enable={{ bottom: true, right: true, bottomRight: true }}
+            onResize={(event, direction, ref) => {
+              setEditorHeight(ref.offsetHeight);
+              if (editorContainerRef.current && (direction === 'right' || direction === 'bottomRight')) {
+                const containerWidth = editorContainerRef.current.offsetWidth;
+                const newPercent = Math.min(EDITOR_MAX_WIDTH_PERCENT, Math.max(EDITOR_MIN_WIDTH_PERCENT, (ref.offsetWidth / containerWidth) * 100));
+                setEditorWidthPercent(newPercent);
+              }
+            }}
+          >
+            <div className={classes.sqlDiv}>
+              <TableToolbar
+                name="Timeseries Query Editor"
+                showSearchBox={false}
+                showTooltip={true}
+                tooltipText="This editor supports timeseries queries. Enter your M3QL query here."
+              />
+              <CodeMirror
+                value={config.query}
+                onChange={handleQueryChange}
+                options={{
+                  lineNumbers: true,
+                  mode: 'text/plain',
+                  theme: 'default',
+                  lineWrapping: true,
+                  indentWithTabs: true,
+                  smartIndent: true,
+                  readOnly: supportedLanguages.length === 0,
+                }}
+                className={classes.codeMirror}
+                autoCursor={false}
+                onKeyDown={(editor, event) => handleQueryInterfaceKeyDownRef.current(editor, event)}
+              />
+            </div>
+          </Resizable>
+          <div className={`${classes.sqlDiv} ${classes.queryOptionsPanel}`} style={{ height: editorHeight }}>
             <TableToolbar
-              name="Timeseries Query Editor"
+              name="Query Options (JSON)"
               showSearchBox={false}
               showTooltip={true}
-              tooltipText="This editor supports timeseries queries. Enter your M3QL query here."
+              tooltipText={`Enter query options as a JSON map of strings, e.g. {"enableNullHandling": "true"}`}
             />

Review Comment:
   we should point users to documentation or something where they can find accepted query options



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [timeseries] Introduced query options and explain plan support for Controller UI [pinot]

Posted by "shauryachats (via GitHub)" <gi...@apache.org>.
shauryachats commented on code in PR #17511:
URL: https://github.com/apache/pinot/pull/17511#discussion_r2695250516


##########
pinot-controller/src/main/resources/app/components/Query/TimeseriesQueryPage.tsx:
##########
@@ -448,25 +560,61 @@ const TimeseriesQueryPage = () => {
       )}
 
       <Grid item xs={12} className={classes.rightPanel}>
-        <Resizable
-          defaultSize={{ width: '100%', height: 148 }}
-          minHeight={148}
-          maxWidth={'100%'}
-          maxHeight={'50vh'}
-          enable={{bottom: true}}>
-          <div className={classes.sqlDiv}>
+        <div className={classes.editorRow} ref={editorContainerRef}>
+          <Resizable
+            size={{ width: `${editorWidthPercent}%`, height: editorHeight }}
+            minHeight={EDITOR_MIN_HEIGHT}
+            minWidth={`${EDITOR_MIN_WIDTH_PERCENT}%`}
+            maxWidth={`${EDITOR_MAX_WIDTH_PERCENT}%`}
+            maxHeight={'50vh'}
+            enable={{ bottom: true, right: true, bottomRight: true }}
+            onResize={(event, direction, ref) => {
+              setEditorHeight(ref.offsetHeight);
+              if (editorContainerRef.current && (direction === 'right' || direction === 'bottomRight')) {
+                const containerWidth = editorContainerRef.current.offsetWidth;
+                const newPercent = Math.min(EDITOR_MAX_WIDTH_PERCENT, Math.max(EDITOR_MIN_WIDTH_PERCENT, (ref.offsetWidth / containerWidth) * 100));
+                setEditorWidthPercent(newPercent);
+              }
+            }}
+          >
+            <div className={classes.sqlDiv}>
+              <TableToolbar
+                name="Timeseries Query Editor"
+                showSearchBox={false}
+                showTooltip={true}
+                tooltipText="This editor supports timeseries queries. Enter your M3QL query here."
+              />
+              <CodeMirror
+                value={config.query}
+                onChange={handleQueryChange}
+                options={{
+                  lineNumbers: true,
+                  mode: 'text/plain',
+                  theme: 'default',
+                  lineWrapping: true,
+                  indentWithTabs: true,
+                  smartIndent: true,
+                  readOnly: supportedLanguages.length === 0,
+                }}
+                className={classes.codeMirror}
+                autoCursor={false}
+                onKeyDown={(editor, event) => handleQueryInterfaceKeyDownRef.current(editor, event)}
+              />
+            </div>
+          </Resizable>
+          <div className={`${classes.sqlDiv} ${classes.queryOptionsPanel}`} style={{ height: editorHeight }}>
             <TableToolbar
-              name="Timeseries Query Editor"
+              name="Query Options (JSON)"
               showSearchBox={false}
               showTooltip={true}
-              tooltipText="This editor supports timeseries queries. Enter your M3QL query here."
+              tooltipText={`Enter query options as a JSON map of strings, e.g. {"enableNullHandling": "true"}`}
             />

Review Comment:
   That's a good point. The issue is that the query options can vary based on the timeseries plugin implementation which is upto the developer, and hence we cannot provide a complete set of query options. We can probably link v1 engine's query options though.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [timeseries] Introduced query options and explain plan support for Controller UI [pinot]

Posted by "ankitsultana (via GitHub)" <gi...@apache.org>.
ankitsultana merged PR #17511:
URL: https://github.com/apache/pinot/pull/17511


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [timeseries] Introduced query options and explain plan support for Controller UI [pinot]

Posted by "shauryachats (via GitHub)" <gi...@apache.org>.
shauryachats commented on PR #17511:
URL: https://github.com/apache/pinot/pull/17511#issuecomment-3756060683

   @jayeshchoudhary thanks for the questions.
   1. Explain plan is a check box since it is a separate mode instead of encoding it in the language syntax (like v1 or v2 engine does) to timeseries language developers to accomodate and worry about explain plan semantics in their language. In v1 or v2, the explain plan is baked in the SQL syntax.
   2. I don't think explain plans visually are supported even in v1 or v2 engine. Definitely a good idea to explore in the future.
   3. If there is an incorrect or unrecognized value/keys: those query options would be silently ignored just like the current v1 or v2 engine.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org