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

    https://github.com/apache/carbondata/pull/1304#discussion_r136251853
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
 ---
    @@ -774,8 +774,8 @@ case class LoadTable(
             GlobalDictionaryUtil.updateTableMetadataFunc = 
LoadTable.updateTableMetadata
             val storePath = relation.tableMeta.storePath
             // add the start entry for the new load in the table status file
    -        CommonUtil.
    -          readAndUpdateLoadProgressInTableMeta(carbonLoadModel, storePath, 
isOverwriteTable)
    +        CommonUtil.readAndUpdateLoadProgressInTableMeta(carbonLoadModel, 
storePath,
    --- End diff --
    
    Agree. But it need to read 'LoadMetadataDetails' when updateModel.isDefined 
== true, otherwise it will throw NPE because 
carbonLoadModel.getLoadMetadataDetails is null.
    Add code like below:
    
    ```
            if (!updateModel.isDefined) {
              CommonUtil.
                readAndUpdateLoadProgressInTableMeta(carbonLoadModel, 
storePath, isOverwriteTable)
            } else {
              CommonUtil.readLoadMetadataDetails(carbonLoadModel, storePath)
            }
    ```
    @ravipesala , it don't need to add a load meta recorder when execute 
update, right?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to