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 "Thomas Tauber-Marshall (JIRA)" <ji...@apache.org> on 2018/04/30 20:16:00 UTC
[jira] [Commented] (IMPALA-6954) Kudu CTAS Loses Partitioning
[ https://issues.apache.org/jira/browse/IMPALA-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16458993#comment-16458993 ]
Thomas Tauber-Marshall commented on IMPALA-6954:
------------------------------------------------
This bug was introduced by IMPALA-6307. The problem is that the Kudu partition params are being reset() due to an expr rewrite, but then they're never reconstructed. A workaround would be to set 'enable_expr_rewrites' = 'false'
This should only affect Kudu tables (unless there's a situation where a rewrite can occur in a CREATE TABLE that's not an AS SELECT?). Working on a fix now.
> Kudu CTAS Loses Partitioning
> ----------------------------
>
> Key: IMPALA-6954
> URL: https://issues.apache.org/jira/browse/IMPALA-6954
> Project: IMPALA
> Issue Type: Bug
> Reporter: Alan Jackoway
> Assignee: Thomas Tauber-Marshall
> Priority: Major
>
> In certain types of queries, CTAS stored as Kudu will lose the partitioning.
> To reproduce:
> Create transactions table:
> {code:sql}
> create table alanj_transactions(account_id string, transaction_id string, total double, close_date string)
> {code}
> Don't need to put any data into it. Create Kudu table from it, trying to get the longest-lived record (close date to now):
> {code:sql}
> create table alanj_kudu
> primary key (account_id)
> partition by hash(account_id) partitions 5
> stored as kudu
> as
> select account_id,
> datediff(now(), min(cast(close_date AS TIMESTAMP))) AS tenure_days
> from alanj_transactions
> group by 1
> {code}
> You receive a warning like "Unpartitioned Kudu tables are inefficient for large data sizes." Show create table + the Kudu UIs confirm that partitions were not created.
> If you replace that datediff line with something like {{sum(total) as account_total}}, it works fine. Something about datediff is causing it to lose the partitioning.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org