[ https://issues.apache.org/jira/browse/HIVE-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056881#comment-13056881 ]
jirapos...@reviews.apache.org commented on HIVE-2100: ----------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/886/ ----------------------------------------------------------- (Updated 2011-06-28 23:26:58.331721) Review request for hive, John Sichi and Yongqiang He. Changes ------- since database.q failed in the testcase suite, I can't see any reason not to just call setInspectorInput() on every input that gets added to the OpCtxMap which solves both this and the original problem. Summary ------- Instead of excluding the operator from the opCtxMap entirely, I added an additional check to the operator initialization to make sure that at least one file path for the operator was valid before initialization. This addresses bug HIVE-2100. https://issues.apache.org/jira/browse/HIVE-2100 Diffs (updated) ----- ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java 96a1631 ql/src/test/queries/clientpositive/nestedvirtual.q PRE-CREATION ql/src/test/results/clientpositive/nestedvirtual.q.out PRE-CREATION Diff: https://reviews.apache.org/r/886/diff Testing ------- Passes authorization_part.q and nestedvirtual.q. Running test suite now to check for any other regressions. Thanks, Syed > virtual column references inside subqueries cause execution exceptions > ---------------------------------------------------------------------- > > Key: HIVE-2100 > URL: https://issues.apache.org/jira/browse/HIVE-2100 > Project: Hive > Issue Type: Bug > Reporter: Joydeep Sen Sarma > Assignee: Syed S. Albiz > Attachments: HIVE-2100.2.patch, HIVE-2100.txt > > > example: > create table jssarma_nilzma_bad as select a.fname, a.offset, a.val from > (select > hash(eventid,userid,eventtime,browsercookie,userstate,useragent,userip,serverip,clienttime,geoid,countrycode\ > ,actionid,lastimpressionid,lastnavimpressionid,impressiontype,fullurl,fullreferrer,pagesection,modulesection,adsection) > as val, INPUT__FILE__NAME as fname, BLOCK__OFFSET__INSIDE__FILE as offset > from nectar_impression_lzma_unverified where ds='2010-07-28') a join > jssarma_hc_diff b on (a.val=b.val);" > causes > Caused by: java.lang.RuntimeException: Map operator initialization failed > at > org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:121) > ... 18 more > Caused by: java.lang.RuntimeException: cannot find field input__file__name > from > [org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@664310d0, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@3d04fc23, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@12457d21, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@101a0ae6, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@1dc18a4c, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@d5e92d7, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@3bfa681c, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@34c92507, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@19e09a4, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@2e8aeed0, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@2344b18f, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@72e5355f, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@26132ae7, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@3465b738, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@1dfd868, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@ef894ce, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@61f1680f, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@2fe6e305, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@5f4275d4, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@445e228, > > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@802b249] > at > org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getStandardStructFieldRef(ObjectInspectorUtils.java:321) > at > org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector.getStructFieldRef(UnionStructObjectInspector.java:96) > at > org.apache.hadoop.hive.ql.exec.ExprNodeColumnEvaluator.initialize(ExprNodeColumnEvaluator.java:57) > at > org.apache.hadoop.hive.ql.exec.Operator.initEvaluators(Operator.java:878) > at > org.apache.hadoop.hive.ql.exec.Operator.initEvaluatorsAndReturnStruct(Operator.java:904) > at > org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:60) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:433) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:389) > at > org.apache.hadoop.hive.ql.exec.FilterOperator.initializeOp(FilterOperator.java:73) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:433) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:389) > at > org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:133) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at > org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:444) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at > org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:98) > ... 18 more > running the subquery separately fixes the issue. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira