[ 
https://issues.apache.org/jira/browse/DRILL-5763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16150747#comment-16150747
 ] 

ASF GitHub Bot commented on DRILL-5763:
---------------------------------------

Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/931#discussion_r136605378
  
    --- Diff: 
contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java
 ---
    @@ -71,14 +71,32 @@ public MapRDBSubScan(String userName, 
MapRDBFormatPlugin formatPlugin,
         this.tableType = tableType;
       }
     
    +
    +  @JsonProperty("formatPluginConfig")
    --- End diff --
    
    We need to serialize `formatPluginConfig` to be able to create 
`MapRDBFormatPlugin` during deserialization.
    `MapRDBFormatPluginConfig` contains five fields only:
    ```
      public boolean allTextMode = false;
      public boolean enablePushdown = true;
      public boolean ignoreSchemaChange = false;
      public boolean readAllNumbersAsDouble = false;
      public boolean disableCountOptimization = false;
    ```
    Regarding the change, DRILL-5714 fixed initially incorrect implementation 
logic in `MapRDBSubScan`. 
    Current implementation is similar to `EasySubScan`.


> Fix NPE during MapRDBSubScan deserialization
> --------------------------------------------
>
>                 Key: DRILL-5763
>                 URL: https://issues.apache.org/jira/browse/DRILL-5763
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - MapRDB
>    Affects Versions: 1.12.0
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>              Labels: ready-to-commit
>             Fix For: 1.12.0
>
>
> When querying mapr-db json table, if query has more than one major fragments, 
> query execution fails since not all properties are defined MapRDBSubScan and 
> thus deserialization fails.
> This is the regression from DRILL-5714.
> The root cause of the issue is that {{formatPluginConfig}} and 
> {{storageConfig}} were not indicated as json properties and thus where not 
> serialized. During deserialization they were set as null which caused NPE.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to