Skip to content

fix(pinot): support tesseract select template#11001

Open
seanm-stripe wants to merge 2 commits into
cube-js:masterfrom
seanm-stripe:seanm/fix-pinot-tesseract-from
Open

fix(pinot): support tesseract select template#11001
seanm-stripe wants to merge 2 commits into
cube-js:masterfrom
seanm-stripe:seanm/fix-pinot-tesseract-from

Conversation

@seanm-stripe
Copy link
Copy Markdown

Check List

  • Tests have been run in packages where changes have been made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

Fixes #10988

Description of Changes Made (if issue reference is not provided)

This updates the Pinot statements.select SQL template to support Tesseract planner inputs such as from_prepared.

Previously, Pinot overrode the base select template with an older template that only rendered {{ from }} and {{ from_alias }}. When CUBEJS_TESSERACT_SQL_PLANNER=true, Tesseract can pass the source table through from_prepared, which caused Pinot SQL for sql_table cubes to render an empty subquery:

FROM (

) AS

The Pinot template now preserves the base select template behavior for Tesseract-facing variables, including from_prepared, while keeping Pinot’s dialect-specific OFFSET before LIMIT ordering (which is why we can't just use BaseQuery)

This also adds regression coverage for a Pinot sql_table cube using the native SQL planner to verify that generated SQL renders the table source and does not emit an empty FROM () AS clause.

@github-actions github-actions Bot added javascript Pull requests that update Javascript code data source driver driver:pinot pr:community Contribution from Cube.js community members. labels Jun 2, 2026
seanm-stripe and others added 2 commits June 3, 2026 10:48
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@seanm-stripe seanm-stripe force-pushed the seanm/fix-pinot-tesseract-from branch from b64af08 to 570c9b5 Compare June 3, 2026 17:48
@seanm-stripe seanm-stripe marked this pull request as ready for review June 3, 2026 17:51
@seanm-stripe seanm-stripe requested a review from a team as a code owner June 3, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data source driver driver:pinot javascript Pull requests that update Javascript code pr:community Contribution from Cube.js community members.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tesseract planner generates empty FROM clause for Pinot sql_table cubes

1 participant