Prasad Nagaraj Subramanya created DRILL-6066:
------------------------------------------------

             Summary: AssertionError: Internal error: Conversion to relational 
algebra failed to preserve datatypes: validated type
                 Key: DRILL-6066
                 URL: https://issues.apache.org/jira/browse/DRILL-6066
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
    Affects Versions: 1.13.0
            Reporter: Prasad Nagaraj Subramanya


Query -
framework/resources/Datasources/limit0/aggregates/tpcds_variants/parquet/create_tpcdsVariants_views.sh
{code}
create or replace view `dfs.tpcds_sf1_parquet`.store_v as select 
cast( s_store_sk as integer)  as s_store_sk, 
cast( s_store_id as varchar(200))  as s_store_id, 
cast( s_rec_start_date as date)  as s_rec_start_date, 
cast( s_rec__date as date)  as s_rec__date, 
cast( s_closed_date_sk as integer)  as s_closed_date_sk, 
cast( s_store_name as varchar(200))  as s_store_name, 
cast( s_number_employees as integer)  as s_number_employees, 
cast( s_floor_space as integer)  as s_floor_space, 
cast( s_hours as varchar(200))  as s_hours, 
cast( s_manager as varchar(200))  as s_manager, 
cast( s_market_id as integer)  as s_market_id, 
cast( s_geography_class as varchar(200))  as s_geography_class, 
cast( s_market_desc as varchar(200))  as s_market_desc, 
cast( s_market_manager as varchar(200))  as s_market_manager, 
cast( s_division_id as integer)  as s_division_id, 
cast( s_division_name as varchar(200))  as s_division_name, 
cast( s_company_id as integer)  as s_company_id, 
cast( s_company_name as varchar(200))  as s_company_name, 
cast( s_street_number as varchar(200))  as s_street_number, 
cast( s_street_name as varchar(200))  as s_street_name, 
cast( s_street_type as varchar(200))  as s_street_type, 
cast( s_suite_number as varchar(200))  as s_suite_number, 
cast( s_city as varchar(200))  as s_city, 
cast( s_county as varchar(200))  as s_county, 
cast( s_state as varchar(200))  as s_state, 
cast( s_zip as varchar(200))  as s_zip, 
cast( s_country as varchar(200))  as s_country, 
cast( s_gmt_offset as double)  as s_gmt_offset, 
cast( s_tax_precentage as double)  as s_tax_precentage 
from dfs.`/drill/testdata/tpcds_sf1/parquet/store`;
{code}

ERROR -
{code}
Error: SYSTEM ERROR: AssertionError: Internal error: Conversion to relational 
algebra failed to preserve datatypes:
validated type:
RecordType(INTEGER s_store_sk, VARCHAR(200) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" s_store_id, DATE s_rec_start_date, DATE s_rec__date, 
INTEGER s_closed_date_sk, VARCHAR(200) CHARACTER SET "ISO-8859-1" COLLATE 
"ISO-8859-1$en_US$primary" s_store_name, INTEGER s_number_employees, INTEGER 
s_floor_space, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_hours, VARCHAR(200) CHARACTER SET "UTF-16LE" 
COLLATE "ISO-8859-1$en_US$primary" s_manager, INTEGER s_market_id, VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_geography_class, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_market_desc, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_market_manager, INTEGER s_division_id, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_division_name, INTEGER s_company_id, VARCHAR(200) CHARACTER SET "UTF-16LE" 
COLLATE "ISO-8859-1$en_US$primary" s_company_name, VARCHAR(200) CHARACTER SET 
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_street_number, VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_street_name, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_street_type, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_suite_number, VARCHAR(200) CHARACTER SET 
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_city, VARCHAR(200) CHARACTER 
SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_county, VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_state, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_zip, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_country, DOUBLE s_gmt_offset, DOUBLE s_tax_precentage) NOT NULL
converted type:
RecordType(INTEGER s_store_sk, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_store_id, DATE s_rec_start_date, DATE s_rec__date, 
INTEGER s_closed_date_sk, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_store_name, INTEGER s_number_employees, INTEGER 
s_floor_space, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_hours, VARCHAR(200) CHARACTER SET "UTF-16LE" 
COLLATE "ISO-8859-1$en_US$primary" s_manager, INTEGER s_market_id, VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_geography_class, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_market_desc, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_market_manager, INTEGER s_division_id, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_division_name, INTEGER s_company_id, VARCHAR(200) CHARACTER SET "UTF-16LE" 
COLLATE "ISO-8859-1$en_US$primary" s_company_name, VARCHAR(200) CHARACTER SET 
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_street_number, VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_street_name, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_street_type, VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary" s_suite_number, VARCHAR(200) CHARACTER SET 
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_city, VARCHAR(200) CHARACTER 
SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_county, VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_state, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" s_zip, 
VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary" 
s_country, DOUBLE s_gmt_offset, DOUBLE s_tax_precentage) NOT NULL
rel:
LogicalProject(s_store_sk=[CAST($1):INTEGER], s_store_id=[CAST($2):VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_rec_start_date=[CAST($3):DATE], s_rec__date=[CAST($4):DATE], 
s_closed_date_sk=[CAST($5):INTEGER], s_store_name=[CAST($6):VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_number_employees=[CAST($7):INTEGER], s_floor_space=[CAST($8):INTEGER], 
s_hours=[CAST($9):VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary"], s_manager=[CAST($10):VARCHAR(200) CHARACTER SET 
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_market_id=[CAST($11):INTEGER], s_geography_class=[CAST($12):VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_market_desc=[CAST($13):VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary"], s_market_manager=[CAST($14):VARCHAR(200) CHARACTER 
SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_division_id=[CAST($15):INTEGER], s_division_name=[CAST($16):VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_company_id=[CAST($17):INTEGER], s_company_name=[CAST($18):VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_street_number=[CAST($19):VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary"], s_street_name=[CAST($20):VARCHAR(200) CHARACTER 
SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_street_type=[CAST($21):VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary"], s_suite_number=[CAST($22):VARCHAR(200) CHARACTER 
SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_city=[CAST($23):VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary"], s_county=[CAST($24):VARCHAR(200) CHARACTER SET 
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], s_state=[CAST($25):VARCHAR(200) 
CHARACTER SET "UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_zip=[CAST($26):VARCHAR(200) CHARACTER SET "UTF-16LE" COLLATE 
"ISO-8859-1$en_US$primary"], s_country=[CAST($27):VARCHAR(200) CHARACTER SET 
"UTF-16LE" COLLATE "ISO-8859-1$en_US$primary"], 
s_gmt_offset=[CAST($28):DOUBLE], s_tax_precentage=[CAST($29):DOUBLE])
  LogicalTableScan(table=[[dfs, /drill/testdata/tpcds_sf1/parquet/store]])
{code}

Commit id - e25c58f7bf0ad07d3611b85d6d82d05549a28791



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to