Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-849

Impala does not work with with BOOLEAN partition key columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 1.2.3
    • Impala 1.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);
      

      Attachments

        Activity

          People

            lskuff Lenni Kuff
            lskuff Lenni Kuff
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: