This method is an opportunity to apply side-conditions to a rule. The Planner calls this
- * method after matching all operands of the rule, and before calling method onMatch.
- *
- *
The default implementation of this method returns true.
- */
- public boolean matches(RuleCall call) {
- return true;
- }
-
- /** This method is used to modify the local topology after rule matching. */
- public abstract void onMatch(RuleCall call);
-
- public static Operand any() {
- return Operand.ANY_OPERAND;
- }
-
- public static Operand operand(Class extends Operator> clazz, Operand... children) {
- return new Operand(clazz, Arrays.asList(children));
- }
-}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/optimizer/rules/RuleStrategy.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/optimizer/rules/RuleStrategy.java
deleted file mode 100644
index 4fa03e64f2..0000000000
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/optimizer/rules/RuleStrategy.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package cn.edu.tsinghua.iginx.engine.logical.optimizer.rules;
-
-public enum RuleStrategy {
- FIXED_POINT, // 一直执行直到不再有匹配
- ONCE // 只执行一次
-}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/LogicalFilterUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/LogicalFilterUtils.java
index 3bac0c6368..7959bc73a9 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/LogicalFilterUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/LogicalFilterUtils.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.logical.utils;
import cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.ExprUtils;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/MetaUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/MetaUtils.java
index edb7add95c..5ab7f30758 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/MetaUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/MetaUtils.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.logical.utils;
import static cn.edu.tsinghua.iginx.metadata.utils.FragmentUtils.keyFromColumnsIntervalToKeyInterval;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/OperatorUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/OperatorUtils.java
index a8b963337b..76000d76ff 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/OperatorUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/utils/OperatorUtils.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.logical.utils;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.FilterUtils.*;
@@ -24,11 +42,11 @@
import cn.edu.tsinghua.iginx.engine.shared.source.OperatorSource;
import cn.edu.tsinghua.iginx.engine.shared.source.Source;
import cn.edu.tsinghua.iginx.engine.shared.source.SourceType;
+import cn.edu.tsinghua.iginx.utils.Pair;
import cn.edu.tsinghua.iginx.utils.StringUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import java.util.Map;
import java.util.stream.Collectors;
public class OperatorUtils {
@@ -47,7 +65,7 @@ public static Operator joinOperatorsByTime(List operators) {
return joinOperators(operators, KEY);
}
- public static Operator joinOperators(List operators, String joinBy) {
+ public static Operator joinOperators(List extends Operator> operators, String joinBy) {
if (operators == null || operators.isEmpty()) return null;
if (operators.size() == 1) return operators.get(0);
Operator join = operators.get(0);
@@ -92,7 +110,7 @@ public static List findPathList(Operator operator) {
}
}
- return pathList.stream().distinct().collect(Collectors.toList());
+ return pathList.stream().distinct().sorted().collect(Collectors.toList());
}
public static void findProjectOperators(List projectOperatorList, Operator operator) {
@@ -316,7 +334,7 @@ private static Operator pushDownApply(Operator root, List correlatedVari
root =
new Rename(
new OperatorSource(pushDownApply(apply, correlatedVariables)),
- rename.getAliasMap(),
+ rename.getAliasList(),
ignorePatterns);
break;
case CrossJoin:
@@ -587,8 +605,8 @@ public static List getPatternFromOperatorChildren(
Operator visitedOperator = visitedOperators.get(i);
if (visitedOperator.getType() == OperatorType.Rename) {
Rename rename = (Rename) visitedOperator;
- Map aliasMap = rename.getAliasMap();
- patterns = renamePattern(aliasMap, patterns);
+ List> aliasList = rename.getAliasList();
+ patterns = renamePattern(aliasList, patterns);
}
}
return patterns;
@@ -630,17 +648,18 @@ private static boolean isPatternMatched(String patternA, String patternB) {
/**
* 正向重命名模式列表中的pattern,将key中的pattern替换为value中的pattern
*
- * @param aliasMap 重命名规则, key为旧模式,value为新模式
+ * @param aliasList 重命名规则, key为旧模式,value为新模式
* @param patterns 要重命名的模式列表
* @return
*/
- private static List renamePattern(Map aliasMap, List patterns) {
+ private static List renamePattern(
+ List> aliasList, List patterns) {
List renamedPatterns = new ArrayList<>();
for (String pattern : patterns) {
boolean matched = false;
- for (Map.Entry entry : aliasMap.entrySet()) {
- String oldPattern = entry.getKey().replace("*", "(.*)");
- String newPattern = entry.getValue().replace("*", "$1");
+ for (Pair pair : aliasList) {
+ String oldPattern = pair.k.replace("*", "(.*)");
+ String newPattern = pair.v.replace("*", "$1");
if (pattern.matches(oldPattern)) {
if (newPattern.contains("$1") && !oldPattern.contains("*")) {
newPattern = newPattern.replace("$1", "*");
@@ -650,12 +669,12 @@ private static List renamePattern(Map aliasMap, List.
+ */
+
package cn.edu.tsinghua.iginx.engine.logical.utils;
import cn.edu.tsinghua.iginx.metadata.entity.ColumnsInterval;
+import cn.edu.tsinghua.iginx.utils.Pair;
import cn.edu.tsinghua.iginx.utils.StringUtils;
import java.util.Collection;
import java.util.List;
-import java.util.Map;
import java.util.stream.Collectors;
public class PathUtils {
@@ -45,21 +63,21 @@ public static ColumnsInterval addSuffix(ColumnsInterval columnsInterval) {
/**
* 反向重命名模式列表中的模式
*
- * @param aliasMap 重命名规则, key为旧模式,value为新模式,在这里我们要将新模式恢复为旧模式
+ * @param aliasList 重命名规则, key为旧模式,value为新模式,在这里我们要将新模式恢复为旧模式
* @param patterns 要重命名的模式列表
* @return 重命名后的模式列表
*/
public static List recoverRenamedPatterns(
- Map aliasMap, List patterns) {
+ List> aliasList, List patterns) {
return patterns.stream()
- .map(pattern -> recoverRenamedPattern(aliasMap, pattern))
+ .map(pattern -> recoverRenamedPattern(aliasList, pattern))
.collect(Collectors.toList());
}
- public static String recoverRenamedPattern(Map aliasMap, String pattern) {
- for (Map.Entry entry : aliasMap.entrySet()) {
- String oldPattern = entry.getKey().replace("*", "$1"); // 通配符转换为正则的捕获组
- String newPattern = entry.getValue().replace("*", "(.*)"); // 使用反向引用保留原始匹配的部分
+ public static String recoverRenamedPattern(List> aliasList, String pattern) {
+ for (Pair pair : aliasList) {
+ String oldPattern = pair.k.replace("*", "$1"); // 通配符转换为正则的捕获组
+ String newPattern = pair.v.replace("*", "(.*)"); // 使用反向引用保留原始匹配的部分
if (pattern.matches(newPattern)) {
// 如果旧模式中有通配符,但是新模式中没有,我们需要将新模式中的捕获组替换为通配符
if (oldPattern.contains("$1") && !newPattern.contains("*")) {
@@ -67,9 +85,9 @@ public static String recoverRenamedPattern(Map aliasMap, String
}
return pattern.replaceAll(newPattern, oldPattern);
} else if (newPattern.equals(pattern)) {
- return entry.getKey();
+ return pair.k;
} else if (pattern.contains(".*") && newPattern.matches(StringUtils.reformatPath(pattern))) {
- return entry.getKey();
+ return pair.k;
}
}
return pattern;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngine.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngine.java
index 06cbb51471..ef194b1faf 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngine.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngine.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngineImpl.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngineImpl.java
index df75c44cbf..e45dd0aa69 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngineImpl.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/PhysicalEngineImpl.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/InvalidOperatorParameterException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/InvalidOperatorParameterException.java
index f7cb6db2ab..cb1b115f25 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/InvalidOperatorParameterException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/InvalidOperatorParameterException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExecutablePhysicalTaskException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExecutablePhysicalTaskException.java
index 17376e14e1..fb99082c9e 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExecutablePhysicalTaskException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExecutablePhysicalTaskException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExistedStorageException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExistedStorageException.java
index 76c949f43f..b922e9a8dd 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExistedStorageException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NonExistedStorageException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NotSupportedOperatorException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NotSupportedOperatorException.java
index d3d9c6423e..dea19884ff 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NotSupportedOperatorException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/NotSupportedOperatorException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalException.java
index ebd5e648b2..a0bbc0c89b 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalRuntimeException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalRuntimeException.java
index 9d150f23a8..4a8b9e5609 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalRuntimeException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalRuntimeException.java
@@ -1,17 +1,19 @@
/*
- * Copyright 2024 IGinX of Tsinghua University
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * Licensed 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
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * 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.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalTaskExecuteFailureException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalTaskExecuteFailureException.java
index 4343e9cd2c..8ac03e33eb 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalTaskExecuteFailureException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/PhysicalTaskExecuteFailureException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/RowFetchException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/RowFetchException.java
index 9a9f3d6332..a75502f33c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/RowFetchException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/RowFetchException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/StorageInitializationException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/StorageInitializationException.java
index 960cd4ff52..fbc30f995e 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/StorageInitializationException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/StorageInitializationException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/TooManyPhysicalTasksException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/TooManyPhysicalTasksException.java
index 9bb410a8d3..353f375ad2 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/TooManyPhysicalTasksException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/TooManyPhysicalTasksException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnexpectedOperatorException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnexpectedOperatorException.java
index fa948c5bfa..f0c22ff9d5 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnexpectedOperatorException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnexpectedOperatorException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnimplementedOperatorException.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnimplementedOperatorException.java
index 0d0ee9e18d..ab7679d29f 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnimplementedOperatorException.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/exception/UnimplementedOperatorException.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.exception;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/MemoryPhysicalTaskDispatcher.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/MemoryPhysicalTaskDispatcher.java
index f4475b0027..bed478bbb9 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/MemoryPhysicalTaskDispatcher.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/MemoryPhysicalTaskDispatcher.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutor.java
index 84ed039e55..cddce86a1e 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutor.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutor.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutorFactory.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutorFactory.java
index c6dc3a01ba..d2ba5933f1 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutorFactory.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/OperatorMemoryExecutorFactory.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/Table.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/Table.java
index 7f4be1bf1e..133123511c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/Table.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/Table.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java
index c13ed3f56f..6993594cce 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/naive/NaiveOperatorMemoryExecutor.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.naive;
@@ -29,7 +28,7 @@
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.RowUtils.getSamePathWithSpecificPrefix;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.RowUtils.isValueEqualRow;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.RowUtils.removeDuplicateRows;
-import static cn.edu.tsinghua.iginx.engine.shared.Constants.KEY;
+import static cn.edu.tsinghua.iginx.engine.shared.Constants.*;
import static cn.edu.tsinghua.iginx.engine.shared.function.FunctionUtils.isCanUseSetQuantifierFunction;
import static cn.edu.tsinghua.iginx.engine.shared.function.system.utils.ValueUtils.getHash;
import static cn.edu.tsinghua.iginx.sql.SQLConstant.DOT;
@@ -90,15 +89,7 @@
import cn.edu.tsinghua.iginx.utils.Pair;
import cn.edu.tsinghua.iginx.utils.StringUtils;
import java.nio.charset.StandardCharsets;
-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;
-import java.util.TreeMap;
+import java.util.*;
import java.util.regex.Pattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -201,7 +192,7 @@ private Table transformToTable(RowStream stream) throws PhysicalException {
return new Table(header, rows);
}
- private RowStream executeProject(Project project, Table table) throws PhysicalException {
+ private RowStream executeProject(Project project, Table table) {
List patterns = project.getPatterns();
Header header = table.getHeader();
List targetFields = new ArrayList<>();
@@ -253,7 +244,7 @@ private RowStream executeSort(Sort sort, Table table) throws PhysicalException {
return table;
}
- private RowStream executeLimit(Limit limit, Table table) throws PhysicalException {
+ private RowStream executeLimit(Limit limit, Table table) {
int rowSize = table.getRowSize();
Header header = table.getHeader();
List rows = new ArrayList<>();
@@ -276,12 +267,20 @@ private RowStream executeDownsample(Downsample downsample, Table table) throws P
List rows = table.getRows();
long bias = downsample.getKeyRange().getActualBeginKey();
long endKey = downsample.getKeyRange().getActualEndKey();
+ if (downsample.notSetInterval()) {
+ if (table.getRowSize() <= 0) {
+ return Table.EMPTY_TABLE;
+ }
+ bias = table.getRow(0).getKey();
+ endKey = table.getRow(table.getRowSize() - 1).getKey();
+ }
long precision = downsample.getPrecision();
long slideDistance = downsample.getSlideDistance();
// startKey + (n - 1) * slideDistance + precision - 1 >= endKey
long n = (int) (Math.ceil((double) (endKey - bias - precision + 1) / slideDistance) + 1);
List
tableList = new ArrayList<>();
+ boolean firstCol = true;
for (FunctionCall functionCall : downsample.getFunctionCallList()) {
SetMappingFunction function = (SetMappingFunction) functionCall.getFunction();
FunctionParams params = functionCall.getParams();
@@ -309,10 +308,12 @@ private RowStream executeDownsample(Downsample downsample, Table table) throws P
}
}
}
- List> transformedRawRows = new ArrayList<>();
+ // < row>
+ List, Row>> transformedRawRows = new ArrayList<>();
try {
for (Map.Entry> entry : groups.entrySet()) {
- long time = entry.getKey();
+ long windowStartKey = entry.getKey();
+ long windowEndKey = windowStartKey + precision - 1;
List group = entry.getValue();
if (params.isDistinct()) {
@@ -329,7 +330,7 @@ private RowStream executeDownsample(Downsample downsample, Table table) throws P
Row row = function.transform(new Table(header, group), params);
if (row != null) {
- transformedRawRows.add(new Pair<>(time, row));
+ transformedRawRows.add(new Pair<>(new Pair<>(windowStartKey, windowEndKey), row));
}
}
} catch (Exception e) {
@@ -340,19 +341,36 @@ private RowStream executeDownsample(Downsample downsample, Table table) throws P
if (transformedRawRows.size() == 0) {
return Table.EMPTY_TABLE;
}
- Header newHeader = new Header(Field.KEY, transformedRawRows.get(0).v.getHeader().getFields());
+
+ // 只让第一张表保留 window_start, window_end 列,这样按key join后无需删除重复列
+ List fields = transformedRawRows.get(0).v.getHeader().getFields();
+ if (firstCol) {
+ fields.add(0, new Field(WINDOW_START_COL, DataType.LONG));
+ fields.add(1, new Field(WINDOW_END_COL, DataType.LONG));
+ }
+ Header newHeader = new Header(Field.KEY, fields);
List transformedRows = new ArrayList<>();
- for (Pair pair : transformedRawRows) {
- transformedRows.add(new Row(newHeader, pair.k, pair.v.getValues()));
+ Object[] values = new Object[transformedRawRows.get(0).v.getValues().length + 2];
+ for (Pair, Row> pair : transformedRawRows) {
+ if (firstCol) {
+ values[0] = pair.k.k;
+ values[1] = pair.k.v;
+ System.arraycopy(pair.v.getValues(), 0, values, 2, pair.v.getValues().length);
+ transformedRows.add(new Row(newHeader, pair.k.k, values));
+ } else {
+ transformedRows.add(new Row(newHeader, pair.k.k, pair.v.getValues()));
+ }
+ values = new Object[transformedRawRows.get(0).v.getValues().length + 2];
}
tableList.add(new Table(newHeader, transformedRows));
+ firstCol = false;
}
+ // key = window_start,而每个窗口长度一样,因此多表中key相同的列就是同一个窗口的结果,可以按key join
return RowUtils.joinMultipleTablesByKey(tableList);
}
- private RowStream executeRowTransform(RowTransform rowTransform, Table table)
- throws PhysicalException {
+ private RowStream executeRowTransform(RowTransform rowTransform, Table table) {
List> list = new ArrayList<>();
rowTransform
.getFunctionCallList()
@@ -454,12 +472,10 @@ private RowStream executeMappingTransform(MappingTransform mappingTransform, Tab
return RowUtils.calMappingTransform(table, functionCallList);
}
- private RowStream executeRename(Rename rename, Table table) throws PhysicalException {
+ private RowStream executeRename(Rename rename, Table table) {
Header header = table.getHeader();
- Map aliasMap = rename.getAliasMap();
-
- List ignorePatterns = rename.getIgnorePatterns();
- Header newHeader = header.renamedHeader(aliasMap, ignorePatterns);
+ List> aliasList = rename.getAliasList();
+ Header newHeader = header.renamedHeader(aliasList, rename.getIgnorePatterns());
List rows = new ArrayList<>();
table
@@ -476,8 +492,7 @@ private RowStream executeRename(Rename rename, Table table) throws PhysicalExcep
return new Table(newHeader, rows);
}
- private RowStream executeAddSchemaPrefix(AddSchemaPrefix addSchemaPrefix, Table table)
- throws PhysicalException {
+ private RowStream executeAddSchemaPrefix(AddSchemaPrefix addSchemaPrefix, Table table) {
Header header = table.getHeader();
String schemaPrefix = addSchemaPrefix.getSchemaPrefix();
@@ -616,7 +631,7 @@ private RowStream executeJoin(Join join, Table tableA, Table tableB) throws Phys
// 检查时间戳
if (!headerA.hasKey() || !headerB.hasKey()) {
throw new InvalidOperatorParameterException(
- "row streams for join operator by time should have timestamp.");
+ "row streams for join operator by key should have key.");
}
List newFields = new ArrayList<>();
newFields.addAll(headerA.getFields());
@@ -712,8 +727,7 @@ private RowStream executeJoin(Join join, Table tableA, Table tableB) throws Phys
}
}
- private RowStream executeCrossJoin(CrossJoin crossJoin, Table tableA, Table tableB)
- throws PhysicalException {
+ private RowStream executeCrossJoin(CrossJoin crossJoin, Table tableA, Table tableB) {
Header newHeader =
HeaderUtils.constructNewHead(
tableA.getHeader(), tableB.getHeader(), crossJoin.getPrefixA(), crossJoin.getPrefixB());
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java
index 04adf076bd..2630aa44cc 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/AddSchemaPrefixLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/BinaryLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/BinaryLazyStream.java
index 1dac6f588c..1e0a7d7d83 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/BinaryLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/BinaryLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/CrossJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/CrossJoinLazyStream.java
index 1ceb2b6ef4..a623342a30 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/CrossJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/CrossJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DistinctLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DistinctLazyStream.java
index c4b552e0d9..f76ad15dec 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DistinctLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DistinctLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.RowUtils.isEqualRow;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DownsampleLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DownsampleLazyStream.java
index 73eb34f42a..4291b20c29 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DownsampleLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/DownsampleLazyStream.java
@@ -1,23 +1,25 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
+import static cn.edu.tsinghua.iginx.engine.shared.Constants.WINDOW_END_COL;
+import static cn.edu.tsinghua.iginx.engine.shared.Constants.WINDOW_START_COL;
+
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalTaskExecuteFailureException;
import cn.edu.tsinghua.iginx.engine.physical.memory.execute.Table;
@@ -31,6 +33,7 @@
import cn.edu.tsinghua.iginx.engine.shared.function.FunctionParams;
import cn.edu.tsinghua.iginx.engine.shared.function.SetMappingFunction;
import cn.edu.tsinghua.iginx.engine.shared.operator.Downsample;
+import cn.edu.tsinghua.iginx.thrift.DataType;
import java.util.ArrayList;
import java.util.List;
@@ -82,7 +85,7 @@ private Row loadNext() throws PhysicalException {
return nextTarget;
}
Row row = null;
- long timestamp = 0;
+ long windowStartKey = 0;
long bias = downsample.getKeyRange().getActualBeginKey();
long endKey = downsample.getKeyRange().getActualEndKey();
long precision = downsample.getPrecision();
@@ -90,9 +93,9 @@ private Row loadNext() throws PhysicalException {
// startKey + (n - 1) * slideDistance + precision - 1 >= endKey
int n = (int) (Math.ceil((double) (endKey - bias - precision + 1) / slideDistance) + 1);
while (row == null && wrapper.hasNext()) {
- timestamp = wrapper.nextTimestamp() - (wrapper.nextTimestamp() - bias) % precision;
+ windowStartKey = wrapper.nextTimestamp() - (wrapper.nextTimestamp() - bias) % precision;
List rows = new ArrayList<>();
- while (wrapper.hasNext() && wrapper.nextTimestamp() < timestamp + precision) {
+ while (wrapper.hasNext() && wrapper.nextTimestamp() < windowStartKey + precision) {
rows.add(wrapper.next());
}
Table table = new Table(rows.get(0).getHeader(), rows);
@@ -111,9 +114,18 @@ private Row loadNext() throws PhysicalException {
}
row = RowUtils.combineMultipleColumns(subRowList);
}
- return row == null
- ? null
- : new Row(new Header(Field.KEY, row.getHeader().getFields()), timestamp, row.getValues());
+ if (row == null) {
+ return null;
+ } else {
+ List fields = row.getHeader().getFields();
+ fields.add(0, new Field(WINDOW_START_COL, DataType.LONG));
+ fields.add(1, new Field(WINDOW_END_COL, DataType.LONG));
+ Object[] values = new Object[row.getValues().length + 2];
+ values[0] = windowStartKey;
+ values[1] = windowStartKey + precision - 1;
+ System.arraycopy(row.getValues(), 0, values, 2, row.getValues().length);
+ return new Row(new Header(Field.KEY, fields), windowStartKey, values);
+ }
}
@Override
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/EmptyRowStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/EmptyRowStream.java
index b0d7e3bf30..2c9bc61da9 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/EmptyRowStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/EmptyRowStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ExceptLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ExceptLazyStream.java
index 0684c46484..00555aff9e 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ExceptLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ExceptLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.HeaderUtils.checkHeadersComparable;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/GroupByLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/GroupByLazyStream.java
index 9cc825365a..66701761e5 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/GroupByLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/GroupByLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.conf.Config;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashInnerJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashInnerJoinLazyStream.java
index acb059fe06..a3ead0002e 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashInnerJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashInnerJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.HeaderUtils.calculateHashJoinPath;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashMarkJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashMarkJoinLazyStream.java
index a6357fe8a0..11512a91db 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashMarkJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashMarkJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.FilterUtils.getJoinPathFromFilter;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashOuterJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashOuterJoinLazyStream.java
index dd273d51b9..42a0e6be87 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashOuterJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashOuterJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.HeaderUtils.calculateHashJoinPath;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashSingleJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashSingleJoinLazyStream.java
index 73ab9d4297..fb231b3e66 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashSingleJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/HashSingleJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/IntersectLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/IntersectLazyStream.java
index 8a589d990e..eb9f60ded1 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/IntersectLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/IntersectLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.HeaderUtils.checkHeadersComparable;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/JoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/JoinLazyStream.java
index 03dbb9dcfe..ad30e3cce9 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/JoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/JoinLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/LimitLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/LimitLazyStream.java
index 4d18e180d2..e03a7266ce 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/LimitLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/LimitLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/MappingTransformLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/MappingTransformLazyStream.java
index fc78d98b5b..f3f741b7d9 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/MappingTransformLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/MappingTransformLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopInnerJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopInnerJoinLazyStream.java
index 609cdd2d4c..1564924fc2 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopInnerJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopInnerJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopMarkJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopMarkJoinLazyStream.java
index b8e27700f2..868299842d 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopMarkJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopMarkJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopOuterJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopOuterJoinLazyStream.java
index 0e93dc10d4..d8d5cfee7c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopOuterJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopOuterJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopSingleJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopSingleJoinLazyStream.java
index 630482c6d8..c29b05175b 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopSingleJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/NestedLoopSingleJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/PathUnionLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/PathUnionLazyStream.java
index 125eed1251..c86477d06b 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/PathUnionLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/PathUnionLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ProjectLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ProjectLazyStream.java
index 717c547b32..a74ecc5a7a 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ProjectLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ProjectLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RenameLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RenameLazyStream.java
index b61aeff0a4..eddb89df0a 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RenameLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RenameLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
@@ -5,7 +23,6 @@
import cn.edu.tsinghua.iginx.engine.shared.data.read.Row;
import cn.edu.tsinghua.iginx.engine.shared.data.read.RowStream;
import cn.edu.tsinghua.iginx.engine.shared.operator.Rename;
-import java.util.Map;
public class RenameLazyStream extends UnaryLazyStream {
@@ -22,9 +39,7 @@ public RenameLazyStream(Rename rename, RowStream stream) {
public Header getHeader() throws PhysicalException {
if (header == null) {
Header header = stream.getHeader();
- Map aliasMap = rename.getAliasMap();
-
- this.header = header.renamedHeader(aliasMap, rename.getIgnorePatterns());
+ this.header = header.renamedHeader(rename.getAliasList(), rename.getIgnorePatterns());
}
return header;
}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ReorderLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ReorderLazyStream.java
index e5389716c6..6d8d271ac0 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ReorderLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ReorderLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RowTransformLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RowTransformLazyStream.java
index 6e936ef514..78866b5140 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RowTransformLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/RowTransformLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SelectLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SelectLazyStream.java
index ced8417777..90eac6eaf7 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SelectLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SelectLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SetTransformLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SetTransformLazyStream.java
index 1a8ff74354..d302703516 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SetTransformLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SetTransformLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortLazyStream.java
index 9d4132f7a8..264f623e0c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeInnerJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeInnerJoinLazyStream.java
index 9b20e0a5e6..07aaced97c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeInnerJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeInnerJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.InvalidOperatorParameterException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeOuterJoinLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeOuterJoinLazyStream.java
index d30e3c1776..78b1062617 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeOuterJoinLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/SortedMergeOuterJoinLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import cn.edu.tsinghua.iginx.engine.physical.exception.InvalidOperatorParameterException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java
index b126cbcfc7..eb2c151449 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/StreamOperatorMemoryExecutor.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnaryLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnaryLazyStream.java
index b9f5e3ea15..2e53bc117f 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnaryLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnaryLazyStream.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionAllLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionAllLazyStream.java
index b3eb01c643..161cce5fe5 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionAllLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionAllLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.HeaderUtils.checkHeadersComparable;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionDistinctLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionDistinctLazyStream.java
index 6ca096bc33..0158cf7bac 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionDistinctLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/UnionDistinctLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils.HeaderUtils.checkHeadersComparable;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ValueToSelectedPathLazyStream.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ValueToSelectedPathLazyStream.java
index e3b45a4ac1..4d7d97218b 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ValueToSelectedPathLazyStream.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/stream/ValueToSelectedPathLazyStream.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.stream;
import static cn.edu.tsinghua.iginx.sql.SQLConstant.DOT;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/ExprUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/ExprUtils.java
index 7db1d54772..161ce0d8de 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/ExprUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/ExprUtils.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/FilterUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/FilterUtils.java
index d78f01b032..f857ea1cc8 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/FilterUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/FilterUtils.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/GroupByKey.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/GroupByKey.java
index 2b6c4e4e68..cc01bbcae2 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/GroupByKey.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/GroupByKey.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils;
import java.util.ArrayList;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/HeaderUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/HeaderUtils.java
index f0da9b0002..b569ac7758 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/HeaderUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/HeaderUtils.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils;
import static cn.edu.tsinghua.iginx.engine.shared.function.system.utils.ValueUtils.isNumericType;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/RowUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/RowUtils.java
index 0a7b2c54ae..07a97f5d2e 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/RowUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/execute/utils/RowUtils.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.execute.utils;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueue.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueue.java
index 2f5b8e7705..27d824ada3 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueue.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueue.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.queue;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueueImpl.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueueImpl.java
index 17952fad88..65005348d3 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueueImpl.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/memory/queue/MemoryPhysicalTaskQueueImpl.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.memory.queue;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizer.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizer.java
index 7d7cdeb0bf..8ceffa6d32 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizer.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizer.java
@@ -1,29 +1,26 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.optimizer;
-import cn.edu.tsinghua.iginx.engine.physical.optimizer.rule.Rule;
import cn.edu.tsinghua.iginx.engine.physical.task.PhysicalTask;
import cn.edu.tsinghua.iginx.engine.shared.RequestContext;
import cn.edu.tsinghua.iginx.engine.shared.constraint.ConstraintManager;
import cn.edu.tsinghua.iginx.engine.shared.operator.Operator;
-import java.util.Collection;
public interface PhysicalOptimizer {
@@ -32,6 +29,4 @@ public interface PhysicalOptimizer {
ConstraintManager getConstraintManager();
ReplicaDispatcher getReplicaDispatcher();
-
- void setRules(Collection rules);
}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizerManager.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizerManager.java
index 4e14ba2c04..e335959ec0 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizerManager.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/PhysicalOptimizerManager.java
@@ -1,27 +1,23 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.optimizer;
-import cn.edu.tsinghua.iginx.engine.physical.optimizer.naive.NaivePhysicalOptimizer;
-import cn.edu.tsinghua.iginx.engine.physical.optimizer.rule.Rule;
-import java.util.Collection;
-import java.util.Collections;
+import cn.edu.tsinghua.iginx.engine.logical.optimizer.Optimizer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -31,6 +27,9 @@ public class PhysicalOptimizerManager {
private static final String NAIVE = "naive";
+ private static final String NAIVE_CLASS =
+ "cn.edu.tsinghua.iginx.physical.optimizer.naive.NaivePhysicalOptimizer";
+
private static final PhysicalOptimizerManager INSTANCE = new PhysicalOptimizerManager();
private PhysicalOptimizerManager() {}
@@ -44,21 +43,30 @@ public PhysicalOptimizer getOptimizer(String name) {
return null;
}
PhysicalOptimizer optimizer = null;
- switch (name) {
- case NAIVE:
- LOGGER.info("use {} as physical optimizer.", name);
- optimizer = NaivePhysicalOptimizer.getInstance();
- break;
- default:
- LOGGER.error("unknown physical optimizer {}, use {} as default.", name, NAIVE);
- optimizer = NaivePhysicalOptimizer.getInstance();
+ try {
+ switch (name) {
+ case NAIVE:
+ LOGGER.info("use {} as physical optimizer.", name);
+ optimizer =
+ Optimizer.class
+ .getClassLoader()
+ .loadClass(NAIVE_CLASS)
+ .asSubclass(PhysicalOptimizer.class)
+ .newInstance();
+ break;
+ default:
+ LOGGER.error("unknown physical optimizer {}, use {} as default.", name, NAIVE);
+ optimizer =
+ Optimizer.class
+ .getClassLoader()
+ .loadClass(NAIVE_CLASS)
+ .asSubclass(PhysicalOptimizer.class)
+ .newInstance();
+ }
+ } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
+ LOGGER.error("Cannot load class: {}", name, e);
}
- optimizer.setRules(getRules());
- return optimizer;
- }
- private Collection getRules() {
- // TODO: get rule from conf
- return Collections.emptyList();
+ return optimizer;
}
}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/ReplicaDispatcher.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/ReplicaDispatcher.java
index 3d3cddbacd..a691323dd6 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/ReplicaDispatcher.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/ReplicaDispatcher.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.optimizer;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/naive/NaiveReplicaDispatcher.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/naive/NaiveReplicaDispatcher.java
deleted file mode 100644
index b8b7a2f301..0000000000
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/naive/NaiveReplicaDispatcher.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 cn.edu.tsinghua.iginx.engine.physical.optimizer.naive;
-
-import cn.edu.tsinghua.iginx.engine.physical.optimizer.ReplicaDispatcher;
-import cn.edu.tsinghua.iginx.engine.physical.task.StoragePhysicalTask;
-
-public class NaiveReplicaDispatcher implements ReplicaDispatcher {
-
- private static final NaiveReplicaDispatcher INSTANCE = new NaiveReplicaDispatcher();
-
- private NaiveReplicaDispatcher() {}
-
- @Override
- public String chooseReplica(StoragePhysicalTask task) {
- if (task == null) {
- return null;
- }
- return task.getTargetFragment().getMasterStorageUnitId();
- }
-
- public static NaiveReplicaDispatcher getInstance() {
- return INSTANCE;
- }
-}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/rule/Rule.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/rule/Rule.java
deleted file mode 100644
index 12b3ae64ef..0000000000
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/optimizer/rule/Rule.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 cn.edu.tsinghua.iginx.engine.physical.optimizer.rule;
-
-public interface Rule {
-
- // TODO: how to define rule
-
-}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/IStorage.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/IStorage.java
index b2d83e47c7..a29ae04223 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/IStorage.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/IStorage.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.storage;
@@ -26,10 +25,13 @@
import cn.edu.tsinghua.iginx.engine.shared.operator.Insert;
import cn.edu.tsinghua.iginx.engine.shared.operator.Project;
import cn.edu.tsinghua.iginx.engine.shared.operator.Select;
+import cn.edu.tsinghua.iginx.engine.shared.operator.SetTransform;
+import cn.edu.tsinghua.iginx.engine.shared.operator.tag.TagFilter;
import cn.edu.tsinghua.iginx.metadata.entity.ColumnsInterval;
import cn.edu.tsinghua.iginx.metadata.entity.KeyInterval;
import cn.edu.tsinghua.iginx.utils.Pair;
import java.util.List;
+import java.util.Set;
public interface IStorage {
/** 对非叠加分片查询数据 */
@@ -48,6 +50,15 @@ public interface IStorage {
TaskExecuteResult executeProjectDummyWithSelect(
Project project, Select select, DataArea dataArea);
+ default boolean isSupportProjectWithSetTransform(SetTransform setTransform, DataArea dataArea) {
+ return false;
+ }
+
+ default TaskExecuteResult executeProjectWithSetTransform(
+ Project project, SetTransform setTransform, DataArea dataArea) {
+ throw new UnsupportedOperationException();
+ }
+
/** 对非叠加分片删除数据 */
TaskExecuteResult executeDelete(Delete delete, DataArea dataArea);
@@ -55,7 +66,7 @@ TaskExecuteResult executeProjectDummyWithSelect(
TaskExecuteResult executeInsert(Insert insert, DataArea dataArea);
/** 获取所有列信息 */
- List getColumns() throws PhysicalException;
+ List getColumns(Set patterns, TagFilter tagFilter) throws PhysicalException;
/** 获取指定前缀的数据边界 */
Pair getBoundaryOfStorage(String prefix) throws PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageEngineClassLoader.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageEngineClassLoader.java
index 4eec0860a4..8ee468e4fd 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageEngineClassLoader.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageEngineClassLoader.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.storage;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageManager.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageManager.java
index 4ecf7e58c1..3f88625a89 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageManager.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/StorageManager.java
@@ -1,24 +1,24 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.storage;
import cn.edu.tsinghua.iginx.conf.ConfigDescriptor;
+import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
import cn.edu.tsinghua.iginx.metadata.entity.ColumnsInterval;
import cn.edu.tsinghua.iginx.metadata.entity.KeyInterval;
import cn.edu.tsinghua.iginx.metadata.entity.StorageEngineMeta;
@@ -213,4 +213,32 @@ public static IStorage initStorageInstance(StorageEngineMeta meta) {
return null;
}
}
+
+ public boolean releaseStorage(StorageEngineMeta meta) throws PhysicalException {
+ long id = meta.getId();
+ Pair pair = storageMap.get(id);
+ if (pair == null) {
+ LOGGER.warn("Storage id {} not found", id);
+ return false;
+ }
+
+ ThreadPoolExecutor dispatcher = pair.getV();
+ dispatcher.shutdown(); // 停止接收新任务
+ try {
+ if (!dispatcher.awaitTermination(60, TimeUnit.SECONDS)) { // 等待任务完成
+ dispatcher.shutdownNow(); // 如果时间内未完成任务,强制关闭
+ if (!dispatcher.awaitTermination(60, TimeUnit.SECONDS)) {
+ LOGGER.error("Executor did not terminate");
+ }
+ }
+ } catch (InterruptedException ie) {
+ dispatcher.shutdownNow();
+ LOGGER.error("unexpected exception occurred in releasing storage engine: ", ie);
+ return false;
+ }
+
+ pair.getK().release();
+ storageMap.remove(id);
+ return true;
+ }
}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/Column.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/Column.java
index 1adcf33f8b..accf53af7d 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/Column.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/Column.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.storage.domain;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/ColumnKey.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/ColumnKey.java
index 09379e589c..68a4338a59 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/ColumnKey.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/ColumnKey.java
@@ -1,11 +1,35 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.storage.domain;
+import cn.edu.tsinghua.iginx.engine.shared.Constants;
import java.util.*;
public class ColumnKey {
+ public static final ColumnKey KEY = new ColumnKey(Constants.KEY, Collections.emptyMap());
private final String path;
private final SortedMap tags;
+ public ColumnKey(String path) {
+ this(path, Collections.emptyMap());
+ }
+
public ColumnKey(String path, Map tagList) {
this.path = Objects.requireNonNull(path);
this.tags = Collections.unmodifiableSortedMap(new TreeMap<>(tagList));
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/DataArea.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/DataArea.java
index b60eda7580..9ba8de6f2e 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/DataArea.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/domain/DataArea.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.storage.domain;
import cn.edu.tsinghua.iginx.metadata.entity.KeyInterval;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/execute/StoragePhysicalTaskExecutor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/execute/StoragePhysicalTaskExecutor.java
index 074e5f1834..36d42e3406 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/execute/StoragePhysicalTaskExecutor.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/execute/StoragePhysicalTaskExecutor.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.storage.execute;
@@ -25,24 +24,26 @@
import cn.edu.tsinghua.iginx.engine.physical.exception.TooManyPhysicalTasksException;
import cn.edu.tsinghua.iginx.engine.physical.exception.UnexpectedOperatorException;
import cn.edu.tsinghua.iginx.engine.physical.memory.MemoryPhysicalTaskDispatcher;
+import cn.edu.tsinghua.iginx.engine.physical.memory.execute.OperatorMemoryExecutor;
+import cn.edu.tsinghua.iginx.engine.physical.memory.execute.OperatorMemoryExecutorFactory;
import cn.edu.tsinghua.iginx.engine.physical.optimizer.ReplicaDispatcher;
import cn.edu.tsinghua.iginx.engine.physical.storage.IStorage;
import cn.edu.tsinghua.iginx.engine.physical.storage.StorageManager;
import cn.edu.tsinghua.iginx.engine.physical.storage.domain.Column;
import cn.edu.tsinghua.iginx.engine.physical.storage.domain.DataArea;
import cn.edu.tsinghua.iginx.engine.physical.storage.queue.StoragePhysicalTaskQueue;
-import cn.edu.tsinghua.iginx.engine.physical.storage.utils.TagKVUtils;
import cn.edu.tsinghua.iginx.engine.physical.task.GlobalPhysicalTask;
import cn.edu.tsinghua.iginx.engine.physical.task.MemoryPhysicalTask;
import cn.edu.tsinghua.iginx.engine.physical.task.StoragePhysicalTask;
import cn.edu.tsinghua.iginx.engine.physical.task.TaskExecuteResult;
+import cn.edu.tsinghua.iginx.engine.shared.data.read.RowStream;
import cn.edu.tsinghua.iginx.engine.shared.operator.Delete;
import cn.edu.tsinghua.iginx.engine.shared.operator.Insert;
import cn.edu.tsinghua.iginx.engine.shared.operator.Operator;
import cn.edu.tsinghua.iginx.engine.shared.operator.Project;
import cn.edu.tsinghua.iginx.engine.shared.operator.Select;
+import cn.edu.tsinghua.iginx.engine.shared.operator.SetTransform;
import cn.edu.tsinghua.iginx.engine.shared.operator.ShowColumns;
-import cn.edu.tsinghua.iginx.engine.shared.operator.tag.TagFilter;
import cn.edu.tsinghua.iginx.engine.shared.operator.type.OperatorType;
import cn.edu.tsinghua.iginx.metadata.DefaultMetaManager;
import cn.edu.tsinghua.iginx.metadata.IMetaManager;
@@ -60,7 +61,6 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
-import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -159,11 +159,21 @@ private StoragePhysicalTaskExecutor() {
pair.k.isSupportProjectWithSelect()
&& operators.size() == 2
&& operators.get(1).getType() == OperatorType.Select;
+ boolean needSetTransformPushDown =
+ operators.size() == 2
+ && operators.get(1).getType()
+ == OperatorType.SetTransform;
+ boolean canSetTransformPushDown =
+ needSetTransformPushDown
+ && pair.k.isSupportProjectWithSetTransform(
+ (SetTransform) operators.get(1), dataArea);
if (isDummyStorageUnit) {
if (needSelectPushDown) {
result =
pair.k.executeProjectDummyWithSelect(
(Project) op, (Select) operators.get(1), dataArea);
+ } else if (needSetTransformPushDown) {
+ throw new IllegalStateException();
} else {
result = pair.k.executeProjectDummy((Project) op, dataArea);
}
@@ -172,6 +182,36 @@ private StoragePhysicalTaskExecutor() {
result =
pair.k.executeProjectWithSelect(
(Project) op, (Select) operators.get(1), dataArea);
+ } else if (needSetTransformPushDown) {
+ if (canSetTransformPushDown) {
+ result =
+ pair.k.executeProjectWithSetTransform(
+ (Project) op,
+ (SetTransform) operators.get(1),
+ dataArea);
+ } else {
+ TaskExecuteResult tempResult =
+ pair.k.executeProject((Project) op, dataArea);
+ if (tempResult.getException() != null) {
+ result = tempResult;
+ } else {
+ // set transform push down is not supported, execute set
+ // transform in memory
+ OperatorMemoryExecutor executor =
+ OperatorMemoryExecutorFactory.getInstance()
+ .getMemoryExecutor();
+ try {
+ RowStream rowStream =
+ executor.executeUnaryOperator(
+ (SetTransform) operators.get(1),
+ tempResult.getRowStream(),
+ task.getContext());
+ result = new TaskExecuteResult(rowStream);
+ } catch (PhysicalException e) {
+ result = new TaskExecuteResult(e);
+ }
+ }
+ }
} else {
result = pair.k.executeProject((Project) op, dataArea);
}
@@ -261,6 +301,18 @@ private StoragePhysicalTaskExecutor() {
if (after.getCreatedBy() != metaManager.getIginxId()) {
storageManager.addStorage(after);
}
+ } else if (before != null && after == null) { // 删除引擎时,需要release(目前仅支持dummy & read only)
+ try {
+ if (!storageManager.releaseStorage(before)) {
+ LOGGER.error(
+ "Fail to release deleted storage engine. Please look into server log.");
+ }
+ LOGGER.info("Release storage with id={} succeeded.", before.getId());
+ } catch (PhysicalException e) {
+ LOGGER.error(
+ "unexpected exception during in releasing storage engine, please contact developer to check: ",
+ e);
+ }
}
};
metaManager.registerStorageEngineChangeHook(storageEngineChangeHook);
@@ -316,7 +368,7 @@ public TaskExecuteResult executeGlobalTask(GlobalPhysicalTask task) {
public TaskExecuteResult executeShowColumns(ShowColumns showColumns) {
List storageList = metaManager.getStorageEngineList();
- Set columnSet = new HashSet<>();
+ TreeSet targetColumns = new TreeSet<>(Comparator.comparing(Column::getPhysicalPath));
for (StorageEngineMeta storage : storageList) {
long id = storage.getId();
Pair pair = storageManager.getStorage(id);
@@ -324,56 +376,47 @@ public TaskExecuteResult executeShowColumns(ShowColumns showColumns) {
continue;
}
try {
- List columnList = pair.k.getColumns();
- // fix the schemaPrefix
+ Set patterns = showColumns.getPathRegexSet();
String schemaPrefix = storage.getSchemaPrefix();
+ // schemaPrefix是在IGinX中定义的,数据源的路径中没有该前缀,因此需要剪掉patterns中前缀是schemaPrefix的部分
+ patterns = StringUtils.cutSchemaPrefix(schemaPrefix, patterns);
+ if (patterns.isEmpty()) {
+ continue;
+ }
+ // 求patterns与dataPrefix的交集
+ patterns = StringUtils.intersectDataPrefix(storage.getDataPrefix(), patterns);
+ if (patterns.isEmpty()) {
+ continue;
+ }
+ if (patterns.contains("*")) {
+ patterns = Collections.emptySet();
+ }
+ List columnList = pair.k.getColumns(patterns, showColumns.getTagFilter());
+
+ // 列名前加上schemaPrefix
if (schemaPrefix != null) {
- for (Column column : columnList) {
- if (column.isDummy()) {
- column.setPath(schemaPrefix + "." + column.getPath());
- }
- }
+ columnList.forEach(
+ column -> {
+ column.setPath(schemaPrefix + "." + column.getPath());
+ targetColumns.add(column);
+ });
+ } else {
+ targetColumns.addAll(columnList);
}
- columnSet.addAll(columnList);
} catch (PhysicalException e) {
return new TaskExecuteResult(e);
}
}
- Set pathRegexSet = showColumns.getPathRegexSet();
- TagFilter tagFilter = showColumns.getTagFilter();
-
- TreeSet tsSetAfterFilter = new TreeSet<>(Comparator.comparing(Column::getPhysicalPath));
- for (Column column : columnSet) {
- boolean isTarget = true;
- if (!pathRegexSet.isEmpty()) {
- isTarget = false;
- for (String pathRegex : pathRegexSet) {
- if (Pattern.matches(StringUtils.reformatPath(pathRegex), column.getPath())) {
- isTarget = true;
- break;
- }
- }
- }
- if (tagFilter != null) {
- if (!TagKVUtils.match(column.getTags(), tagFilter)) {
- isTarget = false;
- }
- }
- if (isTarget) {
- tsSetAfterFilter.add(column);
- }
- }
-
int limit = showColumns.getLimit();
int offset = showColumns.getOffset();
if (limit == Integer.MAX_VALUE && offset == 0) {
- return new TaskExecuteResult(Column.toRowStream(tsSetAfterFilter));
+ return new TaskExecuteResult(Column.toRowStream(targetColumns));
} else {
// only need part of data.
List tsList = new ArrayList<>();
- int cur = 0, size = tsSetAfterFilter.size();
- for (Iterator iter = tsSetAfterFilter.iterator(); iter.hasNext(); cur++) {
+ int cur = 0, size = targetColumns.size();
+ for (Iterator iter = targetColumns.iterator(); iter.hasNext(); cur++) {
if (cur >= size || cur - offset >= limit) {
break;
}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/queue/StoragePhysicalTaskQueue.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/queue/StoragePhysicalTaskQueue.java
index 7fc371d2c2..cb5fa5fb3c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/queue/StoragePhysicalTaskQueue.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/queue/StoragePhysicalTaskQueue.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.storage.queue;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/ColumnKeyTranslator.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/ColumnKeyTranslator.java
index cf3d2b2025..2e6f7fa972 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/ColumnKeyTranslator.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/ColumnKeyTranslator.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.storage.utils;
import cn.edu.tsinghua.iginx.engine.physical.storage.domain.ColumnKey;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/TagKVUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/TagKVUtils.java
index 2202931d68..2acb04a057 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/TagKVUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/storage/utils/TagKVUtils.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.storage.utils;
import cn.edu.tsinghua.iginx.engine.shared.operator.tag.*;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/AbstractPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/AbstractPhysicalTask.java
index 30a31be860..32727aa5ff 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/AbstractPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/AbstractPhysicalTask.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/BinaryMemoryPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/BinaryMemoryPhysicalTask.java
index f92df4aa45..1152970171 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/BinaryMemoryPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/BinaryMemoryPhysicalTask.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/CompletedFoldedPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/CompletedFoldedPhysicalTask.java
index 179982d791..8f24ad52de 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/CompletedFoldedPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/CompletedFoldedPhysicalTask.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task;
import cn.edu.tsinghua.iginx.engine.shared.RequestContext;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/FoldedMemoryPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/FoldedMemoryPhysicalTask.java
index 5a240f3e53..434633184c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/FoldedMemoryPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/FoldedMemoryPhysicalTask.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task;
import static cn.edu.tsinghua.iginx.engine.logical.utils.MetaUtils.getFragmentsByColumnsInterval;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/GlobalPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/GlobalPhysicalTask.java
index a6054b42b6..409628d41a 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/GlobalPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/GlobalPhysicalTask.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/Measurable.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/Measurable.java
index df53ac9fcd..e173fead78 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/Measurable.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/Measurable.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task;
public interface Measurable {
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MemoryPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MemoryPhysicalTask.java
index e218ba69ea..2bcb274cd6 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MemoryPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MemoryPhysicalTask.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MultipleMemoryPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MultipleMemoryPhysicalTask.java
index 265de1b718..92c7f67f7b 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MultipleMemoryPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/MultipleMemoryPhysicalTask.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/PhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/PhysicalTask.java
index f5a4a9e62d..2e5a3177cc 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/PhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/PhysicalTask.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/StoragePhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/StoragePhysicalTask.java
index 91972369d7..5fd3c1159a 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/StoragePhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/StoragePhysicalTask.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskExecuteResult.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskExecuteResult.java
index 02f73466d0..fc5f87742a 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskExecuteResult.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskExecuteResult.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskType.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskType.java
index fbfee578fa..944d27350d 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskType.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/TaskType.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.physical.task;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/UnaryMemoryPhysicalTask.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/UnaryMemoryPhysicalTask.java
index d871066948..8240947cf1 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/UnaryMemoryPhysicalTask.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/UnaryMemoryPhysicalTask.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/utils/TaskUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/utils/TaskUtils.java
index 276e26cd32..ea72b82bd4 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/utils/TaskUtils.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/utils/TaskUtils.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task.utils;
import cn.edu.tsinghua.iginx.engine.physical.task.BinaryMemoryPhysicalTask;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskInfoVisitor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskInfoVisitor.java
index 7208d8d8dc..020150cfd2 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskInfoVisitor.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskInfoVisitor.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task.visitor;
import cn.edu.tsinghua.iginx.engine.physical.task.BinaryMemoryPhysicalTask;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskVisitor.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskVisitor.java
index 4a1eb3d259..b82c3d2205 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskVisitor.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/physical/task/visitor/TaskVisitor.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.physical.task.visitor;
import cn.edu.tsinghua.iginx.engine.physical.task.BinaryMemoryPhysicalTask;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Constants.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Constants.java
index 1645e8f241..20fe07f2c8 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Constants.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Constants.java
@@ -1,23 +1,26 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
public class Constants {
public static final String KEY = "key";
@@ -29,4 +32,11 @@ public class Constants {
public static final String UDF_CLASS = "t";
public static final String UDF_FUNC = "transform";
+
+ public static final String WINDOW_START_COL = "window_start";
+ public static final String WINDOW_END_COL = "window_end";
+
+ // 保留列名,会在reorder时保留,并按原顺序出现在表的最前面
+ public static final Set RESERVED_COLS =
+ new HashSet<>(Arrays.asList(WINDOW_START_COL, WINDOW_END_COL));
}
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/KeyRange.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/KeyRange.java
index 35000ca367..83656eccac 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/KeyRange.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/KeyRange.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/RequestContext.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/RequestContext.java
index 293e2b431c..c9bb244ae9 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/RequestContext.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/RequestContext.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.shared;
import cn.edu.tsinghua.iginx.engine.physical.task.PhysicalTask;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Result.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Result.java
index 67d0a3cf41..37c4239667 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Result.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/Result.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.shared;
import cn.edu.tsinghua.iginx.engine.physical.exception.PhysicalException;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/constraint/ConstraintManager.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/constraint/ConstraintManager.java
index 6f88d8573f..f61d34cbc2 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/constraint/ConstraintManager.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/constraint/ConstraintManager.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared.constraint;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/ExecuteDetail.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/ExecuteDetail.java
index 563bf12a99..98223b3a64 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/ExecuteDetail.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/ExecuteDetail.java
@@ -1,3 +1,21 @@
+/*
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package cn.edu.tsinghua.iginx.engine.shared.data;
import java.util.List;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/Value.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/Value.java
index c9b4c10e02..3cffd7cf4b 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/Value.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/Value.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared.data;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/ClearEmptyRowStreamWrapper.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/ClearEmptyRowStreamWrapper.java
index a867c26cc8..d6106c0003 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/ClearEmptyRowStreamWrapper.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/ClearEmptyRowStreamWrapper.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared.data.read;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Field.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Field.java
index afb1c18e7d..4ebfc7a12c 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Field.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Field.java
@@ -1,20 +1,19 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared.data.read;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/FilterRowStreamWrapper.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/FilterRowStreamWrapper.java
index ded35cfecb..4e51e0f271 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/FilterRowStreamWrapper.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/FilterRowStreamWrapper.java
@@ -1,17 +1,19 @@
/*
- * Copyright 2024 IGinX of Tsinghua University
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * Licensed 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
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * 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.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared.data.read;
diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Header.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Header.java
index 5a6614d463..44a07a114f 100644
--- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Header.java
+++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/data/read/Header.java
@@ -1,23 +1,24 @@
/*
- * 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
+ * IGinX - the polystore system with high performance
+ * Copyright (C) Tsinghua University
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * 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.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package cn.edu.tsinghua.iginx.engine.shared.data.read;
+import static cn.edu.tsinghua.iginx.engine.shared.Constants.RESERVED_COLS;
+
import cn.edu.tsinghua.iginx.utils.Pair;
import cn.edu.tsinghua.iginx.utils.StringUtils;
import java.util.*;
@@ -126,52 +127,72 @@ public boolean equals(Object o) {
&& Objects.equals(indexMap, header.indexMap);
}
- public Header renamedHeader(Map aliasMap, List ignorePatterns) {
+ public Header renamedHeader(List> aliasList, List ignorePatterns) {
List newFields = new ArrayList<>();
- fields.forEach(
- field -> {
- // 如果列名在ignorePatterns中,对该列不执行rename
- for (String ignorePattern : ignorePatterns) {
- if (StringUtils.match(field.getName(), ignorePattern)) {
- newFields.add(field);
- return;
- }
+ int size = getFieldSize();
+ for (int i = 0; i < size; i++) {
+ Field field = fields.get(i);
+ // 如果列名在ignorePatterns中,对该列不执行rename
+ boolean ignore = false;
+ for (String ignorePattern : ignorePatterns) {
+ if (StringUtils.match(field.getName(), ignorePattern)) {
+ newFields.add(field);
+ ignore = true;
+ break;
+ }
+ }
+ if (ignore) {
+ continue;
+ }
+ String alias = "";
+ for (Pair pair : aliasList) {
+ String oldPattern = pair.k;
+ String newPattern = pair.v;
+ if (oldPattern.equals("*") && newPattern.endsWith(".*")) {
+ String newPrefix = newPattern.substring(0, newPattern.length() - 1);
+ alias = newPrefix + field.getName();
+ } else if (oldPattern.endsWith(".*") && newPattern.endsWith(".*")) {
+ String oldPrefix = oldPattern.substring(0, oldPattern.length() - 1);
+ String newPrefix = newPattern.substring(0, newPattern.length() - 1);
+ if (field.getName().startsWith(oldPrefix)) {
+ alias = field.getName().replaceFirst(oldPrefix, newPrefix);
}
- String alias = "";
- for (String oldPattern : aliasMap.keySet()) {
- String newPattern = aliasMap.get(oldPattern);
- if (oldPattern.equals("*") && newPattern.endsWith(".*")) {
- String newPrefix = newPattern.substring(0, newPattern.length() - 1);
- alias = newPrefix + field.getName();
- } else if (oldPattern.endsWith(".*") && newPattern.endsWith(".*")) {
- String oldPrefix = oldPattern.substring(0, oldPattern.length() - 1);
- String newPrefix = newPattern.substring(0, newPattern.length() - 1);
- if (field.getName().startsWith(oldPrefix)) {
- alias = field.getName().replaceFirst(oldPrefix, newPrefix);
- }
- break;
- } else if (oldPattern.equals(field.getFullName())) {
- alias = newPattern;
- break;
+ break;
+ } else if (oldPattern.equals(field.getName())) {
+ alias = newPattern;
+ Set