Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6066

AssertionError: Internal error: Conversion to relational algebra failed to preserve datatypes: validated type

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Query -
      framework/resources/Datasources/limit0/aggregates/tpcds_variants/parquet/create_tpcdsVariants_views.sh

      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`;
      

      ERROR -

      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]])
      

      Stack trace

      org.apache.calcite.util.Util.newInternal():777
          org.apache.calcite.sql2rel.SqlToRelConverter.checkConvertedType():418
          org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery():526
          org.apache.drill.exec.planner.sql.SqlConverter.toRel():271
          org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel():637
          org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():195
          org.apache.drill.exec.planner.sql.handlers.ViewHandler$CreateView.getPlan():69
          org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
          org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
          org.apache.drill.exec.work.foreman.Foreman.runSQL():567
          org.apache.drill.exec.work.foreman.Foreman.run():264
          java.util.concurrent.ThreadPoolExecutor.runWorker():1149
          java.util.concurrent.ThreadPoolExecutor$Worker.run():624
          java.lang.Thread.run():748
      

      Commit id - e25c58f7bf0ad07d3611b85d6d82d05549a28791

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                prasadns14 Prasad Nagaraj Subramanya
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: