You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Boaz Ben-Zvi (JIRA)" <ji...@apache.org> on 2019/01/29 22:45:00 UTC

[jira] [Created] (DRILL-7015) Improve documentation for PARTITION BY

Boaz Ben-Zvi created DRILL-7015:
-----------------------------------

             Summary: Improve documentation for PARTITION BY
                 Key: DRILL-7015
                 URL: https://issues.apache.org/jira/browse/DRILL-7015
             Project: Apache Drill
          Issue Type: Improvement
          Components: Documentation
    Affects Versions: 1.15.0
            Reporter: Boaz Ben-Zvi
            Assignee: Bridget Bevens
             Fix For: 1.16.0


The documentation for CREATE TABLE AS (CTAS) shows the syntax of the command, without the optional PARTITION BY clause. That option is only mentioned later under the usage notes.

*+_Suggestion_+*: Add this optional clause to the syntax (same as for CREATE TEMPORARY TABLE (CTTAS)). And mention that this option is only applicable when storing in Parquet. 

And the documentation for CREATE TEMPORARY TABLE (CTTAS), the comment says:
{panel}
An optional parameter that can *only* be used to create temporary tables with the Parquet data format. 
{panel}
Which can mistakenly be understood as "only for temporary tables". *_+Suggestion+_*: erase the "to create temporary tables" part (not needed, as it is implied from the context of this page).

*_+Last suggestion+_*: In the documentation for the PARTITION BY clause, can add an example using the implicit column "filename" to demonstrate how the partitioning column puts each distinct value into a separate file. For example, add in the "Other Examples" section :
{noformat}
0: jdbc:drill:zk=local> select distinct r_regionkey, filename from mytable1;
+--------------+----------------+
| r_regionkey  |    filename    |
+--------------+----------------+
| 2            | 0_0_3.parquet  |
| 1            | 0_0_2.parquet  |
| 0            | 0_0_1.parquet  |
| 3            | 0_0_4.parquet  |
| 4            | 0_0_5.parquet  |
+--------------+----------------+
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)