You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "j1wonpark (via GitHub)" <gi...@apache.org> on 2026/09/15 21:57:08 UTC
[PR] [KYUUBI #7746][AUTHZ] Report nondeterministic permanent views as nondeterministic to InlineCTE [kyuubi]
j1wonpark opened a new pull request, #7747:
URL: https://github.com/apache/kyuubi/pull/7747
### Why are the changes needed?
Fixes #7746.
`PermanentViewMarker` is a `LeafNode`, so `QueryPlan.deterministic` reports `true` for any
permanent view, even one over `rand()`, `uuid()` or `reflect()`. `InlineCTE` reads that flag and
inlines a nondeterministic view CTE that is referenced more than once, so each reference
recomputes the view and, for expressions that draw a fresh value per evaluation, the references
disagree. Without authz Spark keeps the CTE out of line and shares one `ReusedExchange`.
This overrides `deterministic` to delegate to the wrapped plan. The same flag feeds
`SubqueryExpression.deterministic`, so subqueries over such a view are classified the same way
as without authz.
`override lazy val` compiles against both the `lazy val` in Spark 3.5 and the `def` in 4.0+.
### How was this patch tested?
Two tests in `HiveCatalogRangerSparkExtensionSuite`:
- a `uuid()` view referenced twice through a CTE keeps a `RepartitionByExpression` in the
optimized plan and a `ReusedExchange` in the executed plan;
- a `reflect('java.util.UUID', 'randomUUID')` view referenced twice through a CTE yields the same
value for both references.
Both fail with `PermanentViewMarker` reverted to master and pass with the change, on Spark 3.5.8,
4.0.3, 4.1.3 and 4.2.0.
### Was this patch assisted by generative AI tooling?
Assisted-by: Claude Fable 5.1
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #7746][AUTHZ] Report nondeterministic permanent views as nondeterministic to InlineCTE [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #7747:
URL: https://github.com/apache/kyuubi/pull/7747#issuecomment-5750968181
**Merge Summary:**
- merged into master https://github.com/apache/kyuubi/commit/df5aa6c8b966d868f5ad2a0d4f5d148ebddc63ba
- merged into branch-1.12 https://github.com/apache/kyuubi/commit/fdb6c667deaac469243e83ccb480b5cbc90ca92d
- merged into branch-1.11 https://github.com/apache/kyuubi/commit/3ffd0ee9b1ea59242ac444aa3bf0cfaad1f0b6d5
- merged into branch-1.10 https://github.com/apache/kyuubi/commit/0cd1bff191d4c5e0b16688d54808f47a92839a77
*Posted by `merge_kyuubi_pr.py`*
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #7746][AUTHZ] Report nondeterministic permanent views as nondeterministic to InlineCTE [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #7747: [KYUUBI #7746][AUTHZ] Report nondeterministic permanent views as nondeterministic to InlineCTE
URL: https://github.com/apache/kyuubi/pull/7747
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org