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

    https://github.com/apache/carbondata/pull/1583#discussion_r154986226
  
    --- 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 --
    
    I do not think you can create the TableInfo in parser, since it does not 
have the sparkSession, so the dbName maybe wrong. You can need to use 
`CarbonEnv.getDatabaseName` to get the dbName, it requires sparkSession


---

Reply via email to