You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by cg...@apache.org on 2022/04/13 04:01:44 UTC

[drill] branch master updated: DRILL-8193: Incorrect Annotation used for HttpJsonOptions (#2519)

This is an automated email from the ASF dual-hosted git repository.

cgivre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/master by this push:
     new fd836a2a6e DRILL-8193: Incorrect Annotation used for HttpJsonOptions (#2519)
fd836a2a6e is described below

commit fd836a2a6e933c294a53271f7e9b6ba3fea7cc8d
Author: Charles S. Givre <cg...@apache.org>
AuthorDate: Wed Apr 13 00:01:37 2022 -0400

    DRILL-8193: Incorrect Annotation used for HttpJsonOptions (#2519)
---
 .../org/apache/drill/exec/store/http/HttpJsonOptions.java | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/HttpJsonOptions.java b/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/HttpJsonOptions.java
index 494852a9c8..2d9a72aff7 100644
--- a/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/HttpJsonOptions.java
+++ b/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/HttpJsonOptions.java
@@ -20,7 +20,9 @@ package org.apache.drill.exec.store.http;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
 import org.apache.drill.common.PlanStringBuilder;
 import org.apache.drill.exec.server.options.OptionSet;
 import org.apache.drill.exec.store.easy.json.loader.JsonLoaderOptions;
@@ -31,16 +33,16 @@ import java.util.Objects;
 @JsonDeserialize(builder = HttpJsonOptions.HttpJsonOptionsBuilder.class)
 public class HttpJsonOptions {
 
-  @JsonInclude
+  @JsonProperty
   private final Boolean allowNanInf;
 
-  @JsonInclude
+  @JsonProperty
   private final Boolean allTextMode;
 
-  @JsonInclude
+  @JsonProperty
   private final Boolean readNumbersAsDouble;
 
-  @JsonInclude
+  @JsonProperty
   private final Boolean enableEscapeAnyChar;
 
   HttpJsonOptions(HttpJsonOptionsBuilder builder) {
@@ -72,18 +74,22 @@ public class HttpJsonOptions {
     return options;
   }
 
+  @JsonProperty("allowNanInf")
   public Boolean allowNanInf() {
     return this.allowNanInf;
   }
 
+  @JsonProperty("allTextMode")
   public Boolean allTextMode() {
     return this.allTextMode;
   }
 
+  @JsonProperty("readNumbersAsDouble")
   public Boolean readNumbersAsDouble() {
     return this.readNumbersAsDouble;
   }
 
+  @JsonProperty("enableEscapeAnyChar")
   public Boolean enableEscapeAnyChar() {
     return this.enableEscapeAnyChar;
   }
@@ -118,6 +124,7 @@ public class HttpJsonOptions {
       .toString();
   }
 
+  @JsonPOJOBuilder(withPrefix = "")
   public static class HttpJsonOptionsBuilder {
     private Boolean allowNanInf;