You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Alexander Behm (JIRA)" <ji...@apache.org> on 2018/01/30 17:22:00 UTC

[jira] [Deleted] (IMPALA-6444) CTAS STORED AS KUDU to support reordering of columns

     [ https://issues.apache.org/jira/browse/IMPALA-6444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Behm deleted IMPALA-6444:
-----------------------------------


> CTAS STORED AS KUDU to support reordering of columns
> ----------------------------------------------------
>
>                 Key: IMPALA-6444
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6444
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Pranay Singh
>            Assignee: Pranay Singh
>            Priority: Major
>
> If I do a CTAS STORED AS KUDU with the same column order as the source table it works fine but if I re-order the columns and change the primary-keys its not working and fails with:
> ERROR: AnalysisException: null
> CAUSED BY: IllegalStateException: null
> The exception handling is also not in place and the failure throws a null error.
> Details of the test
> -------------------------
> > CREATE TABLE default.andy_tmp_CTAS_KUDU_SALES_ORDER_BOM_DIM_123
> PRIMARY KEY (data_source, cc_nr_plant_code, so_nr, so_type_code, so_line_nr, so_comp_line_nr)
> PARTITION BY HASH (data_source, cc_nr_plant_code, so_nr, so_type_code, so_line_nr, so_comp_line_nr) PARTITIONS 2
> STORED AS KUDU
> AS
> SELECT
>     DATA_SOURCE,
>     CC_NR_PLANT_CODE,
>     SO_NR,
>     SO_TYPE_CODE,
>     SO_LINE_NR,
>     SO_COMP_LINE_NR,
>     SO_COMP_ITEM_NR,
>     SO_COMP_ITEM_NAME,
>     SO_COMPOSITION,
>     SO_COMP_CMDY_CODE,
>     SO_COMP_CMDY_NAME
>     FROM default.CTAS_SALES_ORDER_BOM_DIM;
> Query: create TABLE default.andy_tmp_CTAS_KUDU_SALES_ORDER_BOM_DIM_123
> PRIMARY KEY (data_source, cc_nr_plant_code, so_nr, so_type_code, so_line_nr, so_comp_line_nr)
> PARTITION BY HASH (data_source, cc_nr_plant_code, so_nr, so_type_code, so_line_nr, so_comp_line_nr) PARTITIONS 2
> STORED AS KUDU
> AS
> SELECT
>     DATA_SOURCE,
>     CC_NR_PLANT_CODE,
>     SO_NR,
>     SO_TYPE_CODE,
>     SO_LINE_NR,
>     SO_COMP_LINE_NR,
>     SO_COMP_ITEM_NR,
>     SO_COMP_ITEM_NAME,
>     SO_COMPOSITION,
>     SO_COMP_CMDY_CODE,
>     SO_COMP_CMDY_NAME
>     FROM default.CTAS_SALES_ORDER_BOM_DIM
> +-------------------+
> | summary           |
> +-------------------+
> | Inserted 0 row(s) |
> +-------------------+
> Fetched 1 row(s) in 1.29s
> Failing CTAS:
> ============
> > create table default.andy_tmp_CTAS_KUDU_SALES_ORDER_BOM_DIM_123
>                                           > PRIMARY KEY (SO_COMP_LINE_NR, SO_LINE_NR, SO_TYPE_CODE, SO_NR, CC_NR_PLANT_CODE, DATA_SOURCE)
>                                           > PARTITION BY HASH (SO_COMP_LINE_NR, SO_LINE_NR, SO_TYPE_CODE, SO_NR, CC_NR_PLANT_CODE, DATA_SOURCE) PARTITIONS 2
>                                           > STORED AS KUDU
>                                           > AS
>                                           > SELECT
>                                           >     SO_COMP_LINE_NR,
>                                           >     SO_LINE_NR,
>                                           >     SO_TYPE_CODE,
>                                           >     SO_NR,
>                                           >     CC_NR_PLANT_CODE,
>                                           >     DATA_SOURCE,
>                                           >     SO_COMP_ITEM_NAME,
>                                           >     SO_COMPOSITION,
>                                           >     SO_COMP_CMDY_CODE,
>                                           >     SO_COMP_CMDY_NAME
>                                           >     FROM default.CTAS_SALES_ORDER_BOM_DIM;
> Query: create table default.andy_tmp_CTAS_KUDU_SALES_ORDER_BOM_DIM_123
> PRIMARY KEY (SO_COMP_LINE_NR, SO_LINE_NR, SO_TYPE_CODE, SO_NR, CC_NR_PLANT_CODE, DATA_SOURCE)
> PARTITION BY HASH (SO_COMP_LINE_NR, SO_LINE_NR, SO_TYPE_CODE, SO_NR, CC_NR_PLANT_CODE, DATA_SOURCE) PARTITIONS 2
> STORED AS KUDU
> AS
> SELECT
>     SO_COMP_LINE_NR,
>     SO_LINE_NR,
>     SO_TYPE_CODE,
>     SO_NR,
>     CC_NR_PLANT_CODE,
>     DATA_SOURCE,
>     SO_COMP_ITEM_NAME,
>     SO_COMPOSITION,
>     SO_COMP_CMDY_CODE,
>     SO_COMP_CMDY_NAME
>     FROM default.CTAS_SALES_ORDER_BOM_DIM
> ERROR: AnalysisException: null
> CAUSED BY: IllegalStateException: null
> Source Table:
> ==============
> > describe ctas_sales_order_bom_dim;
> Query: describe ctas_sales_order_bom_dim
> +-------------------+--------+---------+
> | name              | type   | comment |
> +-------------------+--------+---------+
> | data_source       | string |         |
> | cc_nr_plant_code  | string |         |
> | so_nr             | string |         |
> | so_type_code      | string |         |
> | so_line_nr        | string |         |
> | so_comp_line_nr   | string |         |
> | so_comp_item_nr   | string |         |
> | so_comp_item_name | string |         |
> | so_composition    | string |         |
> | so_comp_cmdy_code | string |         |
> | so_comp_cmdy_name | string |         |
> +-------------------+--------+---------+
> Fetched 11 row(s) in 2.49s
> IMPALA Log:
> ===========
> I0122 13:39:15.829866  7557 Frontend.java:927] Compiled query.
> I0122 13:39:15.830080  7557 jni-util.cc:196] org.apache.impala.common.AnalysisException
>         at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:433)
>         at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:369)
>         at org.apache.impala.service.Frontend.analyzeStmt(Frontend.java:899)
>         at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1048)
>         at org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:156)
> Caused by: java.lang.IllegalStateException
>         at com.google.common.base.Preconditions.checkState(Preconditions.java:129)
>         at org.apache.impala.analysis.InsertStmt.prepareExpressions(InsertStmt.java:770)
>         at org.apache.impala.analysis.InsertStmt.analyze(InsertStmt.java:383)
>         at org.apache.impala.analysis.CreateTableAsSelectStmt.analyze(CreateTableAsSelectStmt.java:212)
>         at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:388)
>         ... 4 more
> I0122 13:39:15.845522  7557 status.cc:122] AnalysisException: null
> CAUSED BY: IllegalStateException: null
>     @           0x83e979  impala::Status::Status()
>     @           0xb71ec9  impala::JniUtil::GetJniExceptionMsg()
>     @           0xa7cc0b  impala::Frontend::GetExecRequest()
>     @           0xa97368  impala::ImpalaServer::ExecuteInternal()
>     @           0xa9e408  impala::ImpalaServer::Execute()
>     @           0xadd27e  impala::ImpalaServer::query()
>     @           0xd6ee05  beeswax::BeeswaxServiceProcessor::process_query()
>     @           0xd72104  beeswax::BeeswaxServiceProcessor::dispatchCall()
>     @           0x80e69c  apache::thrift::TDispatchProcessor::process()
>     @          0x1b5666b  apache::thrift::server::TThreadPoolServer::Task::run()
>     @          0x1b3df89  apache::thrift::concurrency::ThreadManager::Worker::run()
>     @           0x9d4ca9  impala::ThriftThread::RunRunnable()
>     @           0x9d5a82  boost::detail::function::void_function_obj_invoker0<>::invoke()
>     @           0xbd4722  impala::Thread::SuperviseThread()
>     @           0xbd4e84  boost::detail::thread_data<>::run()
>     @           0xe6113a  (unknown)
>     @     0x7fd1efc19dc5  start_thread
>     @     0x7fd1ef946ced  __clone
> I0122 13:39:15.845556  7557 impala-server.cc:989] UnregisterQuery(): query_id=42439790ebd1f31f:772bd00b00000000
> I0122 13:39:15.845562  7557 impala-server.cc:1075] Cancel(): query_id=42439790ebd1f31f:772bd00b00000000



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