Reply
Explorer
Posts: 32
Registered: ‎09-29-2016
Accepted Solution

ERROR: IllegalArgumentException: Comparison method violates its general contract!

getting error ERROR: IllegalArgumentException: Comparison method violates its general contract! when running query through impala-shell or impala jdbc.

this problem is coming in PROD which is very embarasing as never thought such kind of weired problem will come.

please help to resolve the problem.

 

using Impala Shell v2.7.0-cdh5.9.0 .

Cloudera Employee
Posts: 290
Registered: ‎10-16-2013

Re: ERROR: IllegalArgumentException: Comparison method violates its general contract!

My apologies for this unsightly issue and error message.

 

You are running into an issue with a relativey new feature - runtime filters.

We have identified and fixed the issue in later versions, see:

https://issues.apache.org/jira/browse/IMPALA-4076

 

Please first check that the relevant tables have stats.

 

As a workaround, you may either disable runtime filters:

SET RUNTIME_FILTER_MODE=OFF;

 

or you can increase the number of allowed filters per-query:

SET MAX_NUM_RUNTIME_FILTERS=100;

 

The issue only occurs for complex queries where the number of runtime filters exceed the per-query runtime filter budget (we sort all runtime filters and try to pick the best top-N, which is where this issue is happening).

 

Explorer
Posts: 32
Registered: ‎09-29-2016

Re: ERROR: IllegalArgumentException: Comparison method violates its general contract!

Thanks for the quick reply. where to set/put/configure these properties when using Impala through JDBC. 

Highlighted
Cloudera Employee
Posts: 290
Registered: ‎10-16-2013

Re: ERROR: IllegalArgumentException: Comparison method violates its general contract!

I believe you can append query options applied to that JDBC to the connection string like this:

jdbc:impala://your_impalad.com:21050/default;UseNativeQuery=1;SET RUNTIME_FILTER_MODE=OFF;

 

Alternatively, you should be able to run "SET RUNTIME_FILTER_MODE=OFF" as a query from JDBC to alter the defauly query options of that session.

Announcements