morningman commented on a change in pull request #3036: Support different keys 
type between mv and base table
URL: https://github.com/apache/incubator-doris/pull/3036#discussion_r387664048
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/MaterializedIndexMeta.java
 ##########
 @@ -0,0 +1,129 @@
+// 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.doris.catalog;
+
+import org.apache.doris.common.io.Text;
+import org.apache.doris.common.io.Writable;
+import org.apache.doris.thrift.TStorageType;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.List;
+
+public class MaterializedIndexMeta implements Writable {
+    private long indexId;
+    private String indexName;
+    private List<Column> schema = Lists.newArrayList();
+    private int schemaVersion;
+    private int schemaHash;
+    private short shortKeyColumnCount;
+    private TStorageType storageType;
+    private KeysType keysType;
+
+    public MaterializedIndexMeta(long indexId, String indexName, List<Column> 
schema, int schemaVersion, int
+            schemaHash, short shortKeyColumnCount, TStorageType storageType, 
KeysType keysType) {
+        this.indexId = indexId;
+        Preconditions.checkState(indexName != null);
+        this.indexName = indexName;
+        Preconditions.checkState(schema != null);
+        Preconditions.checkState(schema.size() != 0);
+        this.schema = schema;
+        this.schemaVersion = schemaVersion;
+        this.schemaHash = schemaHash;
+        this.shortKeyColumnCount = shortKeyColumnCount;
+        Preconditions.checkState(storageType != null);
+        this.storageType = storageType;
+        Preconditions.checkState(keysType != null);
+        this.keysType = keysType;
+    }
+
+    public long getIndexId() {
+        return indexId;
+    }
+
+    public String getIndexName() {
+        return indexName;
+    }
+
+    public KeysType getKeysType() {
+        return keysType;
+    }
+
+    public void setKeysType(KeysType keysType) {
+        this.keysType = keysType;
+    }
+
+    public TStorageType getStorageType() {
+        return storageType;
+    }
+
+    public List<Column> getSchema() {
+        return schema;
+    }
+
+    public int getSchemaHash() {
+        return schemaHash;
+    }
+
+    public short getShortKeyColumnCount() {
+        return shortKeyColumnCount;
+    }
+
+    public int getSchemaVersion() {
+        return schemaVersion;
+    }
+
+    @Override
+    public void write(DataOutput out) throws IOException {
 
 Review comment:
   Use GSON to serde

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to