gianm commented on code in PR #12647:
URL: https://github.com/apache/druid/pull/12647#discussion_r908961706


##########
server/src/main/java/org/apache/druid/catalog/DatasourceSpec.java:
##########
@@ -0,0 +1,376 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.catalog;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Strings;
+import org.apache.druid.catalog.DatasourceColumnSpec.DetailColumnSpec;
+import org.apache.druid.catalog.DatasourceColumnSpec.DimensionSpec;
+import org.apache.druid.catalog.DatasourceColumnSpec.MeasureSpec;
+import org.apache.druid.catalog.TableMetadata.TableType;
+import org.apache.druid.java.util.common.IAE;
+import org.apache.druid.java.util.common.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * Datasource metadata exchanged via the REST API and stored
+ * in the catalog.
+ */
+public class DatasourceSpec extends TableSpec
+{
+  /**
+   * Segment grain at ingestion and initial compaction. Aging rules
+   * may override the value as segments age. If not provided here,
+   * then it must be provided at ingestion time.
+   */
+  private final String segmentGranularity;
+
+  /**
+   * Ingestion and auto-compaction rollup granularity. If null, then no
+   * rollup is enabled. Same as {@code queryGranularity} in and ingest spec,
+   * but renamed since this granularity affects rollup, not queries. Can be
+   * overridden at ingestion time. The grain may change as segments evolve:
+   * this is the grain only for ingest.
+   */
+  private final String rollupGranularity;
+
+  /**
+   * The target segment size at ingestion and initial compaction.
+   * If 0, then the system setting is used.
+   */
+  private final int targetSegmentRows;
+
+  /**
+   * Whether to enable auto-compaction. Only relevant if no auto-compaction
+   * spec is defined, since the existence of a spec overrides this setting.
+   */
+  private final boolean enableAutoCompaction;
+
+  /**
+   * The offset of segments to be auto-compacted relative to the current
+   * time. If not present, the auto-compaction default is used if
+   * auto-compaction is enabled.
+   */
+  private final String autoCompactionDelay;
+
+  private final List<DatasourceColumnSpec> columns;
+
+  public DatasourceSpec(
+      @JsonProperty("segmentGranularity") String segmentGranularity,
+      @JsonProperty("rollupGranularity") String rollupGranularity,
+      @JsonProperty("targetSegmentRows") int targetSegmentRows,
+      @JsonProperty("enableAutoCompaction") boolean enableAutoCompaction,
+      @JsonProperty("autoCompactionDelay") String autoCompactionDelay,
+      @JsonProperty("properties") Map<String, Object> properties,
+      @JsonProperty("columns") List<DatasourceColumnSpec> columns

Review Comment:
   Is this column list meant to be authoritative, or partial?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to