You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Kris Hahn (Jira)" <ji...@apache.org> on 2020/04/10 13:43:00 UTC
[jira] [Commented] (IMPALA-9639) [DOC]:Document Impala support for
Kudu DATE type
[ https://issues.apache.org/jira/browse/IMPALA-9639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17080494#comment-17080494 ]
Kris Hahn commented on IMPALA-9639:
-----------------------------------
To gerrit http://gerrit.cloudera.org:8080/15702
> [DOC]:Document Impala support for Kudu DATE type
> ------------------------------------------------
>
> Key: IMPALA-9639
> URL: https://issues.apache.org/jira/browse/IMPALA-9639
> Project: IMPALA
> Issue Type: Documentation
> Components: Docs
> Affects Versions: Not Applicable
> Reporter: Kris Hahn
> Assignee: Kris Hahn
> Priority: Major
> Labels: Doc
> Fix For: Not Applicable
>
>
> See IMPALA-8800, reading and writing DATE values
> to Kudu tables. Date is in the 3.4 branch.
> Include some examples from Dev's checkin:
> {noformat}
> ---- QUERY
> # create table with primary key of DATE type
> create table kudu_date_key (fdatekey date primary key, val string)
> stored as kudu
> ---- RESULTS
> 'Table has been created.'
> ---- ERRORS
> Unpartitioned Kudu tables are inefficient for large data sizes.
> ====
> ---- QUERY
> insert into kudu_date_key values (DATE '1970-01-01', 'Unix epoch'), (DATE '2019-12-12', 'today')
> ---- RUNTIME_PROFILE
> NumModifiedRows: 2
> NumRowErrors: 0
> ---- LABELS
> FDATEKEY,VAL
> ---- DML_RESULTS: kudu_date_key
> 1970-01-01,'Unix epoch'
> 2019-12-12,'today'
> ---- TYPES
> DATE,STRING
> ====
> ---- QUERY
> # create table with DATE primary key partitioned by range
> create table kudu_datepk_range (fdate DATE not null primary key)
> partition by range (fdate)
> (
> partition values < DATE '1900-01-01',
> partition DATE '1900-01-01' <= values < DATE '1970-01-01',
> partition DATE '1970-01-01' <= values < DATE '2000-01-01',
> partition DATE '2000-01-01' <= values
> )
> stored as kudu
> ---- RESULTS
> 'Table has been created.'
> ====
> ---- QUERY
> insert into kudu_datepk_range values
> (DATE '1800-01-01'),
> (DATE '1970-01-01'),
> (DATE '2019-12-12')
> ---- RUNTIME_PROFILE
> NumModifiedRows: 3
> NumRowErrors: 0
> ---- LABELS
> FDATE
> ---- DML_RESULTS: kudu_datepk_range
> 1800-01-01
> 1970-01-01
> 2019-12-12
> ---- TYPES
> DATE
> ====
> ---- QUERY
> select * from kudu_datepk_range;
> ---- RESULTS
> 1800-01-01
> 1970-01-01
> 2019-12-12
> ---- TYPES
> DATE
> ====---- QUERY# Test date columns and primary keycreate table describe_date_test( date_pk date PRIMARY KEY, date_val date not null, date_null date null)stored as kudu;describe describe_date_test;---- LABELSNAME,TYPE,COMMENT,PRIMARY_KEY,NULLABLE,DEFAULT_VALUE,ENCODING,COMPRESSION,BLOCK_SIZE---- RESULTS'date_pk','date','','true','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0''date_val','date','','false','false','','AUTO_ENCODING','DEFAULT_COMPRESSION','0''date_null','date','','false','true','','AUTO_ENCODING','DEFAULT_COMPRESSION','0'---- TYPESSTRING
> ====
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org