Tag Archives: impala

Impala Find Error: TFetchResultsResp(status=TStatus(errorCode=None, errorMessage=‘UDF ERROR: Decimal express

When using impala query, an error will be reported when using cast function to convert data to decimal type:

Bad status for request TFetchResultsReq(fetchType=0, operationHandle=TOperationHandle(hasResultSet=True,
 modifiedRowCount=None, operationType=0, operationId=THandleIdentifier(secret='\xc8\xc1j\xfe\xd6.B\xa2\x9e\xc8\x1a63\xfb\x15\xf2'
 , guid='\xf8\x82.\x81^\xabE\x7f\x00\x00\x00\x00\xda\xf8\xa9\xa1')), orientation=4, maxRows=100)
 : TFetchResultsResp(status=TStatus(errorCode=None, errorMessage='UDF ERROR: Decimal expression 
 overflowed\n', sqlState='HY000', infoMessages=None, statusCode=3), results=None, hasMoreRows=None)

After checking a wave, I found that it was a bug in impala
bug link: https://issues.apache.org/jira/browse/IMPALA-6405

It seems that the bug still exists. Here is a screenshot of my test:

Solution: do not convert to decimal, or convert in other ways.