Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 1.2.3
-
None
-
None
Description
Impala does not work with BOOLEAN partition key columns.
This causes Impala to fail to query the table with an error such as "com.cloudera.impala.analysis.CastExpr cannot be cast to com.cloudera.impala.analysis.LiteralExpr"
This is because of the following code in HdfsTable which calls "expr.castTo(type)". BooleanLiteral (incorrectly) does not implement "uncheckedCastTo()". This means that instead of a BooleanLiteral being returned we get back a CastExpr, which cannot be cast to LiteralExpr.
HdfsTable.java - 541
Expr expr = LiteralExpr.create(partitionKey, type);
// Force the literal to be of type declared in the metadata.
expr = expr.castTo(type);
keyValues.add((LiteralExpr) expr);