This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new f4a739e85 [KYUUBI #5780][AUTHZ][FOLLOWUP] Format PermanentViewMarker
tree string
f4a739e85 is described below
commit f4a739e85593f1aefc021a3f31d4b9ee0aa1bb5b
Author: Angerszhuuuu <[email protected]>
AuthorDate: Fri Dec 1 13:09:37 2023 +0800
[KYUUBI #5780][AUTHZ][FOLLOWUP] Format PermanentViewMarker tree string
# :mag: Description
## Issue References ๐
This pull request fixes #5780
## Describe Your Solution ๐ง
Format PermanentViewMarker tree string
## Types of changes :bookmark:
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
```
Project [new_id2#100]
+- Project [new_id#102 AS new_id2#100]
+- RamPermanentViewMarker View (`test_default`.`my_view`, [new_id#102]),
`test_default`.`my_view`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
```
#### Behavior With This Pull Request :tada:
```
Project [new_id2#100]
+- Project [new_id#102 AS new_id2#100]
+- RamPermanentViewMarker
+- View (`test_default`.`my_view`, [new_id#102])
+- Project [cast(new_id#101 as int) AS new_id#102]
+- Project [id#103 AS new_id#101]
+- SubqueryAlias spark_catalog.test_default.v1
+- HiveTableRelation [`test_default`.`v1`,
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [id#103,
name#104, grade#105, sex#106], Partition Cols: []]
```
#### Related Unit Tests
---
# Checklists
## ๐ Author Self Checklist
- [x] My code follows the [style
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
of this project
- [x] I have performed a self-review
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature
works
- [x] New and existing unit tests pass locally with my changes
- [x] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
## ๐ Committer Pre-Merge Checklist
- [ ] Pull request title is okay.
- [ ] No license issues.
- [ ] Milestone correctly set?
- [ ] Test coverage is ok
- [ ] Assignees are selected.
- [ ] Minimum number of approvals
- [ ] No changes are requested
**Be nice. Be informative.**
Closes #5792 from AngersZhuuuu/KYUUBI-5780-FOLLOWUP.
Closes #5780
d38b7d1fc [Angerszhuuuu] trigger
3073f6efd [Angerszhuuuu] Update PermanentViewMarker.scala
a3f025bad [Angerszhuuuu] Update PermanentViewMarker.scala
432f1b5e1 [Angerszhuuuu] Update PermanentViewMarker.scala
6175e905c [Angerszhuuuu] [KYUUBI-5780][FOLLOWUP] Format PermanentViewMarker
tree string
Authored-by: Angerszhuuuu <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../plugin/spark/authz/rule/permanentview/PermanentViewMarker.scala | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/rule/permanentview/PermanentViewMarker.scala
b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/rule/permanentview/PermanentViewMarker.scala
index dd198c8b4..b84599e81 100644
---
a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/rule/permanentview/PermanentViewMarker.scala
+++
b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/rule/permanentview/PermanentViewMarker.scala
@@ -19,9 +19,14 @@ package
org.apache.kyuubi.plugin.spark.authz.rule.permanentview
import org.apache.spark.sql.catalyst.catalog.CatalogTable
import org.apache.spark.sql.catalyst.expressions.Attribute
+import org.apache.spark.sql.catalyst.plans.QueryPlan
import org.apache.spark.sql.catalyst.plans.logical.{LeafNode, LogicalPlan}
case class PermanentViewMarker(child: LogicalPlan, catalogTable: CatalogTable)
extends LeafNode {
override def output: Seq[Attribute] = child.output
+
+ override def argString(maxFields: Int): String = ""
+
+ override def innerChildren: Seq[QueryPlan[_]] = child :: Nil
}