drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "N Campbell (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4403) AssertionError: Internal error: Conversion to relational algebra failed to preserve datatypes
Date Wed, 17 Feb 2016 21:09:18 GMT
N Campbell created DRILL-4403:
---------------------------------

             Summary:  AssertionError: Internal error: Conversion to relational algebra failed
to preserve datatypes
                 Key: DRILL-4403
                 URL: https://issues.apache.org/jira/browse/DRILL-4403
             Project: Apache Drill
          Issue Type: Bug
          Components:  Server
    Affects Versions: 1.5.0
            Reporter: N Campbell


select rnum, c1, c2, c3, stddev_pop( c3 ) over(partition by c1) from postgres.public.tolap

Error: SYSTEM ERROR: AssertionError: Internal error: Conversion to relational algebra failed
to preserve datatypes:
validated type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary"
c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" c2, INTEGER c3,
INTEGER EXPR$4) NOT NULL
converted type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary"
c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" c2, INTEGER c3,
DOUBLE EXPR$4) NOT NULL
rel:
LogicalProject(rnum=[$0], c1=[$1], c2=[$2], c3=[$3], EXPR$4=[POWER(/(CastHigh(-(SUM(*(CastHigh($3),
CastHigh($3))) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING),
/(*(SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED
FOLLOWING), SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND
UNBOUNDED FOLLOWING)), COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING
AND UNBOUNDED FOLLOWING)))), COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED
PRECEDING AND UNBOUNDED FOLLOWING)), 0.5)])
  LogicalTableScan(table=[[postgres, public, tolap]])



[Error Id: 61be4aa1-6486-4118-a82b-86c22b551bb5 on centos1:31010]

  (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception during fragment
initialization: Internal error: Conversion to relational algebra failed to preserve datatypes:
validated type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary"
c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" c2, INTEGER c3,
INTEGER EXPR$4) NOT NULL
converted type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary"
c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" c2, INTEGER c3,
DOUBLE EXPR$4) NOT NULL
rel:
LogicalProject(rnum=[$0], c1=[$1], c2=[$2], c3=[$3], EXPR$4=[POWER(/(CastHigh(-(SUM(*(CastHigh($3),
CastHigh($3))) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING),
/(*(SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED
FOLLOWING), SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND
UNBOUNDED FOLLOWING)), COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING
AND UNBOUNDED FOLLOWING)))), COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED
PRECEDING AND UNBOUNDED FOLLOWING)), 0.5)])
  LogicalTableScan(table=[[postgres, public, tolap]])

    org.apache.drill.exec.work.foreman.Foreman.run():261
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745
  Caused By (java.lang.AssertionError) Internal error: Conversion to relational algebra failed
to preserve datatypes:
validated type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary"
c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" c2, INTEGER c3,
INTEGER EXPR$4) NOT NULL
converted type:
RecordType(INTEGER NOT NULL rnum, CHAR(3) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary"
c1, CHAR(2) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" c2, INTEGER c3,
DOUBLE EXPR$4) NOT NULL
rel:
LogicalProject(rnum=[$0], c1=[$1], c2=[$2], c3=[$3], EXPR$4=[POWER(/(CastHigh(-(SUM(*(CastHigh($3),
CastHigh($3))) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING),
/(*(SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED
FOLLOWING), SUM(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING AND
UNBOUNDED FOLLOWING)), COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED PRECEDING
AND UNBOUNDED FOLLOWING)))), COUNT(CastHigh($3)) OVER (PARTITION BY $1 RANGE BETWEEN UNBOUNDED
PRECEDING AND UNBOUNDED FOLLOWING)), 0.5)])
  LogicalTableScan(table=[[postgres, public, tolap]])

    org.apache.calcite.util.Util.newInternal():777
    org.apache.calcite.sql2rel.SqlToRelConverter.checkConvertedType():435
    org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery():541
    org.apache.calcite.prepare.PlannerImpl.convert():214
    org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel():471
    org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert():201
    org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():167
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():199
    org.apache.drill.exec.work.foreman.Foreman.runSQL():924
    org.apache.drill.exec.work.foreman.Foreman.run():250
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745

SQLState:  null
ErrorCode: 0

create table TOLAP (RNUM integer   not null , C1 char(3), C2 char(2), C3 integer, C4 integer);

insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 0, 'AAA', 'AA', 10, 3);
insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 1, 'AAA', 'AA', 15, 2);
insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 2, 'AAA', 'AB', 25, 1);
insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 3, 'BBB', 'BB', 20, 5);
insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 4, 'CCC', 'CC', 30, 2);
insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 5, 'DDD', 'DD', 40, 1);
insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 6, NULL, NULL, 50, 6);
insert into TOLAP (RNUM, C1, C2, C3, C4) values ( 7, NULL, NULL, NULL, NULL);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message