[ 
https://issues.apache.org/jira/browse/DRILL-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122506#comment-15122506
 ] 

Rahul Challapalli commented on DRILL-4323:
------------------------------------------

Plan for 1.4 branch
{code}
00-00    Screen
00-01      Project(EXPR$0=[$0])
00-02        StreamAgg(group=[{}], EXPR$0=[COUNT()])
00-03          Project($f0=[0])
00-04            Project
00-05              Scan(groupscan=[HiveDrillNativeParquetScan 
[table=Table(dbName:tpcds1_hive1, tableName:customer), columns=[`*`], 
numPartitions=0, partitions= null, 
inputDirectories=[maprfs:/drill/testdata/tpcds1_hive1/customer]]])
 | {
  "head" : {
    "version" : 1,
    "generator" : {
      "type" : "ExplainHandler",
      "info" : ""
    },
    "type" : "APACHE_DRILL_PHYSICAL",
    "options" : [ {
      "kind" : "BOOLEAN",
      "type" : "SESSION",
      "name" : "store.hive.optimize_scan_with_native_readers",
      "bool_val" : true
    } ],
    "queue" : 0,
    "resultMode" : "EXEC"
  },
  "graph" : [ {
    "pop" : "hive-drill-native-parquet-scan",
    "@id" : 5,
    "userName" : "mapr",
    "hive-table" : {
      "table" : {
        "tableName" : "customer",
        "dbName" : "tpcds1_hive1",
        "owner" : "root",
        "createTime" : 1454009749,
        "lastAccessTime" : 0,
        "retention" : 0,
        "sd" : {
          "cols" : [ {
            "name" : "c_customer_sk",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_customer_id",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_current_cdemo_sk",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_current_hdemo_sk",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_current_addr_sk",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_first_shipto_date_sk",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_first_sales_date_sk",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_salutation",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_first_name",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_last_name",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_preferred_cust_flag",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_birth_day",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_birth_month",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_birth_year",
            "type" : "int",
            "comment" : null
          }, {
            "name" : "c_birth_country",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_login",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_email_address",
            "type" : "string",
            "comment" : null
          }, {
            "name" : "c_last_review_date",
            "type" : "string",
            "comment" : null
          } ],
          "location" : "maprfs:/drill/testdata/tpcds1_hive1/customer",
          "inputFormat" : 
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
          "outputFormat" : 
"org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat",
          "compressed" : false,
          "numBuckets" : -1,
          "serDeInfo" : {
            "name" : null,
            "serializationLib" : 
"org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe",
            "parameters" : {
              "serialization.format" : "1"
            }
          },
          "sortCols" : [ ],
          "parameters" : { }
        },
        "partitionKeys" : [ ],
        "parameters" : {
          "numFiles" : "0",
          "EXTERNAL" : "TRUE",
          "transient_lastDdlTime" : "1454009749",
          "COLUMN_STATS_ACCURATE" : "false",
          "totalSize" : "0",
          "numRows" : "-1",
          "rawDataSize" : "-1",
          "parquet.page.size" : "4096",
          "parquet.block.size" : "12288"
        },
        "viewOriginalText" : null,
        "viewExpandedText" : null,
        "tableType" : "EXTERNAL_TABLE"
      },
      "partitions" : null,
      "hiveConfigOverride" : {
        "hive.metastore.uris" : "thrift://10.10.100.190:9083",
        "hive.metastore.sasl.enabled" : "false",
        "hbase.zookeeper.quorum" : "10.10.100.190",
        "hbase.zookeeper.property.clientPort" : "5181"
      }
    },
    "columns" : [ "`*`" ],
    "cost" : 14020.0
  }, {
    "pop" : "project",
    "@id" : 4,
    "exprs" : [ ],
    "child" : 5,
    "initialAllocation" : 1000000,
    "maxAllocation" : 10000000000,
    "cost" : 14020.0
  }, {
    "pop" : "project",
    "@id" : 3,
    "exprs" : [ {
      "ref" : "`$f0`",
      "expr" : "0"
    } ],
    "child" : 4,
    "initialAllocation" : 1000000,
    "maxAllocation" : 10000000000,
    "cost" : 14020.0
  }, {
    "pop" : "streaming-aggregate",
    "@id" : 2,
    "child" : 3,
    "keys" : [ ],
    "exprs" : [ {
      "ref" : "`EXPR$0`",
      "expr" : "count(1) "
    } ],
    "initialAllocation" : 1000000,
    "maxAllocation" : 10000000000,
    "cost" : 1.0
  }, {
    "pop" : "project",
    "@id" : 1,
    "exprs" : [ {
      "ref" : "`EXPR$0`",
      "expr" : "`EXPR$0`"
    } ],
    "child" : 2,
    "initialAllocation" : 1000000,
    "maxAllocation" : 10000000000,
    "cost" : 1.0
  }, {
    "pop" : "screen",
    "@id" : 0,
    "child" : 1,
    "initialAllocation" : 1000000,
    "maxAllocation" : 10000000000,
    "cost" : 1.0
  } ]
} |
{code}

> Hive Native Reader : A simple count(*) throws Incoming batch has an empty 
> schema error
> --------------------------------------------------------------------------------------
>
>                 Key: DRILL-4323
>                 URL: https://issues.apache.org/jira/browse/DRILL-4323
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive
>    Affects Versions: 1.5.0
>            Reporter: Rahul Challapalli
>            Priority: Critical
>         Attachments: error.log
>
>
> git.commit.id.abbrev=3d0b4b0
> A simple count(*) query does not work when hive native reader is enabled
> {code}
> 0: jdbc:drill:zk=10.10.100.190:5181> select count(*) from customer;
> +---------+
> | EXPR$0  |
> +---------+
> | 100000  |
> +---------+
> 1 row selected (3.074 seconds)
> 0: jdbc:drill:zk=10.10.100.190:5181> alter session set 
> `store.hive.optimize_scan_with_native_readers` = true;
> +-------+--------------------------------------------------------+
> |  ok   |                        summary                         |
> +-------+--------------------------------------------------------+
> | true  | store.hive.optimize_scan_with_native_readers updated.  |
> +-------+--------------------------------------------------------+
> 1 row selected (0.2 seconds)
> 0: jdbc:drill:zk=10.10.100.190:5181> select count(*) from customer;
> Error: SYSTEM ERROR: IllegalStateException: Incoming batch [#1341, 
> ProjectRecordBatch] has an empty schema. This is not allowed.
> Fragment 0:0
> [Error Id: 4c867440-0fd3-4eda-922f-0f5eadcb1463 on qa-node191.qa.lab:31010] 
> (state=,code=0)
> {code}
> Hive DDL for the table :
> {code}
> create table customer
> (
>     c_customer_sk int,
>     c_customer_id string,
>     c_current_cdemo_sk int,
>     c_current_hdemo_sk int,
>     c_current_addr_sk int,
>     c_first_shipto_date_sk int,
>     c_first_sales_date_sk int,
>     c_salutation string,
>     c_first_name string,
>     c_last_name string,
>     c_preferred_cust_flag string,
>     c_birth_day int,
>     c_birth_month int,
>     c_birth_year int,
>     c_birth_country string,
>     c_login string,
>     c_email_address string,
>     c_last_review_date string
> )
> STORED AS PARQUET
> LOCATION '/drill/testdata/customer'
> {code}
> Attached the log file with the stacktrace



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to