carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvramana <...@git.apache.org>
Subject [GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...
Date Wed, 31 May 2017 15:16:34 GMT
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119385878
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonHiveCommands.scala
---
    @@ -41,3 +43,36 @@ case class CarbonDropDatabaseCommand(command: DropDatabaseCommand)
       }
     }
     
    +case class CarbonSetCommand(command: SetCommand)
    +  extends RunnableCommand {
    +
    +  override val output = command.output
    +
    +  override def run(sparkSession: SparkSession): Seq[Row] = {
    +    if (command.kv.isDefined) {
    +      command.kv match {
    +        case Some((key, Some(value))) =>
    +          val isCarbonProperty: Boolean = CarbonProperties.getInstance().isCarbonProperty(key)
    +          if (isCarbonProperty) {
    +            CarbonEnv.getInstance(sparkSession).sessionParams
    +              .addProperty(key, value)
    +          }
    +        case _ =>
    +
    +      }
    +    }
    +    val rows = command.run(sparkSession)
    --- End diff --
    
    variable not required directly return


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message