kyuubi/extensions
Cheng Pan 71e46bd316
[KYUUBI #4076] [AUTHZ] Modified query plan should correctly report stats
### _Why are the changes needed?_

It was reported in https://github.com/apache/kyuubi/discussions/4063

When run `SHOW DATABASES;` on Databricks Runtime, the error occurs

```
com.databricks.backend.common.rpc.SparkDriverExceptions$SQLExecutionException: java.lang.UnsupportedOperationException
	at org.apache.spark.sql.catalyst.plans.logical.LeafNode.computeStats(LogicalPlan.scala:183)
	at org.apache.spark.sql.catalyst.plans.logical.LeafNode.computeStats$(LogicalPlan.scala:183)
	at org.apache.kyuubi.plugin.spark.authz.util.ObjectFilterPlaceHolder.computeStats(ObjectFilterPlaceHolder.scala:23)
	at org.apache.spark.sql.catalyst.plans.QueryPlanStats.$anonfun$stats$1(QueryPlanStats.scala:39)
	at scala.Option.getOrElse(Option.scala:189)
	at org.apache.spark.sql.catalyst.plans.QueryPlanStats.stats(QueryPlanStats.scala:38)
	at org.apache.spark.sql.catalyst.plans.QueryPlanStats.stats$(QueryPlanStats.scala:38)
	at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.stats(LogicalPlan.scala:31)
```

### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4076 from pan3793/stats.

Closes #4076

8238f317 [Cheng Pan] ut
a3c5f7d3 [Cheng Pan] [AUTHZ] Modified query plan should correctly report stats

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2023-01-04 18:04:33 +08:00
..
server/kyuubi-server-plugin [KYUUBI #3897] Supplying pluggable GroupProvider 2022-12-05 19:30:33 +08:00
spark [KYUUBI #4076] [AUTHZ] Modified query plan should correctly report stats 2023-01-04 18:04:33 +08:00
README.md

For developers

This folder contains plugins/extension for kyuubi server and different engine types.

  • ext
    • kyuubi-server
    • spark
    • flink
    • trino
    • hive
    • others
    • ...