You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "Zouxxyy (via GitHub)" <gi...@apache.org> on 2026/03/30 09:56:06 UTC

[PR] [spark] Fix view resolution for CTE and ORDER BY ordinal [paimon]

Zouxxyy opened a new pull request, #7552:
URL: https://github.com/apache/paimon/pull/7552

   ### Purpose
   
   Fix PaimonViewResolver to apply early analysis rules (CTESubstitution, SubstituteUnresolvedOrdinals) to parsed view plans. These rules run in Spark's earlyBatches before the Resolution batch, so they won't re-run for plans injected by PaimonViewResolver during resolution.
   
   Without this fix:
   - Views with CTE (`WITH t AS ...`) fail with `TABLE_OR_VIEW_NOT_FOUND`
   - Views with `ORDER BY 1` (ordinal) produce incorrect results
   
   ### Tests
   
   Add tests in `PaimonViewTestBase`:
   - `Paimon View: create view with CTE`
   - `Paimon View: create view with ORDER BY ordinal`


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [spark] Fix view resolution for CTE and ORDER BY ordinal [paimon]

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


-- 
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: issues-unsubscribe@paimon.apache.org

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