Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-3938

In Hive read table, we are unable to read a projection column or read a full scan - select * query. Even the aggregate queries are not working.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0
    • None
    • hive-integration
    • None

    Description

      In Hive read table, we are unable to read a projection column or full scan query. But the aggregate queries are working fine.

       

      Test query:

       

      --spark beeline;

      drop table if exists uniqdata;

      drop table if exists uniqdata1;

      CREATE TABLE uniqdata(CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION string, DOB timestamp, DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double,INTEGER_COLUMN1 int) stored as carbondata ;

      LOAD DATA INPATH 'hdfs://hacluster/user/prasanna/2000_UniqData.csv' into table uniqdata OPTIONS('DELIMITER'=',', 'QUOTECHAR'='"','BAD_RECORDS_ACTION'='FORCE','FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1');

      CREATE TABLE IF NOT EXISTS uniqdata1 (CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION string, DOB timestamp, DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double,INTEGER_COLUMN1 int) ROW FORMAT SERDE 'org.apache.carbondata.hive.CarbonHiveSerDe' WITH SERDEPROPERTIES ('mapreduce.input.carboninputformat.databaseName'='default','mapreduce.input.carboninputformat.tableName'='uniqdata') STORED AS INPUTFORMAT 'org.apache.carbondata.hive.MapredCarbonInputFormat' OUTPUTFORMAT 'org.apache.carbondata.hive.MapredCarbonOutputFormat' LOCATION 'hdfs://hacluster/user/hive/warehouse/uniqdata';

      select  count  from uniqdata1;

       

       

      --Hive Beeline;

      select count from uniqdata1; -not working, returning 0 rows, eventhough 2000 rows are there;-Issue 1 on Hive read format table;

      select * from uniqdata1; -Return no rows;-Issue 2 - a) full scan on Hive read format table;

      select cust_id from uniqdata1 limit 5;--Return no rows;–Issue 2-b select query with projection, not working, returning now rows;

       Attached the logs for your reference.

      With the Hive write table the aggregate& filter queries are not working but select * full scan queries are working.

      All 3 Issues (Full scan - select *, filter queries and aggregate queries) is not working in Hive read format table.

      This issue also exists when a normal carbon table(created through stored as carbondata) is created in Spark and data is read through select query from Hive beeline.)

      Attachments

        1. Hive on MR - Read projection column issue.txt
          14 kB
          Prasanna Ravichandran

        Activity

          People

            Unassigned Unassigned
            Prasanna Ravichandran Prasanna Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: