carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mohammadshahidkhan <...@git.apache.org>
Subject [GitHub] carbondata pull request #1583: [CARBONDATA-1822][Spark-Integration] Support ...
Date Tue, 05 Dec 2017 19:03:47 GMT
Github user mohammadshahidkhan commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1583#discussion_r155044945
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonCreateTableCommand.scala
---
    @@ -29,25 +29,34 @@ import org.apache.carbondata.common.logging.LogServiceFactory
     import org.apache.carbondata.core.constants.CarbonCommonConstants
     import org.apache.carbondata.core.exception.InvalidConfigurationException
     import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier
    -import org.apache.carbondata.core.metadata.schema.table.TableInfo
    +import org.apache.carbondata.core.metadata.schema.table.{CarbonTable, TableInfo}
     import org.apache.carbondata.core.util.CarbonUtil
     import org.apache.carbondata.events.{CreateTablePostExecutionEvent, CreateTablePreExecutionEvent,
OperationContext, OperationListenerBus}
    +import org.apache.carbondata.spark.util.CarbonSparkUtil
     
     case class CarbonCreateTableCommand(
    -    cm: TableModel,
    +    tableInfo: TableInfo,
    --- End diff --
    
    correct if user does not pass the database name while creating table, then database name
will not 
    there that is why added the following code in CarbonCreateTableCommand.processMetadata
      var databaseOpt : Option[String] = None
        if(tableInfo.getDatabaseName != null) {
          databaseOpt = Some(tableInfo.getDatabaseName)
        }
        val dbName = CarbonEnv.getDatabaseName(databaseOpt)(sparkSession)


---

Mime
View raw message