You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kumarvishal09 <gi...@git.apache.org> on 2018/02/01 14:21:50 UTC

[GitHub] carbondata pull request #1704: [CARBONDATA-1918] Incorrect data is displayed...

Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1704#discussion_r165368872
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonAnalysisRules.scala ---
    @@ -206,6 +208,30 @@ case class CarbonIUDAnalysisRule(sparkSession: SparkSession) extends Rule[Logica
               table)
         }
       }
    +
    +
    +  /**
    +   * This method will check whether the data type of new value is supported or not
    +   * For example, arrayType is not supported
    +   */
    +  def checkForUnsupportedType(selectStmt: String): Unit = {
    +    // selectStmt will have "select 'newValue' from table"
    +    // we can validate the new value by executing the select query
    +    val sel = selectStmt.substring(0, selectStmt.lastIndexOf("from")).trim;
    --- End diff --
    
    Better not to add this type of check , 
    replace dataSet = sparkSession.sql(selectStmt).collect() directly for any case it will execute and get the rows 


---