Support Questions
Find answers, ask questions, and share your expertise

Select query fails with some exception error.

After loading the ORC file to Hive table, My select * query gets aborted with below error:

Fetching results ran into the following error(s):

Bad status for request TFetchResultsReq(fetchType=0, operationHandle=TOperationHandle(hasResultSet=True, modifiedRowCount=None, operationType=0, operationId=THandleIdentifier(secret='f\xfa\xf32\xd1KB\xbb\xb9\t\xe8\x1c\xd1\x01\xa5\xf2', guid=')\x17\r4\x7f D\xcf\xa0Z\xff\x8a70\xaa\x93')), orientation=4, maxRows=100): TFetchResultsResp(status=TStatus(errorCode=0, errorMessage=' org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException', sqlState=None, infoMessages=['* org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException:25:24', '', '', '', 'sun.reflect.GeneratedMethodAccessor45:invoke::-1', '', '', '', 'org.apache.hive.service.cli.session.HiveSessionProxy:access$', 'org.apache.hive.service.cli.session.HiveSessionProxy$', '', '', '', '', 'com.sun.proxy.$Proxy45:fetchResults::-1', '', '', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$', '', '', 'org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$', 'org.apache.thrift.server.TThreadPoolServer$', '', 'java.util.concurrent.ThreadPoolExecutor$', '', '* java.lang.ClassCastException:27:2', '', '', '', '*org.apache.hadoop.hive.ql.metadata.HiveException:java.lang.ClassCastException:34:7', '', '', '', '', '', '', '', '', '*java.lang.ClassCastException:null:0:-1'], statusCode=3), results=None, hasMoreRows=None)


From unix I am geting below error:

Failed with exception java.lang.ClassCastException: cannot be cast to

Hi @Atul Goel

Could you please share the table DDL?

Here is DDL

create table if not exists <TABLENAME> ( audit_crz_create_ts timestamp comment "audit trail CRZ load timestamp", zpctyp string comment "code type", zpfcod string comment "currency code", zp_sg079 string comment "filler", zplang string comment "language code", zp_sg080 string comment "filler", zpfdes string comment "currency description", zpfdec int comment "no.of decimal places", zp_sg223 string comment "filler", f_d_cc string comment "delete code", f_r_cc string comment "record id") partitioned by (businesseffectivedate date) row format delimited fields terminated by '\t' lines terminated by '\n' stored as orc location '/data/crz/bb5g/con/<TABLENAME>/';

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.