Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1049

Few types are not handled in ExpressionStringBuilder and ExpressionTreeMaterializer.castEqual

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • None
    • None

    Description

      Causing few queries to fail. An example query plan that fails:

      Drill Plan : 
      {
        "head" : {
          "version" : 1,
          "generator" : {
            "type" : "DefaultSqlHandler",
            "info" : ""
          },
          "type" : "APACHE_DRILL_PHYSICAL",
          "options" : [ ],
          "queue" : 0,
          "resultMode" : "EXEC"
        },
        "graph" : [ {
          "pop" : "hive-scan",
          "@id" : 3,
          "hive-table" : {
            "table" : {
              "tableName" : "voter_hive",
              "dbName" : "default",
              "owner" : "hadoop",
              "createTime" : 1403280039,
              "lastAccessTime" : 0,
              "retention" : 0,
              "sd" : {
                "cols" : [ {
                  "name" : "voter_id",
                  "type" : "int",
                  "comment" : null
                }, {
                  "name" : "name",
                  "type" : "string",
                  "comment" : null
                }, {
                  "name" : "age",
                  "type" : "tinyint",
                  "comment" : null
                }, {
                  "name" : "registration",
                  "type" : "string",
                  "comment" : null
                }, {
                  "name" : "contributions",
                  "type" : "float",
                  "comment" : null
                }, {
                  "name" : "voterzone",
                  "type" : "smallint",
                  "comment" : null
                }, {
                  "name" : "create_time",
                  "type" : "timestamp",
                  "comment" : null
                } ],
                "location" : "file:/tmp/apachehive12_wh/voter_hive",
                "inputFormat" : "org.apache.hadoop.mapred.TextInputFormat",
                "outputFormat" : "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
                "compressed" : false,
                "numBuckets" : -1,
                "serDeInfo" : {
                  "name" : null,
                  "serializationLib" : "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
                  "parameters" : {
                    "serialization.format" : "\t",
                    "field.delim" : "\t"
                  }
                },
                "sortCols" : [ ],
                "parameters" : { }
              },
              "partitionKeys" : [ ],
              "parameters" : {
                "numPartitions" : "0",
                "numFiles" : "1",
                "transient_lastDdlTime" : "1403280064",
                "totalSize" : "63118",
                "numRows" : "0",
                "rawDataSize" : "0"
              },
              "viewOriginalText" : null,
              "viewExpandedText" : null,
              "tableType" : "MANAGED_TABLE"
            },
            "partitions" : null
          },
          "storage-plugin" : "hive",
          "cost" : 61.0
        }, {
          "pop" : "project",
          "@id" : 2,
          "exprs" : [ {
            "ref" : "`voter_id`",
            "expr" : "cast( (`voter_id` ) as INT )"
          }, {
            "ref" : "`name`",
            "expr" : "cast( (`name` ) as VARCHAR(65535) )"
          }, {
            "ref" : "`age`",
            "expr" : "cast( (`age` ) as TINYINT )"
          }, {
            "ref" : "`registration`",
            "expr" : "cast( (`registration` ) as VARCHAR(65535) )"
          }, {
            "ref" : "`contributions`",
            "expr" : "cast( (`contributions` ) as FLOAT4 )"
          }, {
            "ref" : "`voterzone`",
            "expr" : "cast( (`voterzone` ) as SMALLINT )"
          }, {
            "ref" : "`create_time`",
            "expr" : "cast( (`create_time` ) as TIMESTAMP )"
          } ],
          "child" : 3,
          "initialAllocation" : 1000000,
          "maxAllocation" : 10000000000,
          "cost" : 61.0
        }, {
          "pop" : "project",
          "@id" : 1,
          "exprs" : [ {
            "ref" : "`voter_id`",
            "expr" : "`voter_id`"
          }, {
            "ref" : "`name`",
            "expr" : "`name`"
          }, {
            "ref" : "`age`",
            "expr" : "`age`"
          }, {
            "ref" : "`registration`",
            "expr" : "`registration`"
          }, {
            "ref" : "`contributions`",
            "expr" : "`contributions`"
          }, {
            "ref" : "`voterzone`",
            "expr" : "`voterzone`"
          }, {
            "ref" : "`create_time`",
            "expr" : "`create_time`"
          } ],
          "child" : 2,
          "initialAllocation" : 1000000,
          "maxAllocation" : 10000000000,
          "cost" : 61.0
        }, {
          "pop" : "screen",
          "@id" : 0,
          "child" : 1,
          "initialAllocation" : 1000000,
          "maxAllocation" : 10000000000,
          "cost" : 61.0
        } ]
      }
      

      Attachments

        1. DRILL-1049-1.patch.txt
          3 kB
          Venki Korukanti

        Activity

          People

            vkorukanti Venki Korukanti
            vkorukanti Venki Korukanti
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: