flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-28074][table-planner] show statistics details for DESCRIBE EXTENDED

Open swuferhong opened this issue 2 years ago • 2 comments

What is the purpose of the change

At first, this PR only wanted to support syntax DESCRIBE EXTENDED to print table statistics. But now, this PR is aims to realize syntax DESCRIBE/DESC [EXTENDED] [catalog_name.][database_name.]table_name [PARTITION(partition_spec)] [col_name]. Syntax implementation, get statistics from catalog and printing are mainly completed in this PR

Brief change log

  • Re implemented method SqlRichDescribeTable in parserImpls.ftl
  • In TableEnvironmentImpl, realize buildDescribeResult to build desc result.
  • realize listPartitionsByFilter method in GenericInMemoryCatalog to support get partial partitions for genericInMemoryCatalog.
  • Adding UT test in 'TableEnvironmentTest' to cover desc [extended] for none-partitioned table and partitioned table.

Verifying this change

  • Adding UT test in 'TableEnvironmentTest' to cover desc [extended] for none-partitioned table and partitioned table.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): don't know
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) now there is no docs about this feature. will be adding

swuferhong avatar Jul 12 '22 05:07 swuferhong

CI report:

  • ba75119551426300db0cdc7bc4e2b49a72a419a0 Azure: FAILURE
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Jul 12 '22 05:07 flinkbot

Thanks for your contribution, I will take a look as soon as possible.

lsyldliu avatar Sep 22 '22 06:09 lsyldliu

I think it's a very useful auxiliary command, can we move this PR forward @swuferhong @godfreyhe ?

Aitozi avatar Apr 11 '23 13:04 Aitozi