- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Create table as select issue Unsupported type 'null_type' impala
- Labels:
-
Apache Impala
-
Apache Kudu
Created on ‎12-10-2017 04:12 PM - edited ‎09-16-2022 05:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi i having a issue while creating table as select from an another table.
CREATE TABLE <database>.table1 as
select
column1 ,
column 2,
NULL as column3
from
<databse>.table2
;
it is throwing below err
Unsupported type 'null_type' in column 'column3' of table 'table2'
CAUSED BY: TableLoadingException: Unsupported type 'null_type' in column 'column3' of table 'table2'
can anyone help me here.
thanks,
Created ‎12-10-2017 08:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Davood,
Impala needs a column type for column3 and NULL does not allow the planner to infer the type. Using a cast to specify the type will work: create table v as select i, cast(null as int) as j from t;
Cheers, Lars
Created ‎12-10-2017 08:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Davood,
Impala needs a column type for column3 and NULL does not allow the planner to infer the type. Using a cast to specify the type will work: create table v as select i, cast(null as int) as j from t;
Cheers, Lars
