[ https://issues.apache.org/jira/browse/TRAFODION-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276830#comment-15276830 ]
Hans Zeller commented on TRAFODION-1983: ---------------------------------------- The issue is that we need to replace the VEG expression in the key predicate when we want to compute the number of active partitions at compile time. This is done with compile-time expression evaluation, which does not allow VEG expressions. > Generator error 7000 (should never reach ...) with a salted table > ----------------------------------------------------------------- > > Key: TRAFODION-1983 > URL: https://issues.apache.org/jira/browse/TRAFODION-1983 > Project: Apache Trafodion > Issue Type: Bug > Components: sql-cmp > Affects Versions: 2.0-incubating > Reporter: Hans Zeller > Assignee: Hans Zeller > Fix For: 2.1-incubating > > > Preparing such a query results in the following error: > *** ERROR[7000] An internal error occurred in the code generator in file > ../generator/GenItemExpr.cpp at line nnn: > VEGRef_100((TRAFODION.MYSCHEMA.ORDERS.O_ORDERKEY = 1000000)) should never > reach ItemExpr::codeGen. > To reproduce: > CREATE TABLE ORDERS > ( > O_ORDERKEY INT NO DEFAULT NOT NULL NOT DROPPABLE > SERIALIZED > , O_CUSTKEY INT NO DEFAULT NOT NULL NOT DROPPABLE > SERIALIZED > , O_ORDERSTATUS CHAR(1) CHARACTER SET ISO88591 COLLATE > DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED > , O_TOTALPRICE NUMERIC(12, 2) NO DEFAULT NOT NULL NOT > DROPPABLE SERIALIZED > , O_ORDERDATE DATE NO DEFAULT NOT NULL NOT DROPPABLE > NOT > SERIALIZED > , O_ORDERPRIORITY CHAR(15) CHARACTER SET ISO88591 COLLATE > DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED > , O_CLERK CHAR(15) CHARACTER SET ISO88591 COLLATE > DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED > , O_SHIPPRIORITY INT NO DEFAULT NOT NULL NOT DROPPABLE > SERIALIZED > , O_COMMENT VARCHAR(79) CHARACTER SET ISO88591 > COLLATE > DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE SERIALIZED > , PRIMARY KEY (O_ORDERKEY ASC) > ) > SALT USING 8 PARTITIONS > ; > cqd QUERY_CACHE '0'; > cqd CACHE_HISTOGRAMS reset; > cqd HBASE_HASH2_PARTITIONING 'OFF'; > cqd HBASE_RANGE_PARTITIONING 'ON'; > prepare XX from select * from orders where o_orderkey = 1000000; -- This message was sent by Atlassian JIRA (v6.3.4#6332)