You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by cw...@apache.org on 2020/06/30 04:08:23 UTC

[druid] branch master updated: Information schema doc update (#10081)

This is an automated email from the ASF dual-hosted git repository.

cwylie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a62575  Information schema doc update (#10081)
4a62575 is described below

commit 4a625751e89243a910b0d54971ae621bdf435fff
Author: Clint Wylie <cw...@apache.org>
AuthorDate: Mon Jun 29 21:08:13 2020 -0700

    Information schema doc update (#10081)
    
    * add docs for IS_JOINABLE and IS_BROADCAST to INFORMATION_SCHEMA docs
    
    * fixes
    
    * oops
    
    * revert noise
    
    * missed one
    
    * spellbot
---
 docs/querying/sql.md | 25 +++++++++++++++----------
 website/.spelling    |  3 +++
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/docs/querying/sql.md b/docs/querying/sql.md
index acbc3ae..12e73a9 100644
--- a/docs/querying/sql.md
+++ b/docs/querying/sql.md
@@ -921,11 +921,12 @@ SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'druid' AND TABLE_
 > `APPROX_QUANTILE_DS`. Only standard SQL functions can be used.
 
 #### SCHEMATA table
+`INFORMATION_SCHEMA.SCHEMATA` provides a list of all known schemas, which include `druid` for standard [Druid Table datasources](datasource.md#table), `lookup` for [Lookups](datasource.md#lookup), `sys` for the virtual [System metadata tables](#system-schema), and `INFORMATION_SCHEMA` for these virtual tables. Tables are allowed to have the same name across different schemas, so the schema may be included in an SQL statement to distinguish them, e.g. `lookup.table` vs `druid.table`.
 
 |Column|Notes|
 |------|-----|
-|CATALOG_NAME|Unused|
-|SCHEMA_NAME||
+|CATALOG_NAME|Always set as `druid`|
+|SCHEMA_NAME|`druid`, `lookup`, `sys`, or `INFORMATION_SCHEMA`|
 |SCHEMA_OWNER|Unused|
 |DEFAULT_CHARACTER_SET_CATALOG|Unused|
 |DEFAULT_CHARACTER_SET_SCHEMA|Unused|
@@ -933,23 +934,27 @@ SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'druid' AND TABLE_
 |SQL_PATH|Unused|
 
 #### TABLES table
+`INFORMATION_SCHEMA.TABLES` provides a list of all known tables and schemas.
 
 |Column|Notes|
 |------|-----|
-|TABLE_CATALOG|Always set as 'druid'|
-|TABLE_SCHEMA||
-|TABLE_NAME||
+|TABLE_CATALOG|Always set as `druid`|
+|TABLE_SCHEMA|The 'schema' which the table falls under, see [SCHEMATA table for details](#schemata-table)|
+|TABLE_NAME|Table name. For the `druid` schema, this is the `dataSource`.|
 |TABLE_TYPE|"TABLE" or "SYSTEM_TABLE"|
+|IS_JOINABLE|If a table is directly joinable if on the right hand side of a `JOIN` statement, without performing a subquery, this value will be set to `YES`, otherwise `NO`. Lookups are always joinable because they are globally distributed among Druid query processing nodes, but Druid datasources are not, and will use a less efficient subquery join.|
+|IS_BROADCAST|If a table is 'broadcast' and distributed among all Druid query processing nodes, this value will be set to `YES`, such as lookups and Druid datasources which have a 'broadcast' load rule, else `NO`.|
 
 #### COLUMNS table
+`INFORMATION_SCHEMA.COLUMNS` provides a list of all known columns across all tables and schema.
 
 |Column|Notes|
 |------|-----|
-|TABLE_CATALOG|Always set as 'druid'|
-|TABLE_SCHEMA||
-|TABLE_NAME||
-|COLUMN_NAME||
-|ORDINAL_POSITION||
+|TABLE_CATALOG|Always set as `druid`|
+|TABLE_SCHEMA|The 'schema' which the table column falls under, see [SCHEMATA table for details](#schemata-table)|
+|TABLE_NAME|The 'table' which the column belongs to, see [TABLES table for details](#tables-table)|
+|COLUMN_NAME|The column name|
+|ORDINAL_POSITION|The order in which the column is stored in a table|
 |COLUMN_DEFAULT|Unused|
 |IS_NULLABLE||
 |DATA_TYPE||
diff --git a/website/.spelling b/website/.spelling
index f7fe62b..d38f8f5 100644
--- a/website/.spelling
+++ b/website/.spelling
@@ -90,6 +90,8 @@ IANA
 IETF
 IP
 IPv4
+IS_BROADCAST
+IS_JOINABLE
 IS0
 ISO-8601
 ISO8601
@@ -264,6 +266,7 @@ inlined
 interruptible
 jackson-jq
 javadoc
+joinable
 kerberos
 keystore
 keytab


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org