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

Refresh index command fails for secondary index as per syntax mentioned in https://github.com/apache/carbondata/blob/master/docs/index/secondary-index-guide.md

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: data-query
    • Labels:
      None
    • Environment:
      Spark 2.3.2, Spark 2.4.5

      Description

      Refresh index command fails for secondary index as per syntax mentioned in https://github.com/apache/carbondata/blob/master/docs/index/secondary-index-guide.md

       

      0: jdbc:hive2://10.20.255.171:23040/default> create table brinjal (imei string,AMSize string,channelsId string,ActiveCountry string, Activecity string,gamePointId double,deviceInformationId double,productionDate Timestamp,deliveryDate timestamp,deliverycharge double) STORED as carbondata TBLPROPERTIES('table_blocksize'='1');
      ---------+

      Result

      ---------+
      ---------+
      No rows selected (0.218 seconds)
      0: jdbc:hive2://10.20.255.171:23040/default> LOAD DATA INPATH 'hdfs://hacluster/chetan/vardhandaterestruct.csv' INTO TABLE brinjal OPTIONS('DELIMITER'=',', 'QUOTECHAR'= '"','BAD_RECORDS_ACTION'='FORCE','FILEHEADER'= 'imei,deviceInformationId,AMSize,channelsId,ActiveCountry,Activecity,gamePointId,productionDate,deliveryDate,deliverycharge');
      ---------+

      Result

      ---------+
      ---------+
      No rows selected (2.31 seconds)
      0: jdbc:hive2://10.20.255.171:23040/default> CREATE INDEX indextable2 ON TABLE brinjal (AMSize) AS 'carbondata';
      ---------+

      Result

      ---------+
      ---------+
      No rows selected (2.379 seconds)
      0: jdbc:hive2://10.20.255.171:23040/default> refresh index indextable2;
      Error: org.apache.spark.sql.AnalysisException: == Parser1: org.apache.spark.sql.parser.CarbonExtensionSpark2SqlParser ==
      [1.26] failure: end of input

      refresh index indextable2
      ^;
      == Parser2: org.apache.spark.sql.execution.SparkSqlParser ==

      REFRESH statements cannot contain ' ', '\n', '\r', '\t' inside unquoted resource paths(line 1, pos 0)

      == SQL ==
      refresh index indextable2
      ^^^; (state=,code=0)
      0: jdbc:hive2://10.20.255.171:23040/default> REFRESH INDEX indextable2 WHERE SEGMENT.ID IN(0);
      Error: org.apache.spark.sql.AnalysisException: == Parser1: org.apache.spark.sql.parser.CarbonExtensionSpark2SqlParser ==
      [1.27] failure: identifier matching regex (?i)ON expected

      REFRESH INDEX indextable2 WHERE SEGMENT.ID IN(0)
      ^;
      == Parser2: org.apache.spark.sql.execution.SparkSqlParser ==

      REFRESH statements cannot contain ' ', '\n', '\r', '\t' inside unquoted resource paths(line 1, pos 0)

      == SQL ==
      REFRESH INDEX indextable2 WHERE SEGMENT.ID IN(0)
      ^^^; (state=,code=0)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chetdb Chetan Bhat
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: