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

schema change does not reflect back in hive when schema is alter in carbon

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: hive-integration
    • Labels:
      None
    • Environment:
      spark2.1,hadoop2.7,hive 1.2.1

      Description

      steps to reproduce

      1. alter table schema in hive

      0: jdbc:hive2://localhost:10000> desc uniqdata;
      ---------------------------------------------+

      col_name data_type comment

      ---------------------------------------------+

      CUST_ID int NULL
      CUST_NAME string NULL
      ACTIVE_EMUI_VERSION string NULL
      DOB timestamp NULL
      DOJ timestamp NULL
      BIGINT_COLUMN1 bigint NULL
      BIGINT_COLUMN2 bigint NULL
      DECIMAL_COLUMN1 decimal(30,10) NULL
      DECIMAL_COLUMN2 decimal(36,10) NULL
      Double_COLUMN1 double NULL
      Double_COLUMN2 double NULL
      INTEGER_COLUMN1 int NULL

      ---------------------------------------------+
      12 rows selected (0.638 seconds)
      0: jdbc:hive2://localhost:10000> alter table uniqdata change cust_id cust_id long;
      ---------+

      Result

      ---------+
      ---------+
      No rows selected (7.619 seconds)
      0: jdbc:hive2://localhost:10000> desc uniqdata;
      ---------------------------------------------+

      col_name data_type comment

      ---------------------------------------------+

      cust_id bigint NULL
      cust_name string NULL
      active_emui_version string NULL
      dob timestamp NULL
      doj timestamp NULL
      bigint_column1 bigint NULL
      bigint_column2 bigint NULL
      decimal_column1 decimal(30,10) NULL
      decimal_column2 decimal(36,10) NULL
      double_column1 double NULL
      double_column2 double NULL
      integer_column1 int NULL

      ---------------------------------------------+
      12 rows selected (0.431 seconds)

      2.start hive cli and desc same table

      0: jdbc:hive2://localhost:10000> desc uniqdata;
      ---------------------------------------------+

      col_name data_type comment

      ---------------------------------------------+

      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  

      --------------------------------

      schema change is not reflected in hive when reading carbondata file

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                anubhavtarar anubhav tarar
                Reporter:
                anubhavtarar anubhav tarar
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h