morningman commented on a change in pull request #2293: Support Grouping Sets, 
Rollup and Cube to extend group by statement
URL: https://github.com/apache/incubator-doris/pull/2293#discussion_r350779391
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/VirtualSlotRef.java
 ##########
 @@ -0,0 +1,85 @@
+// 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.analysis;
+
+import java.io.DataInput;
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.doris.catalog.Type;
+import org.apache.doris.common.AnalysisException;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * It like a SlotRef except that it is not a real column exist in table.
+ */
+public class VirtualSlotRef extends SlotRef {
+    private static final Logger LOG = 
LogManager.getLogger(VirtualSlotRef.class);
+    // results of analysis slot
+
+    private TupleDescriptor tupleDescriptor;
+    private List<SlotRef> realSlots;
+
+    public VirtualSlotRef(String col, Type type, TupleDescriptor 
tupleDescriptor, List<SlotRef> realSlots) {
+        super(null, col);
+        super.type = type;
+        this.tupleDescriptor = tupleDescriptor;
+        this.realSlots = realSlots;
+    }
+
+    public VirtualSlotRef(SlotDescriptor desc) {
+        super(desc);
+    }
+
+    protected VirtualSlotRef(VirtualSlotRef other) {
+        super(other);
+    }
+
+    protected VirtualSlotRef(SlotRef other) {
+        super(other);
+    }
+
+    public static VirtualSlotRef read(DataInput in) throws IOException {
+        SlotRef slotRef = SlotRef.read(in);
+        return new VirtualSlotRef(slotRef);
+    }
+
+    public void setTupleDescriptor(TupleDescriptor tupleDescriptor) {
 
 Review comment:
   remove setXXX methods if they are not used

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