You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/04/15 02:21:18 UTC

[jira] [Commented] (DRILL-517) AssertionError between aggCall type and inferred type

    [ https://issues.apache.org/jira/browse/DRILL-517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13969056#comment-13969056 ] 

Jacques Nadeau commented on DRILL-517:
--------------------------------------

Failure for TPCH19:

org.eigenbase.relopt.RelOptPlanner$CannotPlanException: Node [rel#88:Subset#13.PHYSICAL.SINGLETON([]).[]] could not be implemented; planner state:

Root: rel#88:Subset#13.PHYSICAL.SINGLETON([]).[]
Original rel:
AbstractConverter(subset=[rel#88:Subset#13.PHYSICAL.SINGLETON([]).[]], convention=[PHYSICAL], DrillDistributionTraitDef=[SINGLETON([])], sort=[[]]): rowcount = 250.0, cumulative cost = {inf}, id = 90
  DrillScreenRel(subset=[rel#87:Subset#13.LOGICAL.ANY([]).[]]): rowcount = 250.0, cumulative cost = {25.0 rows, 25.0 cpu, 0.0 io}, id = 86
    DrillAggregateRel(subset=[rel#85:Subset#12.LOGICAL.ANY([]).[]], group=[{}], revenue=[SUM($0)]): rowcount = 250.0, cumulative cost = {250.0 rows, 0.0 cpu, 0.0 io}, id = 84
      DrillProjectRel(subset=[rel#83:Subset#11.LOGICAL.ANY([]).[]], $f0=[*($4, -(1, $5))]): rowcount = 2500.0, cumulative cost = {250.0 rows, 250.0 cpu, 0.0 io}, id = 82
        DrillFilterRel(subset=[rel#81:Subset#10.LOGICAL.ANY([]).[]], condition=[OR(AND(=($6, $3), =(CAST($7):CHAR(8) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'Brand#41'), OR(=($8, 'SM CASE'), =($8, 'SM BOX'), =($8, 'SM PACK'), =($8, 'SM PKG')), >=($0, 2), <=($0, +(2, 10)), >=($9, 1), <=($9, 5), OR(=($1, 'AIR'), =($1, 'AIR REG')), =(CAST($2):CHAR(17) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'DELIVER IN PERSON')), AND(=($6, $3), =(CAST($7):CHAR(8) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'Brand#13'), OR(=($8, 'MED BAG'), =($8, 'MED BOX'), =($8, 'MED PKG'), =($8, 'MED PACK')), >=($0, 14), <=($0, +(14, 10)), >=($9, 1), <=($9, 10), OR(=($1, 'AIR'), =($1, 'AIR REG')), =(CAST($2):CHAR(17) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'DELIVER IN PERSON')), AND(=($6, $3), =(CAST($7):CHAR(8) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'Brand#55'), OR(=($8, 'LG CASE'), =($8, 'LG BOX'), =($8, 'LG PACK'), =($8, 'LG PKG')), >=($0, 23), <=($0, +(23, 10)), >=($9, 1), <=($9, 15), OR(=($1, 'AIR'), =($1, 'AIR REG')), =(CAST($2):CHAR(17) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'DELIVER IN PERSON')))]): rowcount = 2500.0, cumulative cost = {250.0 rows, 1000.0 cpu, 0.0 io}, id = 80
          DrillJoinRel(subset=[rel#79:Subset#9.LOGICAL.ANY([]).[]], condition=[true], joinType=[inner]): rowcount = 10000.0, cumulative cost = {10000.0 rows, 0.0 cpu, 0.0 io}, id = 78
            DrillScanRel(subset=[rel#76:Subset#7.LOGICAL.ANY([]).[]], table=[[cp, tpch/lineitem.parquet]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 54
            DrillScanRel(subset=[rel#77:Subset#8.LOGICAL.ANY([]).[]], table=[[cp, tpch/part.parquet]]): rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 53

Sets:
Set#7, type: (DrillRecordRow[l_quantity, l_shipmode, l_shipinstruct, l_partkey, l_extendedprice, l_discount])
	rel#76:Subset#7.LOGICAL.ANY([]).[], best=rel#54, importance=0.531441
		rel#54:DrillScanRel.LOGICAL.ANY([]).[](table=[cp, tpch/lineitem.parquet]), rowcount=100.0, cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
		rel#108:AbstractConverter.LOGICAL.ANY([]).[](child=rel#107:Subset#7.PHYSICAL.SINGLETON([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=100.0, cumulative cost={inf}
	rel#107:Subset#7.PHYSICAL.SINGLETON([]).[], best=rel#106, importance=0.4782969000000001
		rel#109:AbstractConverter.PHYSICAL.SINGLETON([]).[](child=rel#76:Subset#7.LOGICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[]), rowcount=100.0, cumulative cost={inf}
		rel#106:ScanPrel.PHYSICAL.SINGLETON([]).[](table=[cp, tpch/lineitem.parquet]), rowcount=100.0, cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
Set#8, type: (DrillRecordRow[p_partkey, p_brand, p_container, p_size])
	rel#77:Subset#8.LOGICAL.ANY([]).[], best=rel#53, importance=0.531441
		rel#53:DrillScanRel.LOGICAL.ANY([]).[](table=[cp, tpch/part.parquet]), rowcount=100.0, cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
		rel#112:AbstractConverter.LOGICAL.ANY([]).[](child=rel#111:Subset#8.PHYSICAL.SINGLETON([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=100.0, cumulative cost={inf}
	rel#111:Subset#8.PHYSICAL.SINGLETON([]).[], best=rel#110, importance=0.4782969000000001
		rel#113:AbstractConverter.PHYSICAL.SINGLETON([]).[](child=rel#77:Subset#8.LOGICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[]), rowcount=100.0, cumulative cost={inf}
		rel#110:ScanPrel.PHYSICAL.SINGLETON([]).[](table=[cp, tpch/part.parquet]), rowcount=100.0, cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
Set#9, type: RecordType(ANY l_quantity, ANY l_shipmode, ANY l_shipinstruct, ANY l_partkey, ANY l_extendedprice, ANY l_discount, ANY p_partkey, ANY p_brand, ANY p_container, ANY p_size)
	rel#79:Subset#9.LOGICAL.ANY([]).[], best=rel#78, importance=0.5904900000000001
		rel#78:DrillJoinRel.LOGICAL.ANY([]).[](left=rel#76:Subset#7.LOGICAL.ANY([]).[],right=rel#77:Subset#8.LOGICAL.ANY([]).[],condition=true,joinType=inner), rowcount=10000.0, cumulative cost={10200.0 rows, 202.0 cpu, 0.0 io}
		rel#104:AbstractConverter.LOGICAL.ANY([]).[](child=rel#103:Subset#9.PHYSICAL.ANY([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=1.7976931348623157E308, cumulative cost={inf}
	rel#103:Subset#9.PHYSICAL.ANY([]).[], best=null, importance=0.531441
		rel#105:AbstractConverter.PHYSICAL.ANY([]).[](child=rel#79:Subset#9.LOGICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=10000.0, cumulative cost={inf}
Set#10, type: RecordType(ANY l_quantity, ANY l_shipmode, ANY l_shipinstruct, ANY l_partkey, ANY l_extendedprice, ANY l_discount, ANY p_partkey, ANY p_brand, ANY p_container, ANY p_size)
	rel#81:Subset#10.LOGICAL.ANY([]).[], best=rel#80, importance=0.6561000000000001
		rel#80:DrillFilterRel.LOGICAL.ANY([]).[](child=rel#79:Subset#9.LOGICAL.ANY([]).[],condition=OR(AND(=($6, $3), =(CAST($7):CHAR(8) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'Brand#41'), OR(=($8, 'SM CASE'), =($8, 'SM BOX'), =($8, 'SM PACK'), =($8, 'SM PKG')), >=($0, 2), <=($0, +(2, 10)), >=($9, 1), <=($9, 5), OR(=($1, 'AIR'), =($1, 'AIR REG')), =(CAST($2):CHAR(17) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'DELIVER IN PERSON')), AND(=($6, $3), =(CAST($7):CHAR(8) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'Brand#13'), OR(=($8, 'MED BAG'), =($8, 'MED BOX'), =($8, 'MED PKG'), =($8, 'MED PACK')), >=($0, 14), <=($0, +(14, 10)), >=($9, 1), <=($9, 10), OR(=($1, 'AIR'), =($1, 'AIR REG')), =(CAST($2):CHAR(17) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'DELIVER IN PERSON')), AND(=($6, $3), =(CAST($7):CHAR(8) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'Brand#55'), OR(=($8, 'LG CASE'), =($8, 'LG BOX'), =($8, 'LG PACK'), =($8, 'LG PKG')), >=($0, 23), <=($0, +(23, 10)), >=($9, 1), <=($9, 15), OR(=($1, 'AIR'), =($1, 'AIR REG')), =(CAST($2):CHAR(17) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL, 'DELIVER IN PERSON')))), rowcount=2500.0, cumulative cost={10450.0 rows, 1202.0 cpu, 0.0 io}
		rel#101:AbstractConverter.LOGICAL.ANY([]).[](child=rel#100:Subset#10.PHYSICAL.ANY([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=1.7976931348623157E308, cumulative cost={inf}
	rel#100:Subset#10.PHYSICAL.ANY([]).[], best=null, importance=0.5904900000000001
		rel#102:AbstractConverter.PHYSICAL.ANY([]).[](child=rel#81:Subset#10.LOGICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=2500.0, cumulative cost={inf}
Set#11, type: RecordType(ANY $f0)
	rel#83:Subset#11.LOGICAL.ANY([]).[], best=rel#82, importance=0.7290000000000001
		rel#82:DrillProjectRel.LOGICAL.ANY([]).[](child=rel#81:Subset#10.LOGICAL.ANY([]).[],$f0=*($4, -(1, $5))), rowcount=2500.0, cumulative cost={10700.0 rows, 1452.0 cpu, 0.0 io}
		rel#97:AbstractConverter.LOGICAL.ANY([]).[](child=rel#96:Subset#11.PHYSICAL.SINGLETON([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=1.7976931348623157E308, cumulative cost={inf}
	rel#96:Subset#11.PHYSICAL.SINGLETON([]).[], best=null, importance=0.6561000000000001
		rel#98:AbstractConverter.PHYSICAL.SINGLETON([]).[](child=rel#83:Subset#11.LOGICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[]), rowcount=2500.0, cumulative cost={inf}
Set#12, type: RecordType(ANY revenue)
	rel#85:Subset#12.LOGICAL.ANY([]).[], best=rel#84, importance=0.81
		rel#84:DrillAggregateRel.LOGICAL.ANY([]).[](child=rel#83:Subset#11.LOGICAL.ANY([]).[],group={},revenue=SUM($0)), rowcount=250.0, cumulative cost={10950.0 rows, 1452.0 cpu, 0.0 io}
		rel#92:AbstractConverter.LOGICAL.ANY([]).[](child=rel#91:Subset#12.PHYSICAL.SINGLETON([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=1.7976931348623157E308, cumulative cost={inf}
	rel#91:Subset#12.PHYSICAL.SINGLETON([]).[], best=null, importance=0.7290000000000001
		rel#93:AbstractConverter.PHYSICAL.SINGLETON([]).[](child=rel#85:Subset#12.LOGICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[]), rowcount=250.0, cumulative cost={inf}
		rel#99:StreamAggPrel.PHYSICAL.SINGLETON([]).[](child=rel#96:Subset#11.PHYSICAL.SINGLETON([]).[],group={},revenue=SUM($0)), rowcount=1.7976931348623158E307, cumulative cost={inf}
Set#13, type: RecordType(ANY revenue)
	rel#87:Subset#13.LOGICAL.ANY([]).[], best=rel#86, importance=0.9
		rel#86:DrillScreenRel.LOGICAL.ANY([]).[](child=rel#85:Subset#12.LOGICAL.ANY([]).[]), rowcount=250.0, cumulative cost={10975.0 rows, 1477.0 cpu, 0.0 io}
		rel#89:AbstractConverter.LOGICAL.ANY([]).[](child=rel#88:Subset#13.PHYSICAL.SINGLETON([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[]), rowcount=1.7976931348623157E308, cumulative cost={inf}
	rel#88:Subset#13.PHYSICAL.SINGLETON([]).[], best=null, importance=1.0
		rel#90:AbstractConverter.PHYSICAL.SINGLETON([]).[](child=rel#87:Subset#13.LOGICAL.ANY([]).[],convention=PHYSICAL,DrillDistributionTraitDef=SINGLETON([]),sort=[]), rowcount=250.0, cumulative cost={inf}
		rel#94:ScreenPrel.PHYSICAL.SINGLETON([]).[](child=rel#91:Subset#12.PHYSICAL.SINGLETON([]).[]), rowcount=1.7976931348623157E308, cumulative cost={inf}


	at org.eigenbase.relopt.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:445)
	at org.eigenbase.relopt.volcano.RelSubset.buildCheapestPlan(RelSubset.java:287)
	at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:656)
	at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:234)
	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPhysicalPlan(DrillSqlWorker.java:219)
	at org.apache.drill.BaseTestQuery.testSqlPlan(BaseTestQuery.java:148)
	at org.apache.drill.BaseTestQuery.testSqlPlanFromFile(BaseTestQuery.java:107)
	at org.apache.drill.TestTpchPlanning.tpch19(TestTpchPlanning.java:125)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:606)



> AssertionError between aggCall type and inferred type
> -----------------------------------------------------
>
>                 Key: DRILL-517
>                 URL: https://issues.apache.org/jira/browse/DRILL-517
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Jacques Nadeau
>            Assignee: Mehant Baid
>
> TPCH 17 and TPCH20 fail with this error.  
> java.lang.AssertionError: type mismatch:
> aggCall type:
> ANY
> inferred type:
> ANY NOT NULL
> 	at org.eigenbase.relopt.RelOptUtil.eq(RelOptUtil.java:1460)
> 	at org.eigenbase.rel.AggregateRelBase.typeMatchesInferred(AggregateRelBase.java:222)
> 	at org.eigenbase.rel.AggregateRelBase.access$000(AggregateRelBase.java:41)
> 	at org.eigenbase.rel.AggregateRelBase$2.get(AggregateRelBase.java:200)
> 	at org.eigenbase.rel.AggregateRelBase$2.get(AggregateRelBase.java:187)
> 	at org.eigenbase.util.CompositeList.get(CompositeList.java:114)
> 	at org.eigenbase.reltype.RelDataTypeFactoryImpl$4.getFieldName(RelDataTypeFactoryImpl.java:174)
> 	at org.eigenbase.reltype.RelDataTypeFactoryImpl$2.get(RelDataTypeFactoryImpl.java:143)
> 	at org.eigenbase.reltype.RelDataTypeFactoryImpl$2.get(RelDataTypeFactoryImpl.java:140)
> 	at java.util.AbstractList$Itr.next(AbstractList.java:358)
> 	at java.util.AbstractList.hashCode(AbstractList.java:540)
> 	at org.eigenbase.util.Util.hash(Util.java:225)
> 	at org.eigenbase.util.Pair.hashCode(Pair.java:79)
> 	at com.google.common.base.Equivalence$Equals.doHash(Equivalence.java:331)
> 	at com.google.common.base.Equivalence.hash(Equivalence.java:104)
> 	at com.google.common.cache.LocalCache.hash(LocalCache.java:1899)
> 	at com.google.common.cache.LocalCache.getIfPresent(LocalCache.java:3988)
> 	at com.google.common.cache.LocalCache$LocalManualCache.getIfPresent(LocalCache.java:4783)
> 	at org.eigenbase.reltype.RelDataTypeFactoryImpl.canonize(RelDataTypeFactoryImpl.java:347)
> 	at org.eigenbase.reltype.RelDataTypeFactoryImpl.createStructType(RelDataTypeFactoryImpl.java:139)
> 	at org.eigenbase.reltype.RelDataTypeFactoryImpl.createStructType(RelDataTypeFactoryImpl.java:167)
> 	at org.eigenbase.rel.AggregateRelBase.deriveRowType(AggregateRelBase.java:172)
> 	at org.eigenbase.rel.AbstractRelNode.getRowType(AbstractRelNode.java:210)
> 	at org.eigenbase.sql2rel.RelDecorrelator.decorrelateRel(RelDecorrelator.java:918)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.eigenbase.util.ReflectUtil.invokeVisitorInternal(ReflectUtil.java:252)
> 	at org.eigenbase.util.ReflectUtil.invokeVisitor(ReflectUtil.java:209)
> 	at org.eigenbase.util.ReflectUtil$1.invokeVisitor(ReflectUtil.java:473)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1373)
> 	at org.eigenbase.rel.SingleRel.childrenAccept(SingleRel.java:69)
> 	at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:45)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1368)
> 	at org.eigenbase.rel.SingleRel.childrenAccept(SingleRel.java:69)
> 	at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:45)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1368)
> 	at org.eigenbase.rel.SingleRel.childrenAccept(SingleRel.java:69)
> 	at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:45)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1368)
> 	at org.eigenbase.rel.SingleRel.childrenAccept(SingleRel.java:69)
> 	at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:45)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1368)
> 	at org.eigenbase.rel.JoinRelBase.childrenAccept(JoinRelBase.java:182)
> 	at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:45)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1368)
> 	at org.eigenbase.rel.SingleRel.childrenAccept(SingleRel.java:69)
> 	at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:45)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1368)
> 	at org.eigenbase.rel.SingleRel.childrenAccept(SingleRel.java:69)
> 	at org.eigenbase.rel.RelVisitor.visit(RelVisitor.java:45)
> 	at org.eigenbase.sql2rel.RelDecorrelator$DecorrelateRelVisitor.visit(RelDecorrelator.java:1368)
> 	at org.eigenbase.sql2rel.RelDecorrelator.decorrelate(RelDecorrelator.java:131)
> 	at org.eigenbase.sql2rel.SqlToRelConverter.decorrelateQuery(SqlToRelConverter.java:2747)
> 	at org.eigenbase.sql2rel.SqlToRelConverter.decorrelate(SqlToRelConverter.java:363)
> 	at net.hydromatic.optiq.prepare.PlannerImpl.convert(PlannerImpl.java:189)
> 	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getLogicalRel(DrillSqlWorker.java:127)
> 	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPhysicalPlan(DrillSqlWorker.java:216)
> 	at org.apache.drill.BaseTestQuery.testSqlPlan(BaseTestQuery.java:148)
> 	at org.apache.drill.BaseTestQuery.testSqlPlanFromFile(BaseTestQuery.java:107)
> 	at org.apache.drill.TestTpchPlanning.tpch20(TestTpchPlanning.java:128)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.lang.reflect.Method.invoke(Method.java:606)



--
This message was sent by Atlassian JIRA
(v6.2#6252)