0

I'm trying to execute a Hive query --

  Select a,b,c,d,e,f,cast(g as timestamp) - cast(f as timestamp) as runtime 
from table ORDER BY d,e desc limit 100

It is falling with below error

TaskAttempt 1 failed, info=[Error: Failure while running task:java.lang.RuntimeException: java.lang.RuntimeException: java.lang. RuntimeException: Cannot find ExprNodeEvaluator for the exprNodeDesc null

I suspect this is because of the difference calculation b/w g and f (may be some NULL values ) but requesting expert answers to solve the issue, As I don't have the access to data . thanks in advance

I'm using below properties .

set hive.execution.engine=tez;
set hive.exec.parallel=true; 
set hive.auto.convert.join=false; 
set hive.compute.query.using.state=true; 
set hive.stats. fetch.column. stats=true;
set hive.stats. fetch.partition.stats=true;
set mapreduce.map.memory.mb=9000;
set mapreduce.map.java.opts=--Xmx7200m;
set mapreduce.reduce.memory.mb=9000; 
set mapreduce. reduce . java. opts=-Xmx7200m;
set hive.cho.enable=true;
set hive. vectorized.execution.enabled=true; 
set hive.vectorized.execution.reduce.enabled=true;

I'm running from the hive prompt on UNIX server . actually the underlying table is a view contains some joins .. on further research I found that we need to replace the order by . Unfortunately distribute by needs sorting before the limit -->this is also leading the same issue . Can some one please suggest any other way to rewrite the query

user3686069
  • 91
  • 6
  • 15
  • shouldn't it be `from order` and not `from table order` – Gaurang Shah Dec 12 '18 at 00:59
  • @GaurangShah Thank you for the response .. no but actually it is FROM TABLE ORDER BY(clause) – user3686069 Dec 12 '18 at 01:05
  • oh it's my mistake. `table` is actually a reserved keyword. so I got confuse. are you able to run this `Select a,b,c,d,e,f from table ORDER BY d,e desc limit 100` ? – Gaurang Shah Dec 12 '18 at 01:10
  • @GaurangShah yes :) – user3686069 Dec 12 '18 at 01:11
  • is this all the logs. if not please put whole stacktrace. if you are running from HUE may be try running from shell to get more logs. – Gaurang Shah Dec 12 '18 at 01:13
  • I'm running from the hive prompt on UNIX server . actually the underlying table is a view contains some joins .. on further research I found that we need to replace the order by . Unfortunately distribute by needs sorting before the limit -->this is also leading the same issue . Can some one please suggest any other way to rewrite the query – user3686069 Dec 12 '18 at 14:52

0 Answers0