carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzcclp <...@git.apache.org>
Subject [GitHub] carbondata pull request #1469: [WIP] Spark-2.2 Carbon Integration - Phase 1
Date Thu, 23 Nov 2017 06:16:59 GMT
Github user zzcclp commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1469#discussion_r152728246
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonAnalysisRules.scala
---
    @@ -95,11 +165,40 @@ case class CarbonIUDAnalysisRule(sparkSession: SparkSession) extends
Rule[Logica
         def prepareTargetReleation(relation: UnresolvedRelation): SubqueryAlias = {
           val tupleId = UnresolvedAlias(Alias(UnresolvedFunction("getTupleId",
             Seq.empty, isDistinct = false), "tupleId")())
    +
    +      val localalias = alias match {
    +        case Some(a) => Some(alias.toSeq)
    +        case _ => None
    +      }
           val projList = Seq(
    -        UnresolvedAlias(UnresolvedStar(Option(table.alias.toSeq))), tupleId)
    +        UnresolvedAlias(UnresolvedStar(localalias)), tupleId)
           // include tuple id and rest of the required columns in subqury
    -      SubqueryAlias(table.alias.getOrElse(""),
    -        Project(projList, relation), Option(table.tableIdentifier))
    +//      SubqueryAlias(alias.getOrElse(""),
    +//        Project(projList, relation), Option(table.tableIdentifier))
    +//
    +      if (sparkSession.version.contains("2.1")) {
    --- End diff --
    
    use startsWith instead of contains


---

Mime
View raw message