arina-ielchiieva commented on a change in pull request #1684: DRILL-7073: 
CREATE SCHEMA command / TupleSchema / ColumnMetadata improvements
URL: https://github.com/apache/drill/pull/1684#discussion_r264039583
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/record/metadata/TupleSchema.java
 ##########
 @@ -17,27 +17,52 @@
  */
 package org.apache.drill.exec.record.metadata;
 
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.drill.exec.record.BatchSchema;
+import org.apache.drill.exec.record.BatchSchema.SelectionVectorMode;
+import org.apache.drill.exec.record.MaterializedField;
+
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
-import org.apache.drill.exec.record.BatchSchema;
-import org.apache.drill.exec.record.MaterializedField;
-import org.apache.drill.exec.record.BatchSchema.SelectionVectorMode;
-
 /**
  * Defines the schema of a tuple: either the top-level row or a nested
  * "map" (really structure). A schema is a collection of columns (backed
  * by vectors in the loader itself.) Columns are accessible by name or
  * index. New columns may be added at any time; the new column takes the
  * next available index.
  */
-
+@JsonAutoDetect(
+  fieldVisibility = JsonAutoDetect.Visibility.NONE,
+  getterVisibility = JsonAutoDetect.Visibility.NONE,
+  isGetterVisibility = JsonAutoDetect.Visibility.NONE,
+  setterVisibility = JsonAutoDetect.Visibility.NONE)
+@JsonInclude(JsonInclude.Include.NON_DEFAULT)
+@JsonPropertyOrder({"columns", "properties"})
 public class TupleSchema implements TupleMetadata {
 
   private MapColumnMetadata parentMap;
   private final TupleNameSpace<ColumnMetadata> nameSpace = new 
TupleNameSpace<>();
+  private final Map<String, String> properties = new HashMap<>();
+
+  public TupleSchema() {
+
 
 Review comment:
   Done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to