kyuubi/extensions/spark
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
..
kyuubi-extension-spark-3-1 [KYUUBI #3988] Final stage config isolation support write only 2022-12-29 15:35:42 +08:00
kyuubi-extension-spark-3-2 [KYUUBI #3988] Final stage config isolation support write only 2022-12-29 15:35:42 +08:00
kyuubi-extension-spark-3-3 [KYUUBI #3988] Final stage config isolation support write only 2022-12-29 15:35:42 +08:00
kyuubi-extension-spark-common [KYUUBI #3988] Final stage config isolation support write only 2022-12-29 15:35:42 +08:00
kyuubi-extension-spark-jdbc-dialect [KYUUBI #3942] adapt Spark's JDBC data types to Hive data type definitions in KyuubiHiveDialect 2022-12-09 20:03:22 +08:00
kyuubi-spark-authz [KYUUBI #4076] [AUTHZ] Modified query plan should correctly report stats 2023-01-04 18:04:33 +08:00
kyuubi-spark-connector-common [KYUUBI #3842] [Improvement] Support maven pom.xml code style check with spotless plugin 2022-11-23 22:08:00 +08:00
kyuubi-spark-connector-hive [KYUUBI #3864] Add missing log4j2-test.xml for Kyuubi Spark Hive Connector 2022-11-28 19:53:30 +08:00
kyuubi-spark-connector-kudu [KYUUBI #3842] [Improvement] Support maven pom.xml code style check with spotless plugin 2022-11-23 22:08:00 +08:00
kyuubi-spark-connector-tpcds [KYUUBI #3842] [Improvement] Support maven pom.xml code style check with spotless plugin 2022-11-23 22:08:00 +08:00
kyuubi-spark-connector-tpch [KYUUBI #3842] [Improvement] Support maven pom.xml code style check with spotless plugin 2022-11-23 22:08:00 +08:00
kyuubi-spark-lineage [KYUUBI #4033] [KYUUBY #3978] add DatasourceV2 command support 2022-12-30 17:51:16 +08:00