From 7f0b139de29fbdd8b9cd2ef3aeb86e2cd9f3a21f Mon Sep 17 00:00:00 2001 From: jzl18thu Date: Thu, 24 Oct 2024 10:58:58 +0800 Subject: [PATCH] feat(sql): support use func with expr params in filter (#473) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 支持在filter里使用参数为表达式的函数 更新剩余TPC-H语句准备测试 --- .../antlr4/cn/edu/tsinghua/iginx/sql/Sql.g4 | 12 +- .../logical/generator/QueryGenerator.java | 6 +- .../logical/utils/LogicalFilterUtils.java | 15 + .../memory/execute/utils/ExprUtils.java | 12 +- .../memory/execute/utils/RowUtils.java | 4 +- .../shared/expr/ConstantExpression.java | 2 + .../engine/shared/expr/FuncExpression.java | 7 + .../engine/shared/function/FunctionUtils.java | 4 +- .../function/manager/FunctionManager.java | 2 + .../shared/function/system/SubString.java | 97 + .../function/system/utils/ValueUtils.java | 8 + .../tsinghua/iginx/sql/IginXSqlVisitor.java | 297 +- .../optimizer/rules/ColumnPruningRule.java | 23 +- .../edu/tsinghua/iginx/utils/ValueUtils.java | 8 + .../integration/func/sql/SQLSessionIT.java | 43 +- .../iginx/integration/func/udf/UDFIT.java | 29 + .../iginx/integration/tpch/TPCHUtils.java | 27 +- test/src/test/resources/testConfig.properties | 2 +- test/src/test/resources/tpch/queries/q10.sql | 60 +- test/src/test/resources/tpch/queries/q11.sql | 28 + test/src/test/resources/tpch/queries/q12.sql | 21 + test/src/test/resources/tpch/queries/q13.sql | 4 +- test/src/test/resources/tpch/queries/q14.sql | 9 + test/src/test/resources/tpch/queries/q15.sql | 30 + test/src/test/resources/tpch/queries/q16.sql | 87 +- test/src/test/resources/tpch/queries/q18.sql | 5 +- test/src/test/resources/tpch/queries/q19.sql | 121 +- .../src/test/resources/tpch/queries/q19_a.sql | 74 + test/src/test/resources/tpch/queries/q2.sql | 69 +- test/src/test/resources/tpch/queries/q21.sql | 4 +- test/src/test/resources/tpch/queries/q22.sql | 51 + test/src/test/resources/tpch/queries/q3.sql | 50 +- test/src/test/resources/tpch/queries/q5.sql | 52 +- test/src/test/resources/tpch/queries/q7.sql | 48 + test/src/test/resources/tpch/queries/q8.sql | 37 + test/src/test/resources/tpch/sf0.1/q10.csv | 40 +- test/src/test/resources/tpch/sf0.1/q11.csv | 2542 +++++++++++++++++ test/src/test/resources/tpch/sf0.1/q12.csv | 3 + test/src/test/resources/tpch/sf0.1/q14.csv | 2 + test/src/test/resources/tpch/sf0.1/q15.csv | 2 + test/src/test/resources/tpch/sf0.1/q2.csv | 88 +- test/src/test/resources/tpch/sf0.1/q20.csv | 18 +- test/src/test/resources/tpch/sf0.1/q22.csv | 8 + test/src/test/resources/tpch/sf0.1/q7.csv | 5 + test/src/test/resources/tpch/sf0.1/q8.csv | 3 + 45 files changed, 3568 insertions(+), 491 deletions(-) create mode 100644 core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/SubString.java create mode 100644 test/src/test/resources/tpch/queries/q11.sql create mode 100644 test/src/test/resources/tpch/queries/q12.sql create mode 100644 test/src/test/resources/tpch/queries/q14.sql create mode 100644 test/src/test/resources/tpch/queries/q15.sql create mode 100644 test/src/test/resources/tpch/queries/q19_a.sql create mode 100644 test/src/test/resources/tpch/queries/q22.sql create mode 100644 test/src/test/resources/tpch/queries/q7.sql create mode 100644 test/src/test/resources/tpch/queries/q8.sql create mode 100644 test/src/test/resources/tpch/sf0.1/q11.csv create mode 100644 test/src/test/resources/tpch/sf0.1/q12.csv create mode 100644 test/src/test/resources/tpch/sf0.1/q14.csv create mode 100644 test/src/test/resources/tpch/sf0.1/q15.csv create mode 100644 test/src/test/resources/tpch/sf0.1/q22.csv create mode 100644 test/src/test/resources/tpch/sf0.1/q7.csv create mode 100644 test/src/test/resources/tpch/sf0.1/q8.csv diff --git a/antlr/src/main/antlr4/cn/edu/tsinghua/iginx/sql/Sql.g4 b/antlr/src/main/antlr4/cn/edu/tsinghua/iginx/sql/Sql.g4 index d53365ed96..2356ac3a3a 100644 --- a/antlr/src/main/antlr4/cn/edu/tsinghua/iginx/sql/Sql.g4 +++ b/antlr/src/main/antlr4/cn/edu/tsinghua/iginx/sql/Sql.g4 @@ -187,8 +187,8 @@ andExpression ; predicate - : (KEY | path | functionName LR_BRACKET path RR_BRACKET) comparisonOperator constant - | constant comparisonOperator (KEY | path | functionName LR_BRACKET path RR_BRACKET) + : (KEY | path) comparisonOperator constant + | constant comparisonOperator (KEY | path) | path comparisonOperator path | path OPERATOR_NOT? stringLikeOperator regex = stringLiteral | OPERATOR_NOT? LR_BRACKET orExpression RR_BRACKET @@ -198,11 +198,11 @@ predicate predicateWithSubquery : OPERATOR_NOT? EXISTS subquery - | (path | constant | functionName LR_BRACKET path RR_BRACKET) OPERATOR_NOT? IN subquery - | (path | constant | functionName LR_BRACKET path RR_BRACKET) comparisonOperator quantifier subquery - | (path | constant | functionName LR_BRACKET path RR_BRACKET) comparisonOperator subquery - | subquery comparisonOperator (path | constant | functionName LR_BRACKET path RR_BRACKET) + | (path | constant | expression) OPERATOR_NOT? IN subquery + | (path | constant | expression) comparisonOperator quantifier subquery | subquery comparisonOperator subquery + | (path | constant | expression) comparisonOperator subquery + | subquery comparisonOperator (path | constant | expression) ; quantifier diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java index f9df71de14..984ecbf0bb 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/logical/generator/QueryGenerator.java @@ -238,7 +238,9 @@ private static void checkSubQueryHasFreeVariables(UnarySelectStatement selectSta selectStatement.initFreeVariables(); List freeVariables = selectStatement.getFreeVariables(); if (!freeVariables.isEmpty()) { - throw new RuntimeException("Unexpected paths' name: " + freeVariables + "."); + throw new RuntimeException( + String.format( + "Unexpected paths' name: %s, check if there exists missing prefix.", freeVariables)); } } @@ -733,7 +735,7 @@ private static Operator buildReorder(UnarySelectStatement selectStatement, Opera if (selectStatement.isLastFirst()) { root = new Reorder(new OperatorSource(root), Arrays.asList("path", "value")); } else if (hasFuncWithArgs) { - root = new Reorder(new OperatorSource(root), Collections.singletonList("*")); + root = new Reorder(new OperatorSource(root), new ArrayList<>(Collections.singletonList("*"))); } else { List order = new ArrayList<>(); List isPyUDF = new ArrayList<>(); 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 bf44e11d68..e71b0b9fc5 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 @@ -730,6 +730,21 @@ private static Filter setTrue(Filter filter, Predicate predicate) { return new BoolFilter(true); } return filter; + case Expr: + ExprFilter exprFilter = (ExprFilter) filter; + List pathAList = ExprUtils.getPathFromExpr(exprFilter.getExpressionA()); + List pathBList = ExprUtils.getPathFromExpr(exprFilter.getExpressionB()); + boolean pathAHasStar = pathAList.stream().anyMatch(s -> s.contains("*")); + boolean pathBHasStar = pathBList.stream().anyMatch(s -> s.contains("*")); + if (Op.isOrOp(((ExprFilter) filter).getOp()) && (pathAHasStar || pathBHasStar)) { + return new BoolFilter(true); + } + boolean matchPathA = pathAList.stream().allMatch(predicate); + boolean matchPathB = pathBList.stream().allMatch(predicate); + if (!matchPathA || !matchPathB) { + return new BoolFilter(true); + } + return filter; default: return filter; } 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 ca36ad1357..7bb627b4c4 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 @@ -26,6 +26,7 @@ import cn.edu.tsinghua.iginx.engine.shared.data.read.Row; import cn.edu.tsinghua.iginx.engine.shared.expr.*; import cn.edu.tsinghua.iginx.engine.shared.function.Function; +import cn.edu.tsinghua.iginx.engine.shared.function.FunctionCall; import cn.edu.tsinghua.iginx.engine.shared.function.FunctionParams; import cn.edu.tsinghua.iginx.engine.shared.function.MappingType; import cn.edu.tsinghua.iginx.engine.shared.function.RowMappingFunction; @@ -130,14 +131,9 @@ private static Value calculateFuncExprNative(Row row, FuncExpression funcExpr) funcExpr.getArgs(), funcExpr.getKvargs(), funcExpr.isDistinct()); - Row ret; - try { - ret = rowMappingFunction.transform(row, params); - } catch (Exception e) { - throw new PhysicalTaskExecuteFailureException( - "encounter error when execute row mapping function " + rowMappingFunction.getIdentifier(), - e); - } + FunctionCall functionCall = new FunctionCall(rowMappingFunction, params); + + Row ret = RowUtils.calRowTransform(row, Collections.singletonList(functionCall), false); int retValueSize = ret.getValues().length; if (retValueSize != 1) { throw new InvalidOperatorParameterException( 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 c03e601623..12f0892ded 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 @@ -877,7 +877,7 @@ public static List cacheFilterResult(List rows, Filter filter) try { return FilterUtils.validate(filter, row); } catch (PhysicalException e) { - LOGGER.error("execute parallel filter error, cause by: ", e.getCause()); + LOGGER.error("execute parallel filter error, cause by: ", e); return false; } }) @@ -896,7 +896,7 @@ public static List cacheFilterResult(List rows, Filter filter) try { return FilterUtils.validate(filter, row); } catch (PhysicalException e) { - LOGGER.error("execute sequence filter error, cause by: ", e.getCause()); + LOGGER.error("execute sequence filter error, cause by: ", e); return false; } }) diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/ConstantExpression.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/ConstantExpression.java index d0955f307b..66e084551b 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/ConstantExpression.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/ConstantExpression.java @@ -44,6 +44,8 @@ public String getColumnName() { // 如果是小数,保留小数点后5位 if (value instanceof Double || value instanceof Float) { return String.format("%.5f", value); + } else if (value instanceof byte[]) { + return "'" + new String((byte[]) value) + "'"; } return value.toString(); } diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/FuncExpression.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/FuncExpression.java index 9515b933c1..cdfb87f215 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/FuncExpression.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/expr/FuncExpression.java @@ -20,6 +20,7 @@ package cn.edu.tsinghua.iginx.engine.shared.expr; import cn.edu.tsinghua.iginx.engine.shared.function.FunctionUtils; +import cn.edu.tsinghua.iginx.engine.shared.function.system.utils.ValueUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -98,6 +99,12 @@ public String getColumnName() { for (Expression expression : expressions) { columnName.append(expression.getColumnName()).append(", "); } + for (Object arg : args) { + columnName.append(ValueUtils.toString(arg)).append(", "); + } + for (Map.Entry kvarg : kvargs.entrySet()) { + columnName.append(kvarg.getValue()).append(", "); + } columnName.setLength(columnName.length() - 2); columnName.append(")"); return columnName.toString(); diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/FunctionUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/FunctionUtils.java index d26b9c3ae0..137eb624bc 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/FunctionUtils.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/FunctionUtils.java @@ -53,7 +53,7 @@ public class FunctionUtils { private static final String VALUE = "value"; private static final Set sysRowToRowFunctionSet = - new HashSet<>(Collections.singletonList("ratio")); + new HashSet<>(Arrays.asList("ratio", "substring")); private static final Set sysSetToRowFunctionSet = new HashSet<>( @@ -165,6 +165,7 @@ public static String getFunctionName(Function function) { static Map expectedParamNumMap = new HashMap<>(); // 此Map用于存储function期望的参数个数 + // TODO static { expectedParamNumMap.put("avg", 1); expectedParamNumMap.put("sum", 1); @@ -176,6 +177,7 @@ public static String getFunctionName(Function function) { expectedParamNumMap.put("first", 1); expectedParamNumMap.put("last", 1); expectedParamNumMap.put("ratio", 2); + expectedParamNumMap.put("substring", 1); } public static int getExpectedParamNum(String identifier) { diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/manager/FunctionManager.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/manager/FunctionManager.java index 2f27b121f4..e04cf5a4f5 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/manager/FunctionManager.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/manager/FunctionManager.java @@ -35,6 +35,7 @@ import cn.edu.tsinghua.iginx.engine.shared.function.system.Max; import cn.edu.tsinghua.iginx.engine.shared.function.system.Min; import cn.edu.tsinghua.iginx.engine.shared.function.system.Ratio; +import cn.edu.tsinghua.iginx.engine.shared.function.system.SubString; import cn.edu.tsinghua.iginx.engine.shared.function.system.Sum; import cn.edu.tsinghua.iginx.engine.shared.function.udf.python.PyUDAF; import cn.edu.tsinghua.iginx.engine.shared.function.udf.python.PyUDF; @@ -100,6 +101,7 @@ private void initSystemFunctions() { registerFunction(Sum.getInstance()); registerFunction(ArithmeticExpr.getInstance()); registerFunction(Ratio.getInstance()); + registerFunction(SubString.getInstance()); } private void initBasicUDFFunctions() { diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/SubString.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/SubString.java new file mode 100644 index 0000000000..2fa7e17d2f --- /dev/null +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/SubString.java @@ -0,0 +1,97 @@ +/* + * IGinX - the polystore system with high performance + * Copyright (C) Tsinghua University + * TSIGinX@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package cn.edu.tsinghua.iginx.engine.shared.function.system; + +import cn.edu.tsinghua.iginx.engine.shared.data.Value; +import cn.edu.tsinghua.iginx.engine.shared.data.read.Field; +import cn.edu.tsinghua.iginx.engine.shared.data.read.Header; +import cn.edu.tsinghua.iginx.engine.shared.data.read.Row; +import cn.edu.tsinghua.iginx.engine.shared.function.FunctionParams; +import cn.edu.tsinghua.iginx.engine.shared.function.FunctionType; +import cn.edu.tsinghua.iginx.engine.shared.function.MappingType; +import cn.edu.tsinghua.iginx.engine.shared.function.RowMappingFunction; +import cn.edu.tsinghua.iginx.thrift.DataType; +import java.util.Arrays; +import java.util.Collections; + +public class SubString implements RowMappingFunction { + + public static final String SUB_STRING = "substring"; + + private static final SubString INSTANCE = new SubString(); + + private SubString() {} + + public static SubString getInstance() { + return INSTANCE; + } + + @Override + public FunctionType getFunctionType() { + return FunctionType.System; + } + + @Override + public MappingType getMappingType() { + return MappingType.RowMapping; + } + + @Override + public String getIdentifier() { + return SUB_STRING; + } + + @Override + public Row transform(Row row, FunctionParams params) throws Exception { + if (params.getPaths().size() != 1 || params.getArgs().size() != 2) { + throw new IllegalArgumentException("Unexpected params for substring."); + } + + String path = params.getPaths().get(0); + Value valueA = row.getAsValue(path); + if (valueA == null || valueA.isNull()) { + return Row.EMPTY_ROW; + } + if (valueA.getDataType() != DataType.BINARY) { + throw new IllegalArgumentException("Unexpected data type for substring function."); + } + + long start, length; + if (!(params.getArgs().get(0) instanceof Long)) { + throw new IllegalArgumentException("The 2nd arg 'start' for substring should be a number."); + } + if (!(params.getArgs().get(1) instanceof Long)) { + throw new IllegalArgumentException("The 3rd arg 'length' for substring should be a number."); + } + + start = (Long) params.getArgs().get(0); + length = (Long) params.getArgs().get(1); + byte[] original = valueA.getBinaryV(); + byte[] ret = Arrays.copyOfRange(original, (int) (start - 1), (int) length); + + Header newHeader = + new Header( + row.getHeader().getKey(), + Collections.singletonList( + new Field( + "substring(" + path + ", " + start + ", " + length + ")", DataType.BINARY))); + return new Row(newHeader, row.getKey(), new Object[] {ret}); + } +} diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/utils/ValueUtils.java b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/utils/ValueUtils.java index a87d6c0f50..59ecd6d2a6 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/utils/ValueUtils.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/engine/shared/function/system/utils/ValueUtils.java @@ -210,6 +210,14 @@ public static String toString(Object value, DataType dataType) { return ""; } + public static String toString(Object value) { + if (value instanceof byte[]) { + return new String((byte[]) value); + } else { + return value.toString(); + } + } + public static int getHash(Value value, boolean needTypeCast) { if (needTypeCast) { value = ValueUtils.transformToDouble(value); diff --git a/core/src/main/java/cn/edu/tsinghua/iginx/sql/IginXSqlVisitor.java b/core/src/main/java/cn/edu/tsinghua/iginx/sql/IginXSqlVisitor.java index 024d80883f..ac8802d1fc 100644 --- a/core/src/main/java/cn/edu/tsinghua/iginx/sql/IginXSqlVisitor.java +++ b/core/src/main/java/cn/edu/tsinghua/iginx/sql/IginXSqlVisitor.java @@ -139,6 +139,7 @@ import cn.edu.tsinghua.iginx.sql.SqlParser.SqlStatementContext; import cn.edu.tsinghua.iginx.sql.SqlParser.StorageEngineContext; import cn.edu.tsinghua.iginx.sql.SqlParser.StringLiteralContext; +import cn.edu.tsinghua.iginx.sql.SqlParser.SubqueryContext; import cn.edu.tsinghua.iginx.sql.SqlParser.TableReferenceContext; import cn.edu.tsinghua.iginx.sql.SqlParser.TagEquationContext; import cn.edu.tsinghua.iginx.sql.SqlParser.TagExpressionContext; @@ -706,7 +707,9 @@ private void parseFromParts(FromClauseContext ctx, UnarySelectStatement selectSt JoinType joinType = parseJoinType(joinPartContext.join()); Filter filter = null; if (joinPartContext.orExpression() != null) { - filter = parseOrExpression(joinPartContext.orExpression(), selectStatement).getFilter(); + filter = + parseOrExpression(joinPartContext.orExpression(), selectStatement, Pos.FromClause) + .getFilter(); } List columns = new ArrayList<>(); if (joinPartContext.colList() != null && !joinPartContext.colList().isEmpty()) { @@ -1014,45 +1017,40 @@ private void parseSelectPathsWithValue2Meta( private List parseExpression( ExpressionContext ctx, UnarySelectStatement selectStatement) { - return parseExpression(ctx, selectStatement, true); + return parseExpression(ctx, selectStatement, Pos.SelectClause); } private List parseExpression( - ExpressionContext ctx, UnarySelectStatement selectStatement, boolean isFromSelectClause) { + ExpressionContext ctx, UnarySelectStatement selectStatement, Pos pos) { if (ctx.function() != null) { - return Collections.singletonList( - parseFuncExpression(ctx, selectStatement, isFromSelectClause)); + return Collections.singletonList(parseFuncExpression(ctx, selectStatement, pos)); } if (ctx.path() != null && !ctx.path().isEmpty()) { - return Collections.singletonList( - parseBaseExpression(ctx, selectStatement, isFromSelectClause)); + return Collections.singletonList(parseBaseExpression(ctx, selectStatement, pos)); } if (ctx.constant() != null) { return Collections.singletonList(new ConstantExpression(parseValue(ctx.constant()))); } if (ctx.caseSpecification() != null) { return Collections.singletonList( - parseCaseWhenExpression(ctx.caseSpecification(), selectStatement)); + parseCaseWhenExpression(ctx.caseSpecification(), selectStatement, pos)); } List ret = new ArrayList<>(); if (ctx.inBracketExpr != null) { - List expressions = - parseExpression(ctx.inBracketExpr, selectStatement, isFromSelectClause); + List expressions = parseExpression(ctx.inBracketExpr, selectStatement, pos); for (Expression expression : expressions) { ret.add(new BracketExpression(expression)); } } else if (ctx.expr != null) { - List expressions = parseExpression(ctx.expr, selectStatement, isFromSelectClause); + List expressions = parseExpression(ctx.expr, selectStatement, pos); Operator operator = parseOperator(ctx); for (Expression expression : expressions) { ret.add(new UnaryExpression(operator, expression)); } } else if (ctx.leftExpr != null && ctx.rightExpr != null) { - List leftExpressions = - parseExpression(ctx.leftExpr, selectStatement, isFromSelectClause); - List rightExpressions = - parseExpression(ctx.rightExpr, selectStatement, isFromSelectClause); + List leftExpressions = parseExpression(ctx.leftExpr, selectStatement, pos); + List rightExpressions = parseExpression(ctx.rightExpr, selectStatement, pos); Operator operator = parseOperator(ctx); for (Expression leftExpression : leftExpressions) { for (Expression rightExpression : rightExpressions) { @@ -1083,12 +1081,8 @@ private List parseExpression( .getExpressions() .forEach( expression -> { - String selectedPath; - if (expression.hasAlias()) { - selectedPath = expression.getAlias(); - } else { - selectedPath = expression.getColumnName(); - } + String selectedPath = + expression.hasAlias() ? expression.getAlias() : expression.getColumnName(); BaseExpression baseExpression = new BaseExpression(selectedPath); ret.add(baseExpression); }); @@ -1099,7 +1093,7 @@ private List parseExpression( } private Expression parseFuncExpression( - ExpressionContext ctx, UnarySelectStatement selectStatement, boolean isFromSelectClause) { + ExpressionContext ctx, UnarySelectStatement selectStatement, Pos pos) { FunctionContext funcCtx = ctx.function(); String funcName = funcCtx.functionName().getText(); @@ -1116,10 +1110,7 @@ private Expression parseFuncExpression( List columns = new ArrayList<>(); for (ExpressionContext exprCtx : funcCtx.expression()) { - if (exprCtx.subquery() != null) { - throw new SQLParserException("Subquery is not supported to be used in function"); - } - columns.addAll(parseExpression(exprCtx, selectStatement, isFromSelectClause)); + columns.addAll(parseExpression(exprCtx, selectStatement, pos)); } List args = new ArrayList<>(); @@ -1161,48 +1152,53 @@ private Expression parseFuncExpression( } private Expression parseBaseExpression( - ExpressionContext ctx, UnarySelectStatement selectStatement, boolean isFromSelectClause) { + ExpressionContext ctx, UnarySelectStatement selectStatement, Pos pos) { String selectedPath = parsePath(ctx.path()); - // 如果查询语句中FROM子句只有一个部分且FROM一个前缀,则SELECT子句中的path只用写出后缀 + + if (filterPosSet.contains(pos)) { + // 如果查询语句不是一个子查询,FROM子句只有一个部分且FROM一个前缀,则filter中的path只用写出后缀 + if (selectStatement.isFromSinglePath() && !selectStatement.isSubQuery()) { + FromPart fromPart = selectStatement.getFromPart(0); + selectedPath = fromPart.getPrefix() + SQLConstant.DOT + selectedPath; + } + return new BaseExpression(selectedPath); + } + + String fullPath = selectedPath; + String originPath = selectedPath; + // 如果查询语句中FROM子句只有一个部分且FROM一个前缀,则path(可能会来自SELECT,GROUP BY,ORDER BY)只用写出后缀 if (selectStatement.isFromSinglePath()) { FromPart fromPart = selectStatement.getFromPart(0); - String fullPath = fromPart.getPrefix() + SQLConstant.DOT + selectedPath; - String originFullPath = fromPart.getOriginPrefix() + SQLConstant.DOT + selectedPath; - BaseExpression expression = new BaseExpression(fullPath); - if (isFromSelectClause) { - selectStatement.addSelectPath(originFullPath); - } - return expression; - } else { - BaseExpression expression = new BaseExpression(selectedPath); - if (isFromSelectClause) { - selectStatement.addSelectPath(selectedPath); - } - return expression; + fullPath = fromPart.getPrefix() + SQLConstant.DOT + selectedPath; + originPath = fromPart.getOriginPrefix() + SQLConstant.DOT + selectedPath; // 考虑FROM子句重命名的情况 + } + if (pos == Pos.SelectClause) { + selectStatement.addSelectPath(originPath); } + return new BaseExpression(fullPath); } private Expression parseCaseWhenExpression( - CaseSpecificationContext ctx, UnarySelectStatement selectStatement) { + CaseSpecificationContext ctx, UnarySelectStatement selectStatement, Pos pos) { if (ctx.simpleCase() != null) { - return parseSimpleCase(ctx.simpleCase(), selectStatement); + return parseSimpleCase(ctx.simpleCase(), selectStatement, pos); } else if (ctx.searchedCase() != null) { - return parseSearchedCase(ctx.searchedCase(), selectStatement); + return parseSearchedCase(ctx.searchedCase(), selectStatement, pos); } else { throw new SQLParserException("Illegal case when selected expression"); } } private CaseWhenExpression parseSimpleCase( - SimpleCaseContext ctx, UnarySelectStatement selectStatement) { + SimpleCaseContext ctx, UnarySelectStatement selectStatement, Pos pos) { List conditions = new ArrayList<>(); List results = new ArrayList<>(); - Expression leftExpr = parseExpression(ctx.expression(), selectStatement).get(0); + Expression leftExpr = parseExpression(ctx.expression(), selectStatement, pos).get(0); String leftPath = ExpressionUtils.transformToBaseExpr(leftExpr); for (SimpleWhenClauseContext context : ctx.simpleWhenClause()) { if (context.value != null) { - Expression rightExpr = parseExpression(context.value, selectStatement).get(0); + Expression rightExpr = parseExpression(context.value, selectStatement, pos).get(0); String rightPath = ExpressionUtils.transformToBaseExpr(rightExpr); Op op = context.comparisonOperator() == null @@ -1228,11 +1224,11 @@ private CaseWhenExpression parseSimpleCase( } } - results.add(parseExpression(context.result, selectStatement).get(0)); + results.add(parseExpression(context.result, selectStatement, pos).get(0)); } Expression resultElse = null; if (ctx.elseClause() != null) { - resultElse = parseExpression(ctx.elseClause().expression(), selectStatement).get(0); + resultElse = parseExpression(ctx.elseClause().expression(), selectStatement, pos).get(0); } String columnName = CaseWhenExpression.CASE_WHEN_PREFIX + caseWhenCount; caseWhenCount++; @@ -1240,23 +1236,24 @@ private CaseWhenExpression parseSimpleCase( } private CaseWhenExpression parseSearchedCase( - SearchedCaseContext ctx, UnarySelectStatement selectStatement) { + SearchedCaseContext ctx, UnarySelectStatement selectStatement, Pos pos) { List conditions = new ArrayList<>(); List results = new ArrayList<>(); for (SearchedWhenClauseContext context : ctx.searchedWhenClause()) { - FilterData filterData = parseOrExpression(context.condition, selectStatement); + FilterData filterData = + parseOrExpression(context.condition, selectStatement, Pos.SelectClause); if (!filterData.getSubQueryFromPartList().isEmpty()) { throw new SQLParserException( "Subquery is not supported to be used in case when expression."); } conditions.add(filterData.getFilter()); filterData.getPathList().forEach(selectStatement::addSelectPath); - results.add(parseExpression(context.result, selectStatement).get(0)); + results.add(parseExpression(context.result, selectStatement, pos).get(0)); } Expression resultElse = null; if (ctx.elseClause() != null) { - resultElse = parseExpression(ctx.elseClause().expression(), selectStatement).get(0); + resultElse = parseExpression(ctx.elseClause().expression(), selectStatement, pos).get(0); } String columnName = CaseWhenExpression.CASE_WHEN_PREFIX + caseWhenCount; caseWhenCount++; @@ -1287,7 +1284,8 @@ private void parseSpecialClause(SpecialClauseContext ctx, UnarySelectStatement s parseGroupByClause(ctx.groupByClause(), selectStatement); } if (ctx.havingClause() != null) { - FilterData filterData = parseOrExpression(ctx.havingClause().orExpression(), selectStatement); + FilterData filterData = + parseOrExpression(ctx.havingClause().orExpression(), selectStatement, Pos.HavingClause); selectStatement.setHavingFilter(filterData.getFilter()); filterData.getPathList().forEach(selectStatement::addHavingPath); filterData.getSubQueryFromPartList().forEach(selectStatement::addHavingSubQueryPart); @@ -1410,7 +1408,8 @@ private Expression parseGroupByItem( if (ctx.expression().subquery() != null) { throw new SQLParserException("Subquery is not supported in GROUP BY columns."); } - Expression expr = parseExpression(ctx.expression(), selectStatement, false).get(0); + Expression expr = + parseExpression(ctx.expression(), selectStatement, Pos.GroupByClause).get(0); MappingType type = ExpressionUtils.getExprMappingType(expr); if (type == MappingType.SetMapping || type == MappingType.Mapping) { throw new SQLParserException("GROUP BY column can not use SetToSet/SetToRow functions."); @@ -1522,7 +1521,7 @@ private void parseOrderItem(OrderItemContext ctx, SelectStatement selectStatemen if (ctx.expression().subquery() != null) { throw new SQLParserException("Subquery is not supported in ORDER BY columns."); } - Expression expr = parseExpression(ctx.expression(), statement, false).get(0); + Expression expr = parseExpression(ctx.expression(), statement, Pos.OrderByClause).get(0); MappingType type = ExpressionUtils.getExprMappingType(expr); if (type == MappingType.SetMapping || type == MappingType.Mapping) { throw new SQLParserException("ORDER BY column can not use SetToSet/SetToRow functions."); @@ -1649,24 +1648,28 @@ private BasePreciseTagFilter parseAndPreciseExpression(AndPreciseExpressionConte } private FilterData parseOrExpression(OrExpressionContext ctx, Statement statement) { + return parseOrExpression(ctx, statement, Pos.WhereClause); + } + + private FilterData parseOrExpression(OrExpressionContext ctx, Statement statement, Pos pos) { List children = new ArrayList<>(); for (AndExpressionContext andCtx : ctx.andExpression()) { - children.add(parseAndExpression(andCtx, statement)); + children.add(parseAndExpression(andCtx, statement, pos)); } return children.size() == 1 ? children.get(0) : new FilterData(children, FilterType.Or); } - private FilterData parseAndExpression(AndExpressionContext ctx, Statement statement) { + private FilterData parseAndExpression(AndExpressionContext ctx, Statement statement, Pos pos) { List children = new ArrayList<>(); for (PredicateContext predicateCtx : ctx.predicate()) { - children.add(parsePredicate(predicateCtx, statement)); + children.add(parsePredicate(predicateCtx, statement, pos)); } return children.size() == 1 ? children.get(0) : new FilterData(children, FilterType.And); } - private FilterData parsePredicate(PredicateContext ctx, Statement statement) { + private FilterData parsePredicate(PredicateContext ctx, Statement statement, Pos pos) { if (ctx.orExpression() != null) { - FilterData filterData = parseOrExpression(ctx.orExpression(), statement); + FilterData filterData = parseOrExpression(ctx.orExpression(), statement, pos); if (ctx.OPERATOR_NOT() != null) { filterData.setFilter(new NotFilter(filterData.getFilter())); } @@ -1685,13 +1688,13 @@ private FilterData parsePredicate(PredicateContext ctx, Statement statement) { if (ctx.predicateWithSubquery() != null) { return parseFilterWithSubQuery( - ctx.predicateWithSubquery(), (UnarySelectStatement) statement); + ctx.predicateWithSubquery(), (UnarySelectStatement) statement, pos); } else if (ctx.expression().size() == 2) { - return parseExprFilter(ctx, (UnarySelectStatement) statement); - } else if (ctx.path().size() == 1) { - return parseValueFilter(ctx, (UnarySelectStatement) statement); + return parseExprFilter(ctx, (UnarySelectStatement) statement, pos); + } else if (ctx.path().size() == 2) { + return parsePathFilter(ctx, (UnarySelectStatement) statement, pos); } else { - return parsePathFilter(ctx, (UnarySelectStatement) statement); + return parseValueFilter(ctx, (UnarySelectStatement) statement, pos); } } } @@ -1706,32 +1709,24 @@ private FilterData parseKeyFilter(PredicateContext ctx) { return new FilterData(new KeyFilter(op, time)); } - private FilterData parseExprFilter(PredicateContext ctx, UnarySelectStatement statement) { + private FilterData parseExprFilter( + PredicateContext ctx, UnarySelectStatement statement, Pos pos) { Op op = Op.str2Op(ctx.comparisonOperator().getText()); assert ctx.expression().size() == 2; - Expression expressionA = parseExpression(ctx.expression().get(0), statement, false).get(0); - Expression expressionB = parseExpression(ctx.expression().get(1), statement, false).get(0); + Expression expressionA = parseExpression(ctx.expression().get(0), statement, pos).get(0); + Expression expressionB = parseExpression(ctx.expression().get(1), statement, pos).get(0); return new FilterData(new ExprFilter(expressionA, op, expressionB)); } - private FilterData parseValueFilter(PredicateContext ctx, UnarySelectStatement statement) { + private FilterData parseValueFilter( + PredicateContext ctx, UnarySelectStatement statement, Pos pos) { String path = parsePath(ctx.path().get(0)); - if (statement.isFromSinglePath() && !statement.isSubQuery()) { - FromPart fromPart = statement.getFromPart(0); + FromPart fromPart = getFromPartIfNeedPrefix(statement, pos); + if (fromPart != null) { path = fromPart.getPrefix() + SQLConstant.DOT + path; } - // deal with having filter with functions like having avg(a) > 3. - // we need a instead of avg(a) to combine fragments' raw data. - if (ctx.functionName() != null) { - String funcName = ctx.functionName().getText(); - if (FunctionUtils.isSysFunc(funcName)) { - funcName = funcName.toLowerCase(); - } - path = funcName + "(" + path + ")"; - } - Op op; if (ctx.stringLikeOperator() != null) { String strOp = ctx.stringLikeOperator().getText().trim().toLowerCase(); @@ -1761,15 +1756,15 @@ private FilterData parseValueFilter(PredicateContext ctx, UnarySelectStatement s return filterData; } - private FilterData parsePathFilter(PredicateContext ctx, UnarySelectStatement statement) { + private FilterData parsePathFilter( + PredicateContext ctx, UnarySelectStatement statement, Pos pos) { String pathA = parsePath(ctx.path().get(0)); String pathB = parsePath(ctx.path().get(1)); Op op = Op.str2Op(ctx.comparisonOperator().getText().trim().toLowerCase()); - // 如果查询语句不是一个子查询,FROM子句只有一个部分且FROM一个前缀,则WHERE条件中的path只用写出后缀 - if (statement.isFromSinglePath() && !statement.isSubQuery()) { - FromPart fromPart = statement.getFromPart(0); + FromPart fromPart = getFromPartIfNeedPrefix(statement, pos); + if (fromPart != null) { pathA = fromPart.getPrefix() + SQLConstant.DOT + pathA; pathB = fromPart.getPrefix() + SQLConstant.DOT + pathB; } @@ -1780,15 +1775,15 @@ private FilterData parsePathFilter(PredicateContext ctx, UnarySelectStatement st } private FilterData parseFilterWithSubQuery( - PredicateWithSubqueryContext ctx, UnarySelectStatement statement) { + PredicateWithSubqueryContext ctx, UnarySelectStatement statement, Pos pos) { if (ctx.EXISTS() != null) { return parseExistsFilter(ctx, statement); } else if (ctx.IN() != null) { - return parseInFilter(ctx, statement); + return parseInFilter(ctx, statement, pos); } else if (ctx.quantifier() != null) { - return parseQuantifierComparisonFilter(ctx, statement); + return parseQuantifierComparisonFilter(ctx, statement, pos); } else if (ctx.subquery().size() == 1) { - return parseScalarSubQueryComparisonFilter(ctx, statement); + return parseScalarSubQueryComparisonFilter(ctx, statement, pos); } else { return parseTwoScalarSubQueryComparisonFilter(ctx, statement); } @@ -1816,7 +1811,7 @@ private FilterData parseExistsFilter( } private FilterData parseInFilter( - PredicateWithSubqueryContext ctx, UnarySelectStatement statement) { + PredicateWithSubqueryContext ctx, UnarySelectStatement statement, Pos pos) { SelectStatement subStatement = buildSubStatement(ctx, statement, 0, 1); // 计算子查询的自由变量 subStatement.initFreeVariables(); @@ -1824,24 +1819,27 @@ private FilterData parseInFilter( markJoinCount += 1; Filter filter; - Expression expression = subStatement.getExpressions().get(0); + Expression subQueryExpr = subStatement.getExpressions().get(0); + String subQueryPath = + subQueryExpr.hasAlias() ? subQueryExpr.getAlias() : subQueryExpr.getColumnName(); if (ctx.constant() != null) { Value value = new Value(parseValue(ctx.constant())); - String path = expression.hasAlias() ? expression.getAlias() : expression.getColumnName(); - filter = new ValueFilter(path, Op.E, value); - } else { + filter = new ValueFilter(subQueryPath, Op.E, value); + } else if (ctx.path() != null) { String pathA = parsePath(ctx.path()); if (statement.isFromSinglePath() && !statement.isSubQuery()) { pathA = statement.getFromPart(0).getPrefix() + SQLConstant.DOT + pathA; } - // deal with having filter with functions - if (ctx.functionName() != null) { - pathA = ctx.functionName().getText() + "(" + pathA + ")"; - } - - String pathB = expression.hasAlias() ? expression.getAlias() : expression.getColumnName(); - filter = new PathFilter(pathA, Op.E, pathB); + filter = new PathFilter(pathA, Op.E, subQueryPath); subStatement.addFreeVariable(pathA); + } else { + assert ctx.expression() != null; + Expression expr = parseExpression(ctx.expression(), statement, Pos.WhereClause).get(0); + filter = + pos == Pos.HavingClause + ? new PathFilter(expr.getColumnName(), Op.E, subQueryPath) + : new ExprFilter(expr, Op.E, new BaseExpression(subQueryPath)); + subStatement.addFreeVariable(expr.getColumnName()); } boolean isAntiJoin = ctx.OPERATOR_NOT() != null; @@ -1855,7 +1853,7 @@ private FilterData parseInFilter( } private FilterData parseQuantifierComparisonFilter( - PredicateWithSubqueryContext ctx, UnarySelectStatement statement) { + PredicateWithSubqueryContext ctx, UnarySelectStatement statement, Pos pos) { SelectStatement subStatement = buildSubStatement(ctx, statement, 0, 1); // 计算子查询的自由变量 subStatement.initFreeVariables(); @@ -1864,35 +1862,36 @@ private FilterData parseQuantifierComparisonFilter( Filter filter; Op op = Op.str2Op(ctx.comparisonOperator().getText().trim().toLowerCase()); - - Expression expression = subStatement.getExpressions().get(0); + Expression subQueryExpr = subStatement.getExpressions().get(0); + String subQueryPath = + subQueryExpr.hasAlias() ? subQueryExpr.getAlias() : subQueryExpr.getColumnName(); if (ctx.constant() != null) { Value value = new Value(parseValue(ctx.constant())); - String path = expression.hasAlias() ? expression.getAlias() : expression.getColumnName(); - if (ctx.quantifier().all() != null) { - op = path.contains("*") ? Op.getDeMorganOpposite(op) : Op.getOpposite(op); + op = subQueryPath.contains("*") ? Op.getDeMorganOpposite(op) : Op.getOpposite(op); } - - filter = new ValueFilter(path, op, value); - } else { + filter = new ValueFilter(subQueryPath, op, value); + } else if (ctx.path() != null) { String pathA = parsePath(ctx.path()); if (statement.isFromSinglePath() && !statement.isSubQuery()) { pathA = statement.getFromPart(0).getPrefix() + SQLConstant.DOT + pathA; } - // deal with having filter with functions - if (ctx.functionName() != null) { - pathA = ctx.functionName().getText() + "(" + pathA + ")"; - } - - String pathB = expression.hasAlias() ? expression.getAlias() : expression.getColumnName(); - if (ctx.quantifier().all() != null) { op = Op.getOpposite(op); } - - filter = new PathFilter(pathA, op, pathB); + filter = new PathFilter(pathA, op, subQueryPath); subStatement.addFreeVariable(pathA); + } else { + assert ctx.expression() != null; + Expression expr = parseExpression(ctx.expression(), statement, Pos.WhereClause).get(0); + if (ctx.quantifier().all() != null) { + op = Op.getOpposite(op); + } + filter = + pos == Pos.HavingClause + ? new PathFilter(expr.getColumnName(), op, subQueryPath) + : new ExprFilter(expr, op, new BaseExpression(subQueryPath)); + subStatement.addFreeVariable(expr.getColumnName()); } boolean isAntiJoin = ctx.quantifier().all() != null; @@ -1906,7 +1905,7 @@ private FilterData parseQuantifierComparisonFilter( } private FilterData parseScalarSubQueryComparisonFilter( - PredicateWithSubqueryContext ctx, UnarySelectStatement statement) { + PredicateWithSubqueryContext ctx, UnarySelectStatement statement, Pos pos) { SelectStatement subStatement = buildSubStatement(ctx, statement, 0, 1); // 计算子查询的自由变量 subStatement.initFreeVariables(); @@ -1919,25 +1918,33 @@ private FilterData parseScalarSubQueryComparisonFilter( FilterData filterData = new FilterData(); filterData.addSubQueryFromPart(subQueryPart); - Expression expression = subStatement.getExpressions().get(0); + Expression subQueryExpr = subStatement.getExpressions().get(0); + String subQueryPath = + subQueryExpr.hasAlias() ? subQueryExpr.getAlias() : subQueryExpr.getColumnName(); Op op = Op.str2Op(ctx.comparisonOperator().getText().trim().toLowerCase()); + if (ctx.children.get(0) instanceof SubqueryContext) { + op = Op.getDirectionOpposite(op); + } + if (ctx.constant() != null) { Value value = new Value(parseValue(ctx.constant())); - String path = expression.hasAlias() ? expression.getAlias() : expression.getColumnName(); - filterData.setFilter(new ValueFilter(path, op, value)); - } else { + filterData.setFilter(new ValueFilter(subQueryPath, op, value)); + } else if (ctx.path() != null) { String pathA = parsePath(ctx.path()); if (statement.isFromSinglePath() && !statement.isSubQuery()) { pathA = statement.getFromPart(0).getPrefix() + SQLConstant.DOT + pathA; } - // deal with having filter with functions - if (ctx.functionName() != null) { - pathA = ctx.functionName().getText() + "(" + pathA + ")"; + filterData.setFilter(new PathFilter(pathA, op, subQueryPath)); + } else { + assert ctx.expression() != null; + Expression expr = parseExpression(ctx.expression(), statement, Pos.WhereClause).get(0); + if (pos == Pos.HavingClause) { + filterData.setFilter(new PathFilter(expr.getColumnName(), op, subQueryPath)); + } else { + filterData.setFilter(new ExprFilter(expr, op, new BaseExpression(subQueryPath))); } - - String pathB = expression.hasAlias() ? expression.getAlias() : expression.getColumnName(); - filterData.setFilter(new PathFilter(pathA, op, pathB)); } + return filterData; } @@ -2158,6 +2165,21 @@ private Map parseTagList(TagListContext ctx) { return tags; } + private FromPart getFromPartIfNeedPrefix(UnarySelectStatement statement, Pos pos) { + if (filterPosSet.contains(pos)) { + // 如果查询不是一个子查询,FROM子句只有一个部分且FROM一个前缀,则filter中的path只用写出后缀 + if (statement.isFromSinglePath() && !statement.isSubQuery()) { + return statement.getFromPart(0); + } + } else { // filter来自SELECT子句的场景:case-when + // 如果FROM子句只有一个部分且FROM一个前缀,则path(可能会来自SELECT,GROUP BY,ORDER BY)只用写出后缀 + if (statement.isFromSinglePath()) { + return statement.getFromPart(0); + } + } + return null; + } + private List getPathsFromPredicate( PredicateContext predicateContext, UnarySelectStatement statement) { List paths = new ArrayList<>(); @@ -2244,4 +2266,17 @@ public List getSubQueryFromPartList() { return subQueryFromPartList; } } + + private enum Pos { + SelectClause, + FromClause, + WhereClause, + GroupByClause, + HavingClause, + OrderByClause, + } + + // 关联子查询里,仅FROM子句和WHERE子句可以使用来自外查询的变量 + private static final Set filterPosSet = + new HashSet<>(Arrays.asList(Pos.FromClause, Pos.WhereClause)); } diff --git a/optimizer/src/main/java/cn/edu/tsinghua/iginx/logical/optimizer/rules/ColumnPruningRule.java b/optimizer/src/main/java/cn/edu/tsinghua/iginx/logical/optimizer/rules/ColumnPruningRule.java index 909b54e9e2..810f5472d6 100644 --- a/optimizer/src/main/java/cn/edu/tsinghua/iginx/logical/optimizer/rules/ColumnPruningRule.java +++ b/optimizer/src/main/java/cn/edu/tsinghua/iginx/logical/optimizer/rules/ColumnPruningRule.java @@ -47,9 +47,11 @@ import cn.edu.tsinghua.iginx.logical.optimizer.core.RuleCall; import cn.edu.tsinghua.iginx.utils.Pair; import cn.edu.tsinghua.iginx.utils.StringUtils; +import cn.edu.tsinghua.iginx.utils.ValueUtils; import com.google.auto.service.AutoService; import java.util.*; import java.util.regex.Pattern; +import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -436,10 +438,27 @@ private void changeColumnsFromFunctionCallList( columns.addAll(newColumns); } else { List columnNames = functionCall.getParams().getPaths(); - String functionStr = functionName + "(" + String.join(", ", columnNames) + ")"; + List args = functionCall.getParams().getArgs(); + Map kvargs = functionCall.getParams().getKwargs(); + + StringBuilder sb = new StringBuilder(); + sb.append(functionName).append("("); if (functionCall.getParams().isDistinct()) { - functionStr = functionName + "(distinct " + String.join(", ", columnNames) + ")"; + sb.append("distinct "); + } + sb.append(String.join(", ", columnNames)); + if (!args.isEmpty()) { + sb.append(", "); + sb.append(args.stream().map(ValueUtils::toString).collect(Collectors.joining(", "))); } + if (!kvargs.isEmpty()) { + sb.append(", "); + sb.append( + kvargs.values().stream().map(Object::toString).collect(Collectors.joining(", "))); + } + sb.append(")"); + + String functionStr = sb.toString(); columns.addAll(paths); if (columns.contains(functionStr)) { columns.remove(functionStr); diff --git a/shared/src/main/java/cn/edu/tsinghua/iginx/utils/ValueUtils.java b/shared/src/main/java/cn/edu/tsinghua/iginx/utils/ValueUtils.java index 849c47a261..9f9cdf093e 100644 --- a/shared/src/main/java/cn/edu/tsinghua/iginx/utils/ValueUtils.java +++ b/shared/src/main/java/cn/edu/tsinghua/iginx/utils/ValueUtils.java @@ -48,4 +48,12 @@ public static double transformToDouble(Object value) { throw new IllegalArgumentException("Unexpected data type"); } } + + public static String toString(Object value) { + if (value instanceof byte[]) { + return new String((byte[]) value); + } else { + return value.toString(); + } + } } diff --git a/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/sql/SQLSessionIT.java b/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/sql/SQLSessionIT.java index bf23ed33a0..881f5acb90 100644 --- a/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/sql/SQLSessionIT.java +++ b/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/sql/SQLSessionIT.java @@ -4551,7 +4551,7 @@ public void testSelectSubQuery() { executor.executeAndCompare(statement, expected); statement = - "SELECT a, (SELECT d, AVG(a) FROM test.b GROUP BY d HAVING avg(test.b.a) > 2) FROM test.a;"; + "SELECT a, (SELECT d, AVG(a) FROM test.b GROUP BY d HAVING avg(a) > 2) FROM test.a;"; expected = "ResultSets:\n" + "+---+--------+--------+-------------+\n" @@ -4665,7 +4665,7 @@ public void testSelectSubQuery() { executor.executeAndCompare(statement, expected); statement = - "SELECT a, (SELECT AVG(a) AS a1 FROM test.b GROUP BY d HAVING avg(test.b.a) > 2) * (SELECT AVG(a) AS a2 FROM test.b) FROM test.a;"; + "SELECT a, (SELECT AVG(a) AS a1 FROM test.b GROUP BY d HAVING avg(a) > 2) * (SELECT AVG(a) AS a2 FROM test.b) FROM test.a;"; expected = "ResultSets:\n" + "+---+--------+-------+\n" @@ -5017,6 +5017,18 @@ public void testWhereSubQuery() { + "Total line number = 2\n"; executor.executeAndCompare(statement, expected); + statement = "SELECT * FROM test.a WHERE (SELECT AVG(a) FROM test.b) > a;"; + expected = + "ResultSets:\n" + + "+---+--------+--------+--------+--------+\n" + + "|key|test.a.a|test.a.b|test.a.c|test.a.d|\n" + + "+---+--------+--------+--------+--------+\n" + + "| 2| 1| 3| 2.1| val2|\n" + + "| 5| 1| 2| 3.1| val1|\n" + + "+---+--------+--------+--------+--------+\n" + + "Total line number = 2\n"; + executor.executeAndCompare(statement, expected); + statement = "SELECT * FROM test.a WHERE (SELECT AVG(a) AS a FROM test.c) = (SELECT AVG(a) AS b FROM test.b);"; expected = @@ -5151,6 +5163,30 @@ public void testHavingSubQuery() { + "+-------------+--------+\n" + "Total line number = 1\n"; executor.executeAndCompare(statement, expected); + + statement = "SELECT AVG(a + c), b FROM test.a GROUP BY b;"; + expected = + "ResultSets:\n" + + "+------------------------+--------+\n" + + "|avg(test.a.a + test.a.c)|test.a.b|\n" + + "+------------------------+--------+\n" + + "| 5.1| 2|\n" + + "| 3.1| 3|\n" + + "+------------------------+--------+\n" + + "Total line number = 2\n"; + executor.executeAndCompare(statement, expected); + + statement = + "SELECT AVG(a + c), b FROM test.a GROUP BY b HAVING AVG(a + c) > (SELECT AVG(a) * 2 FROM test.b);"; + expected = + "ResultSets:\n" + + "+------------------------+--------+\n" + + "|avg(test.a.a + test.a.c)|test.a.b|\n" + + "+------------------------+--------+\n" + + "| 5.1| 2|\n" + + "+------------------------+--------+\n" + + "Total line number = 1\n"; + executor.executeAndCompare(statement, expected); } @Test @@ -6374,7 +6410,8 @@ public void testErrorClause() { executor.executeAndCompareErrMsg(errClause, "Group by can not use SetToSet functions."); errClause = "select * from test.a join test.b where a > 0;"; - executor.executeAndCompareErrMsg(errClause, "Unexpected paths' name: [a]."); + executor.executeAndCompareErrMsg( + errClause, "Unexpected paths' name: [a], check if there exists missing prefix."); errClause = "select * from (show columns a.*), (show columns b.*);"; executor.executeAndCompareErrMsg( diff --git a/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/udf/UDFIT.java b/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/udf/UDFIT.java index 7653a86d48..5018c88d0e 100644 --- a/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/udf/UDFIT.java +++ b/test/src/test/java/cn/edu/tsinghua/iginx/integration/func/udf/UDFIT.java @@ -520,6 +520,35 @@ public void testExprFilter() { + "+---+-------+-------+-------+\n" + "Total line number = 6\n"; assertEquals(expected, ret.getResultInString(false, "")); + + query = "SELECT * FROM test WHERE pow(s1 + s2, 2) - 5 > 30;"; + ret = tool.execute(query); + expected = + "ResultSets:\n" + + "+---+-------+-------+-------+\n" + + "|key|test.s1|test.s2|test.s3|\n" + + "+---+-------+-------+-------+\n" + + "| 3| 4| 3| 1|\n" + + "| 4| 9| 7| 5|\n" + + "| 5| 3| 6| 2|\n" + + "| 6| 6| 4| 2|\n" + + "+---+-------+-------+-------+\n" + + "Total line number = 4\n"; + assertEquals(expected, ret.getResultInString(false, "")); + + query = "SELECT * FROM test WHERE multiply(s1, s2 + s3) > 20;"; + ret = tool.execute(query); + expected = + "ResultSets:\n" + + "+---+-------+-------+-------+\n" + + "|key|test.s1|test.s2|test.s3|\n" + + "+---+-------+-------+-------+\n" + + "| 4| 9| 7| 5|\n" + + "| 5| 3| 6| 2|\n" + + "| 6| 6| 4| 2|\n" + + "+---+-------+-------+-------+\n" + + "Total line number = 3\n"; + assertEquals(expected, ret.getResultInString(false, "")); } @Test diff --git a/test/src/test/java/cn/edu/tsinghua/iginx/integration/tpch/TPCHUtils.java b/test/src/test/java/cn/edu/tsinghua/iginx/integration/tpch/TPCHUtils.java index 73f6f29978..98e69672fe 100644 --- a/test/src/test/java/cn/edu/tsinghua/iginx/integration/tpch/TPCHUtils.java +++ b/test/src/test/java/cn/edu/tsinghua/iginx/integration/tpch/TPCHUtils.java @@ -31,10 +31,13 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Scanner; +import java.util.TimeZone; import java.util.stream.Collectors; import org.junit.Assert; import org.slf4j.Logger; @@ -140,10 +143,17 @@ private static void validate(SessionExecuteSqlResult result, int queryId) { } for (int i = 0; i < values.size(); i++) { for (int j = 0; j < values.get(i).size(); j++) { - if (result.getPaths().get(j).contains("address") - || result.getPaths().get(j).contains("comment") - || result.getPaths().get(j).contains("orderdate")) { - // TODO change unix time to date + if (result.getPaths().get(j).contains("orderdate")) { + long timestamp = (long) values.get(i).get(j); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + String date = dateFormat.format(new Date(timestamp)); + String answerDate = answers.get(i).get(j); + if (!date.equals(answerDate)) { + System.out.println("Result string: '" + date + "'"); + System.out.println("Answer string: '" + answerDate + "'"); + } + assert date.equals(answerDate); continue; } // if only contains number and dot, then parse to double @@ -156,11 +166,12 @@ private static void validate(SessionExecuteSqlResult result, int queryId) { } assert answerNumber - number < 1e-3 && number - answerNumber < 1e-3; } else { - String resultString = new String((byte[]) values.get(i).get(j), StandardCharsets.UTF_8); - String answerString = answers.get(i).get(j); + String resultString = + new String((byte[]) values.get(i).get(j), StandardCharsets.UTF_8).trim(); + String answerString = answers.get(i).get(j).trim(); if (!resultString.equals(answerString)) { - System.out.println("Result string: " + resultString); - System.out.println("Answer string: " + answerString); + System.out.println("Result string: '" + resultString + "'"); + System.out.println("Answer string: '" + answerString + "'"); } assert resultString.equals(answerString); } diff --git a/test/src/test/resources/testConfig.properties b/test/src/test/resources/testConfig.properties index af56b51d18..8996b4f13c 100644 --- a/test/src/test/resources/testConfig.properties +++ b/test/src/test/resources/testConfig.properties @@ -69,6 +69,6 @@ is_scaling=false DBCE_test_way=oriHasDataExpHasData # TPC-H test -query_ids=1,2,3,4,5,6,9,10,13,16,17,18,19,20,21 +query_ids=1,2,3,4,5,6,9,10,13,16,17,19,20,21 max_repetitions_num=10 regression_threshold=0.3 diff --git a/test/src/test/resources/tpch/queries/q10.sql b/test/src/test/resources/tpch/queries/q10.sql index f7f36edbbf..882a77a014 100644 --- a/test/src/test/resources/tpch/queries/q10.sql +++ b/test/src/test/resources/tpch/queries/q10.sql @@ -1,7 +1,7 @@ SELECT customer.c_custkey, customer.c_name, - revenue, + SUM( tmp ) AS revenue, customer.c_acctbal, nation.n_name, customer.c_address, @@ -12,46 +12,34 @@ FROM SELECT customer.c_custkey, customer.c_name, - SUM( tmp ) AS revenue, + lineitem.l_extendedprice *( + 1 - lineitem.l_discount + ) AS tmp, customer.c_acctbal, nation.n_name, customer.c_address, customer.c_phone, customer.c_comment FROM - ( - SELECT - customer.c_custkey, - customer.c_name, - lineitem.l_extendedprice *( - 1 - lineitem.l_discount - ) AS tmp, - customer.c_acctbal, - nation.n_name, - customer.c_address, - customer.c_phone, - customer.c_comment - FROM - customer - JOIN orders ON - customer.c_custkey = orders.o_custkey - JOIN lineitem ON - lineitem.l_orderkey = orders.o_orderkey - JOIN nation ON - customer.c_nationkey = nation.n_nationkey - WHERE - orders.o_orderdate >= 749404800000 - AND orders.o_orderdate < 757353600000 - AND lineitem.l_returnflag = 'R' - ) - GROUP BY - customer.c_custkey, - customer.c_name, - customer.c_acctbal, - customer.c_phone, - nation.n_name, - customer.c_address, - customer.c_comment + customer + JOIN orders ON + customer.c_custkey = orders.o_custkey + JOIN lineitem ON + lineitem.l_orderkey = orders.o_orderkey + JOIN nation ON + customer.c_nationkey = nation.n_nationkey + WHERE + orders.o_orderdate >= 749404800000 + AND orders.o_orderdate < 757353600000 + AND lineitem.l_returnflag = 'R' ) +GROUP BY + customer.c_custkey, + customer.c_name, + customer.c_acctbal, + customer.c_phone, + nation.n_name, + customer.c_address, + customer.c_comment ORDER BY - revenue DESC LIMIT 20; \ No newline at end of file + revenue DESC LIMIT 20; diff --git a/test/src/test/resources/tpch/queries/q11.sql b/test/src/test/resources/tpch/queries/q11.sql new file mode 100644 index 0000000000..9913c7eb44 --- /dev/null +++ b/test/src/test/resources/tpch/queries/q11.sql @@ -0,0 +1,28 @@ +SELECT + partsupp.ps_partkey, + SUM( partsupp.ps_supplycost * partsupp.ps_availqty ) AS val +FROM + partsupp +JOIN supplier ON + partsupp.ps_suppkey = supplier.s_suppkey +JOIN nation ON + supplier.s_nationkey = nation.n_nationkey +WHERE + nation.n_name = 'GERMANY' +GROUP BY + partsupp.ps_partkey +HAVING + SUM( partsupp.ps_supplycost * partsupp.ps_availqty )>( + SELECT + SUM( partsupp.ps_supplycost * partsupp.ps_availqty )* 0.0001000000 + FROM + partsupp + JOIN supplier ON + partsupp.ps_suppkey = supplier.s_suppkey + JOIN nation ON + supplier.s_nationkey = nation.n_nationkey + WHERE + nation.n_name = 'GERMANY' + ) +ORDER BY + val DESC; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q12.sql b/test/src/test/resources/tpch/queries/q12.sql new file mode 100644 index 0000000000..53f708c55c --- /dev/null +++ b/test/src/test/resources/tpch/queries/q12.sql @@ -0,0 +1,21 @@ +SELECT + lineitem.l_shipmode, + SUM( CASE WHEN orders.o_orderpriority = '1-URGENT' OR orders.o_orderpriority = '2-HIGH' THEN 1 ELSE 0 END ) AS high_line_count, + SUM( CASE WHEN orders.o_orderpriority <> '1-URGENT' AND orders.o_orderpriority <> '2-HIGH' THEN 1 ELSE 0 END ) AS low_line_count +FROM + orders +JOIN lineitem ON + orders.o_orderkey = lineitem.l_orderkey +WHERE + ( + lineitem.l_shipmode = 'MAIL' + OR lineitem.l_shipmode = 'SHIP' + ) + AND lineitem.l_commitdate < lineitem.l_receiptdate + AND lineitem.l_shipdate < lineitem.l_commitdate + AND lineitem.l_receiptdate >= 757353600000 + AND lineitem.l_receiptdate < 788889600000 +GROUP BY + lineitem.l_shipmode +ORDER BY + lineitem.l_shipmode; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q13.sql b/test/src/test/resources/tpch/queries/q13.sql index 106e25268a..61badc1370 100644 --- a/test/src/test/resources/tpch/queries/q13.sql +++ b/test/src/test/resources/tpch/queries/q13.sql @@ -16,6 +16,6 @@ FROM ) GROUP BY c_count -ORDER BY -- spotless:off - `count(c_custkey)` DESC, -- spotless:on +ORDER BY + custdist DESC, c_count DESC; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q14.sql b/test/src/test/resources/tpch/queries/q14.sql new file mode 100644 index 0000000000..4b79f314a7 --- /dev/null +++ b/test/src/test/resources/tpch/queries/q14.sql @@ -0,0 +1,9 @@ +SELECT + 100.00 * SUM( CASE WHEN part.p_type LIKE 'PROMO.*' THEN lineitem.l_extendedprice *( 1 - lineitem.l_discount ) ELSE 0.0 END )/ SUM( lineitem.l_extendedprice *( 1 - lineitem.l_discount )) AS promo_revenue +FROM + lineitem +JOIN part ON + lineitem.l_partkey = part.p_partkey +WHERE + lineitem.l_shipdate >= 809884800000 + AND lineitem.l_shipdate < 812476800000; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q15.sql b/test/src/test/resources/tpch/queries/q15.sql new file mode 100644 index 0000000000..7d806eaae0 --- /dev/null +++ b/test/src/test/resources/tpch/queries/q15.sql @@ -0,0 +1,30 @@ +WITH revenue AS( + SELECT + l_suppkey AS supplier_no, + SUM( l_extendedprice *( 1 - l_discount )) AS total_revenue + FROM + lineitem + WHERE + l_shipdate >= 820425600000 + AND l_shipdate < 828288000000 + GROUP BY + l_suppkey +) SELECT + supplier.s_suppkey, + supplier.s_name, + supplier.s_address, + supplier.s_phone, + revenue.total_revenue +FROM + supplier, + revenue +WHERE + supplier.s_suppkey = revenue.supplier_no + AND revenue.total_revenue =( + SELECT + MAX( total_revenue ) + FROM + revenue + ) +ORDER BY + supplier.s_suppkey; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q16.sql b/test/src/test/resources/tpch/queries/q16.sql index 200891f29f..25d4157a2d 100644 --- a/test/src/test/resources/tpch/queries/q16.sql +++ b/test/src/test/resources/tpch/queries/q16.sql @@ -1,55 +1,46 @@ SELECT - p_brand, - p_type, - p_size, - supplier_cnt + part.p_brand AS p_brand, + part.p_type AS p_type, + part.p_size AS p_size, + COUNT( DISTINCT partsupp.ps_suppkey ) AS supplier_cnt FROM - ( + partsupp +JOIN part ON + part.p_partkey = partsupp.ps_partkey +WHERE + part.p_brand <> 'Brand#45' + AND part.p_partkey NOT IN( SELECT - part.p_brand AS p_brand, - part.p_type AS p_type, - part.p_size AS p_size, - COUNT( DISTINCT partsupp.ps_suppkey ) AS supplier_cnt + p_partkey FROM - partsupp - JOIN part ON - part.p_partkey = partsupp.ps_partkey + part AS p WHERE - part.p_brand <> 'Brand#45' - AND part.p_partkey NOT IN( - SELECT - p_partkey - FROM - part - WHERE - part.p_type LIKE '.*MEDIUM POLISHED.*' - ) - AND( - part.p_size = 3 - OR part.p_size = 9 - OR part.p_size = 14 - OR part.p_size = 19 - OR part.p_size = 23 - OR part.p_size = 36 - OR part.p_size = 45 - OR part.p_size = 49 - ) - AND partsupp.ps_suppkey NOT IN( - SELECT - s_suppkey - FROM - supplier - WHERE - supplier.s_comment LIKE '.*Customer.*Complaints.*' - ) - GROUP BY - part.p_brand, - part.p_type, - part.p_size - ORDER BY - part.p_brand, - part.p_type, - part.p_size + p.p_type LIKE '.*MEDIUM POLISHED.*' + ) + AND( + part.p_size = 3 + OR part.p_size = 9 + OR part.p_size = 14 + OR part.p_size = 19 + OR part.p_size = 23 + OR part.p_size = 36 + OR part.p_size = 45 + OR part.p_size = 49 ) + AND partsupp.ps_suppkey NOT IN( + SELECT + s_suppkey + FROM + supplier + WHERE + supplier.s_comment LIKE '.*Customer.*Complaints.*' + ) +GROUP BY + p_brand, + p_type, + p_size ORDER BY - supplier_cnt DESC; \ No newline at end of file + supplier_cnt DESC, + p_brand, + p_type, + p_size; diff --git a/test/src/test/resources/tpch/queries/q18.sql b/test/src/test/resources/tpch/queries/q18.sql index 85be2e6463..a2cc449923 100644 --- a/test/src/test/resources/tpch/queries/q18.sql +++ b/test/src/test/resources/tpch/queries/q18.sql @@ -24,9 +24,8 @@ WHERE lineitem GROUP BY l_orderkey - HAVING -- spotless:off - sum(lineitem.l_quantity)> 300 -- spotless:on - + HAVING + SUM( l_quantity )> 300 ) ) GROUP BY diff --git a/test/src/test/resources/tpch/queries/q19.sql b/test/src/test/resources/tpch/queries/q19.sql index b1170567c7..546cc013f1 100644 --- a/test/src/test/resources/tpch/queries/q19.sql +++ b/test/src/test/resources/tpch/queries/q19.sql @@ -1,68 +1,61 @@ SELECT - SUM( tmp ) AS revenue + SUM( lineitem.l_extendedprice *( 1 - lineitem.l_discount )) AS revenue FROM + lineitem +JOIN part ON + part.p_partkey = lineitem.l_partkey +WHERE ( - SELECT - lineitem.l_extendedprice *( - 1 - lineitem.l_discount - ) AS tmp - FROM - lineitem - JOIN part ON - part.p_partkey = lineitem.l_partkey - WHERE - ( - part.p_brand = 'Brand#12' - AND( - part.p_container = 'SM CASE' - OR part.p_container = 'SM BOX' - OR part.p_container = 'SM PACK' - OR part.p_container = 'SM PKG' - ) - AND lineitem.l_quantity >= 1 - AND lineitem.l_quantity <= 11 - AND part.p_size >= 1 - AND part.p_size <= 5 - AND( - lineitem.l_shipmode = 'AIR' - OR lineitem.l_shipmode = 'AIR REG' - ) - AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' - ) - OR( - part.p_brand = 'Brand#23' - AND( - part.p_container = 'MED PKG' - OR part.p_container = 'MED BOX' - OR part.p_container = 'MED BAG' - OR part.p_container = 'MED PACK' - ) - AND lineitem.l_quantity >= 10 - AND lineitem.l_quantity <= 20 - AND part.p_size >= 1 - AND part.p_size <= 10 - AND( - lineitem.l_shipmode = 'AIR' - OR lineitem.l_shipmode = 'AIR REG' - ) - AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' - ) - OR( - part.p_brand = 'Brand#34' - AND( - part.p_container = 'LG PACK' - OR part.p_container = 'LG BOX' - OR part.p_container = 'LG CASE' - OR part.p_container = 'LG PKG' - ) - AND lineitem.l_quantity >= 20 - AND lineitem.l_quantity <= 30 - AND part.p_size >= 1 - AND part.p_size <= 15 - AND( - lineitem.l_shipmode = 'AIR' - OR lineitem.l_shipmode = 'AIR REG' - ) - AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' - ) + part.p_brand = 'Brand#12' + AND( + part.p_container = 'SM CASE' + OR part.p_container = 'SM BOX' + OR part.p_container = 'SM PACK' + OR part.p_container = 'SM PKG' + ) + AND lineitem.l_quantity >= 1 + AND lineitem.l_quantity <= 11 + AND part.p_size >= 1 + AND part.p_size <= 5 + AND( + lineitem.l_shipmode = 'AIR' + OR lineitem.l_shipmode = 'AIR REG' + ) + AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' + ) + OR( + part.p_brand = 'Brand#23' + AND( + part.p_container = 'MED PKG' + OR part.p_container = 'MED BOX' + OR part.p_container = 'MED BAG' + OR part.p_container = 'MED PACK' + ) + AND lineitem.l_quantity >= 10 + AND lineitem.l_quantity <= 20 + AND part.p_size >= 1 + AND part.p_size <= 10 + AND( + lineitem.l_shipmode = 'AIR' + OR lineitem.l_shipmode = 'AIR REG' + ) + AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' + ) + OR( + part.p_brand = 'Brand#34' + AND( + part.p_container = 'LG PACK' + OR part.p_container = 'LG BOX' + OR part.p_container = 'LG CASE' + OR part.p_container = 'LG PKG' + ) + AND lineitem.l_quantity >= 20 + AND lineitem.l_quantity <= 30 + AND part.p_size >= 1 + AND part.p_size <= 15 + AND( + lineitem.l_shipmode = 'AIR' + OR lineitem.l_shipmode = 'AIR REG' + ) + AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' ); \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q19_a.sql b/test/src/test/resources/tpch/queries/q19_a.sql new file mode 100644 index 0000000000..24fea28142 --- /dev/null +++ b/test/src/test/resources/tpch/queries/q19_a.sql @@ -0,0 +1,74 @@ +SELECT + SUM( revenue ) AS revenue +FROM + ( + SELECT + SUM( lineitem.l_extendedprice *( 1 - lineitem.l_discount )) AS revenue + FROM + lineitem + JOIN part ON + part.p_partkey = lineitem.l_partkey + WHERE + part.p_brand = 'Brand#12' + AND( + part.p_container = 'SM CASE' + OR part.p_container = 'SM BOX' + OR part.p_container = 'SM PACK' + OR part.p_container = 'SM PKG' + ) + AND lineitem.l_quantity >= 1 + AND lineitem.l_quantity <= 11 + AND part.p_size >= 1 + AND part.p_size <= 5 + AND( + lineitem.l_shipmode = 'AIR' + OR lineitem.l_shipmode = 'AIR REG' + ) + AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' + UNION SELECT + SUM( lineitem.l_extendedprice *( 1 - lineitem.l_discount )) AS revenue + FROM + lineitem + JOIN part ON + part.p_partkey = lineitem.l_partkey + WHERE + part.p_brand = 'Brand#23' + AND( + part.p_container = 'MED PKG' + OR part.p_container = 'MED BOX' + OR part.p_container = 'MED BAG' + OR part.p_container = 'MED PACK' + ) + AND lineitem.l_quantity >= 10 + AND lineitem.l_quantity <= 20 + AND part.p_size >= 1 + AND part.p_size <= 10 + AND( + lineitem.l_shipmode = 'AIR' + OR lineitem.l_shipmode = 'AIR REG' + ) + AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' + UNION SELECT + SUM( lineitem.l_extendedprice *( 1 - lineitem.l_discount )) AS revenue + FROM + lineitem + JOIN part ON + part.p_partkey = lineitem.l_partkey + WHERE + part.p_brand = 'Brand#34' + AND( + part.p_container = 'LG PACK' + OR part.p_container = 'LG BOX' + OR part.p_container = 'LG CASE' + OR part.p_container = 'LG PKG' + ) + AND lineitem.l_quantity >= 20 + AND lineitem.l_quantity <= 30 + AND part.p_size >= 1 + AND part.p_size <= 15 + AND( + lineitem.l_shipmode = 'AIR' + OR lineitem.l_shipmode = 'AIR REG' + ) + AND lineitem.l_shipinstruct = 'DELIVER IN PERSON' + ); \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q2.sql b/test/src/test/resources/tpch/queries/q2.sql index 620bc41c52..7ea45b66ad 100644 --- a/test/src/test/resources/tpch/queries/q2.sql +++ b/test/src/test/resources/tpch/queries/q2.sql @@ -28,46 +28,33 @@ INSERT ); SELECT - s_acctbal, - s_name, - n_name, - p_partkey, - p_mfgr, - s_address, - s_phone, - s_comment + supplier.s_acctbal AS s_acctbal, + supplier.s_name AS s_name, + nation.n_name AS n_name, + part.p_partkey AS p_partkey, + part.p_mfgr AS p_mfgr, + supplier.s_address AS s_address, + supplier.s_phone AS s_phone, + supplier.s_comment AS s_comment FROM - ( - SELECT - supplier.s_acctbal AS s_acctbal, - supplier.s_name AS s_name, - nation.n_name AS n_name, - part.p_partkey AS p_partkey, - part.p_mfgr AS p_mfgr, - supplier.s_address AS s_address, - supplier.s_phone AS s_phone, - supplier.s_comment AS s_comment - FROM - part - JOIN partsupp ON - part.p_partkey = partsupp.ps_partkey - JOIN supplier ON - supplier.s_suppkey = partsupp.ps_suppkey - JOIN nation ON - supplier.s_nationkey = nation.n_nationkey - JOIN region ON - nation.n_regionkey = region.r_regionkey - JOIN tmpTable ON - tmpTable.p_key = part.p_partkey - AND partsupp.ps_supplycost = tmpTable.minCost - WHERE - part.p_size = 15 - AND region.r_name = 'EUROPE' - AND part.p_type LIKE "^.*BRASS" - ORDER BY - nation.n_name, - supplier.s_name, - part.p_partkey - ) + part +JOIN partsupp ON + part.p_partkey = partsupp.ps_partkey +JOIN supplier ON + supplier.s_suppkey = partsupp.ps_suppkey +JOIN nation ON + supplier.s_nationkey = nation.n_nationkey +JOIN region ON + nation.n_regionkey = region.r_regionkey +JOIN tmpTable ON + tmpTable.p_key = part.p_partkey + AND partsupp.ps_supplycost = tmpTable.minCost +WHERE + part.p_size = 15 + AND region.r_name = 'EUROPE' + AND part.p_type LIKE "^.*BRASS" ORDER BY - s_acctbal DESC LIMIT 100; \ No newline at end of file + s_acctbal DESC, + n_name, + s_name, + p_partkey LIMIT 100; diff --git a/test/src/test/resources/tpch/queries/q21.sql b/test/src/test/resources/tpch/queries/q21.sql index 1a9bbd70fc..c1ad1ae570 100644 --- a/test/src/test/resources/tpch/queries/q21.sql +++ b/test/src/test/resources/tpch/queries/q21.sql @@ -34,6 +34,6 @@ WHERE AND nation.n_name = 'SAUDI ARABIA' GROUP BY supplier.s_name -ORDER BY -- spotless:off - `count(supplier.s_name)` DESC, -- spotless:on +ORDER BY + numwait DESC, supplier.s_name LIMIT 100; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q22.sql b/test/src/test/resources/tpch/queries/q22.sql new file mode 100644 index 0000000000..faa8d31526 --- /dev/null +++ b/test/src/test/resources/tpch/queries/q22.sql @@ -0,0 +1,51 @@ +SELECT + cntrycode, + COUNT( c1.c_acctbal ) AS numcust, + SUM( c1.c_acctbal ) AS totacctbal +FROM + ( + SELECT + SUBSTRING( c_phone, 1, 2 ) AS cntrycode, + c_acctbal + FROM + customer AS c1 + WHERE + ( + SUBSTRING( c1.c_phone, 1, 2 )= '13' + OR SUBSTRING( c1.c_phone, 1, 2 )= '31' + OR SUBSTRING( c1.c_phone, 1, 2 )= '23' + OR SUBSTRING( c1.c_phone, 1, 2 )= '29' + OR SUBSTRING( c1.c_phone, 1, 2 )= '30' + OR SUBSTRING( c1.c_phone, 1, 2 )= '18' + OR SUBSTRING( c1.c_phone, 1, 2 )= '17' + ) + AND c1.c_acctbal >( + SELECT + AVG( c_acctbal ) + FROM + customer AS c2 + WHERE + c2.c_acctbal > 0.00 + AND( + SUBSTRING( c2.c_phone, 1, 2 )= '13' + OR SUBSTRING( c2.c_phone, 1, 2 )= '31' + OR SUBSTRING( c2.c_phone, 1, 2 )= '23' + OR SUBSTRING( c2.c_phone, 1, 2 )= '29' + OR SUBSTRING( c2.c_phone, 1, 2 )= '30' + OR SUBSTRING( c2.c_phone, 1, 2 )= '18' + OR SUBSTRING( c2.c_phone, 1, 2 )= '17' + ) + ) + AND NOT EXISTS( + SELECT + o_custkey + FROM + orders + WHERE + orders.o_custkey = c1.c_custkey + ) + ) +GROUP BY + cntrycode +ORDER BY + cntrycode; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q3.sql b/test/src/test/resources/tpch/queries/q3.sql index 5b8e13ebff..e366c4eedd 100644 --- a/test/src/test/resources/tpch/queries/q3.sql +++ b/test/src/test/resources/tpch/queries/q3.sql @@ -1,39 +1,31 @@ SELECT l_orderkey, - revenue, + SUM( tmp ) AS revenue, o_orderdate, o_shippriority FROM ( SELECT - l_orderkey, - o_orderdate, - o_shippriority, - SUM( tmp ) AS revenue + lineitem.l_extendedprice *( + 1 - lineitem.l_discount + ) AS tmp, + lineitem.l_orderkey AS l_orderkey, + orders.o_orderdate AS o_orderdate, + orders.o_shippriority AS o_shippriority FROM - ( - SELECT - lineitem.l_extendedprice *( - 1 - lineitem.l_discount - ) AS tmp, - lineitem.l_orderkey AS l_orderkey, - orders.o_orderdate AS o_orderdate, - orders.o_shippriority AS o_shippriority - FROM - customer - JOIN orders ON - customer.c_custkey = orders.o_custkey - JOIN lineitem ON - lineitem.l_orderkey = orders.o_orderkey - WHERE - customer.c_mktsegment = 'BUILDING' - AND orders.o_orderdate < 795196800000 - AND lineitem.l_shipdate > 795225600000 - ) - GROUP BY - l_orderkey, - o_orderdate, - o_shippriority + customer + JOIN orders ON + customer.c_custkey = orders.o_custkey + JOIN lineitem ON + lineitem.l_orderkey = orders.o_orderkey + WHERE + customer.c_mktsegment = 'BUILDING' + AND orders.o_orderdate < 795196800000 + AND lineitem.l_shipdate > 795225600000 ) +GROUP BY + l_orderkey, + o_orderdate, + o_shippriority ORDER BY - revenue DESC LIMIT 10; \ No newline at end of file + revenue DESC LIMIT 10; diff --git a/test/src/test/resources/tpch/queries/q5.sql b/test/src/test/resources/tpch/queries/q5.sql index 6f123c6367..e188a7dcbb 100644 --- a/test/src/test/resources/tpch/queries/q5.sql +++ b/test/src/test/resources/tpch/queries/q5.sql @@ -1,38 +1,32 @@ SELECT nation.n_name, - revenue + SUM( tmp ) AS revenue FROM ( SELECT nation.n_name, - SUM( tmp ) AS revenue + lineitem.l_extendedprice *( + 1 - lineitem.l_discount + ) AS tmp FROM - ( - SELECT - nation.n_name, - lineitem.l_extendedprice *( - 1 - lineitem.l_discount - ) AS tmp - FROM - customer - JOIN orders ON - customer.c_custkey = orders.o_custkey - JOIN lineitem ON - lineitem.l_orderkey = orders.o_orderkey - JOIN supplier ON - lineitem.l_suppkey = supplier.s_suppkey - AND customer.c_nationkey = supplier.s_nationkey - JOIN nation ON - supplier.s_nationkey = nation.n_nationkey - JOIN region ON - nation.n_regionkey = region.r_regionkey - WHERE - region.r_name = "ASIA" - AND orders.o_orderdate >= 757353600000 - AND orders.o_orderdate < 788889600000 - ) - GROUP BY - nation.n_name + customer + JOIN orders ON + customer.c_custkey = orders.o_custkey + JOIN lineitem ON + lineitem.l_orderkey = orders.o_orderkey + JOIN supplier ON + lineitem.l_suppkey = supplier.s_suppkey + AND customer.c_nationkey = supplier.s_nationkey + JOIN nation ON + supplier.s_nationkey = nation.n_nationkey + JOIN region ON + nation.n_regionkey = region.r_regionkey + WHERE + region.r_name = "ASIA" + AND orders.o_orderdate >= 757353600000 + AND orders.o_orderdate < 788889600000 ) +GROUP BY + nation.n_name ORDER BY - revenue DESC; \ No newline at end of file + revenue DESC; diff --git a/test/src/test/resources/tpch/queries/q7.sql b/test/src/test/resources/tpch/queries/q7.sql new file mode 100644 index 0000000000..fb8ab1de49 --- /dev/null +++ b/test/src/test/resources/tpch/queries/q7.sql @@ -0,0 +1,48 @@ +SELECT + supp_nation, + cust_nation, + l_year, + SUM( volume ) AS revenue +FROM + ( + SELECT + n1.n_name AS supp_nation, + n2.n_name AS cust_nation, + extractYear(lineitem.l_shipdate) AS l_year, + lineitem.l_extendedprice *( + 1 - lineitem.l_discount + ) AS volume + FROM + supplier + JOIN lineitem ON + supplier.s_suppkey = lineitem.l_suppkey + JOIN orders ON + orders.o_orderkey = lineitem.l_orderkey + JOIN customer ON + customer.c_custkey = orders.o_custkey + JOIN nation n1 ON + supplier.s_nationkey = n1.n_nationkey + JOIN nation n2 ON + customer.c_nationkey = n2.n_nationkey + WHERE + lineitem.l_shipdate >= 788918400000 + AND lineitem.l_shipdate <= 851961600000 + AND( + ( + n1.n_name = 'FRANCE' + AND n2.n_name = 'GERMANY' + ) + OR( + n1.n_name = 'GERMANY' + AND n2.n_name = 'FRANCE' + ) + ) + ) +GROUP BY + supp_nation, + cust_nation, + l_year +ORDER BY + supp_nation, + cust_nation, + l_year; \ No newline at end of file diff --git a/test/src/test/resources/tpch/queries/q8.sql b/test/src/test/resources/tpch/queries/q8.sql new file mode 100644 index 0000000000..83c9038f9c --- /dev/null +++ b/test/src/test/resources/tpch/queries/q8.sql @@ -0,0 +1,37 @@ +SELECT + o_year, + SUM( CASE WHEN nation = 'BRAZIL' THEN volume ELSE 0.0 END )/ SUM( volume ) AS mkt_share +FROM + ( + SELECT + extractYear(orders.o_orderdate) AS o_year, + lineitem.l_extendedprice *( + 1 - lineitem.l_discount + ) AS volume, + n2.n_name AS nation + FROM + part + JOIN lineitem ON + part.p_partkey = lineitem.l_partkey + JOIN supplier ON + supplier.s_suppkey = lineitem.l_suppkey + JOIN orders ON + lineitem.l_orderkey = orders.o_orderkey + JOIN customer ON + orders.o_custkey = customer.c_custkey + JOIN nation n1 ON + customer.c_nationkey = n1.n_nationkey + JOIN nation n2 ON + supplier.s_nationkey = n2.n_nationkey + JOIN region ON + n1.n_regionkey = region.r_regionkey + WHERE + region.r_name = 'AMERICA' + AND orders.o_orderdate >= 788889600000 + AND orders.o_orderdate <= 851961600000 + AND part.p_type = 'ECONOMY ANODIZED STEEL' + ) +GROUP BY + o_year +ORDER BY + o_year; \ No newline at end of file diff --git a/test/src/test/resources/tpch/sf0.1/q10.csv b/test/src/test/resources/tpch/sf0.1/q10.csv index 79f006ddb9..0839ba28a4 100644 --- a/test/src/test/resources/tpch/sf0.1/q10.csv +++ b/test/src/test/resources/tpch/sf0.1/q10.csv @@ -1,21 +1,21 @@ c_custkey|c_name|revenue|c_acctbal|n_name|c_address|c_phone|c_comment -8242|Customer#000008242|622786.7297|6322.09|ETHIOPIA|cYDWDiJt06B8CYzXX2L8x2hn1VFG|15-792-676-1184| regular theodolites affix. carefully ironic packages cajole deposits; slyly ironic packages wake quickly. regular, -7714|Customer#000007714|557400.3053|9799.98|IRAN|9DDikq08GEE4B3X|20-922-418-6024|even accounts should cajole. regular, regular -11032|Customer#000011032|512500.9641|8496.93|UNITED KINGDOM|5igjoUgXoDUZVUIectL5lXO1T3AGKza0ft|33-102-772-3533|uests. ironic accounts after the fluffily fi -2455|Customer#000002455|481592.4053|2070.99|GERMANY|a5DZ199yfAcFhfi2uwBE PKo,Z|17-946-225-9977|pinto beans alongside of the furiously ironic asymptotes are quickly even platelets: express -12106|Customer#000012106|479414.2133|5342.11|UNITED STATES|wyJXywcExUxt|34-905-346-4472|blithely blithely final attainments? carefully special pinto beans around the quickly even asymptote -8530|Customer#000008530|457855.9467|9734.95|MOROCCO|leatyNRWCnfTMnTNuDGHsWJjRuAX|25-736-932-5850| the carefully pending packages. carefully -13984|Customer#000013984|446316.5104|3482.28|IRAN|B13vxRBojwvP3|20-981-264-2952|egular, ironic accounts integrate sly -1966|Customer#000001966|444059.0382|1937.72|ALGERIA|IbwZr7j QVifqf9WizOIWx,UXV9CqxUyrwj|10-973-269-8886|odolites across the unusual accounts hang carefully furiously bold excuses. regular pi -11026|Customer#000011026|417913.4142|7738.76|ALGERIA|4C iGzChcqnhGBdeeu|10-184-163-4632|eposits cajole according to the furiously bold instructions. regular, regular dependencies wake carefully eve -8501|Customer#000008501|412797.5100|6906.70|ARGENTINA|UTUQLX cQrF1UUJPsz|11-317-552-5840| packages. pending Tiresias after the regularly express forges haggle fina -1565|Customer#000001565|412506.0062|1820.03|BRAZIL|n4acVpG0Deyj5aIFAfSNg Iu9cUagwN3OsRbKC 4|12-402-178-2007|deposits; unusual, bold deposits around the f -14398|Customer#000014398|408575.3600|-602.24|UNITED STATES|l49oKjbjQHz6YZwjo5wPihM lyYO6G|34-814-111-5424|es haggle fluffily blithely fluffy requests; slyly express req -1465|Customer#000001465|405055.3457|9365.93|INDIA|zn9Q7pT6KlQp3T5mUO533aq,|18-807-487-1074|ress ideas cajole. slyly unusual theodolites cajole thin foxes. account -12595|Customer#000012595|401402.2391|-6.92|INDIA|gEMQ3WO90vSdAgxLFrt9FRS|18-186-132-3352| slyly dogged excuses. blithely blithe packages cajole -961|Customer#000000961|401198.1737|6963.68|JAPAN|W0SZ2oflx9aWTggtwSk3OEIXsubXTbGbD|22-989-463-6089|use furiously across the final deposits. quickly -14299|Customer#000014299|400968.3751|6595.97|RUSSIA|UFlOs8tQ,IfZPJm57|32-156-618-1224|slyly. ironic, bold deposits sleep blithely ironic, pending attainm -623|Customer#000000623|399883.4257|7887.60|INDONESIA|k3IlPSC4FKB13 hc6omhVs1ibvqeWEV|19-113-202-7085|se around the ideas. accounts cajole blithely slyly ironic requests. b -9151|Customer#000009151|396562.0295|5691.95|IRAQ|UKiN9OQupR,m5NtvSntbI8JBeo|21-834-147-4906|the deposits. pending, ironic foxes haggle along the regular, bold req -14819|Customer#000014819|396271.1036|7308.39|FRANCE|wS8yiQtE63FfoO6RKUzuVf6iBTmXBq16u|16-769-398-7926|ending asymptotes use fluffily quickly bold instructions. slyly bold dependencies sleep carefully pending a -13478|Customer#000013478|395513.1358|-778.11|KENYA|S5izwjM1 hCoUccO2JMepYwNyBSqI,ay|24-983-202-8240| requests boost quickly according to the express sheaves. blithely unusual packages sleep +8242|Customer#000008242|622786.7297|6322.09|ETHIOPIA|P2n4nJhy,UqSo2s43YfSvYJDZ6lk|15-792-676-1184|slyly regular packages haggle carefully ironic ideas. courts are furiously. furiously unusual theodolites cajole. i +7714|Customer#000007714|557400.3053|9799.98|IRAN|SnnIGB,SkmnWpX3|20-922-418-6024|arhorses according to the blithely express re +11032|Customer#000011032|512500.9641|8496.93|UNITED KINGDOM|WIKHC7K3Cn7156iNOyfVG3cZ7YqkgsR,Ly|33-102-772-3533|posits-- furiously ironic accounts are again +2455|Customer#000002455|481592.4053|2070.99|GERMANY|RVn1ZSRtLqPlJLIZxvpmsbgC02|17-946-225-9977|al asymptotes. finally ironic accounts cajole furiously. permanently unusual theodolites aro +12106|Customer#000012106|479414.2133|5342.11|UNITED STATES|wth3twOmu6vy|34-905-346-4472|ly after the blithely regular foxes. accounts haggle carefully alongside of the blithely even ideas. +8530|Customer#000008530|457855.9467|9734.95|MOROCCO|GMQyte94oDM7eD7exnkj 4hH9yq3|25-736-932-5850|slyly asymptotes. quickly final deposits in +13984|Customer#000013984|446316.5104|3482.28|IRAN|qZXwuapCHvxbX|20-981-264-2952|y unusual courts could wake furiously +1966|Customer#000001966|444059.0382|1937.72|ALGERIA|jPv1 UHra5JLALR5Isci5u0636RoAu7t vH|10-973-269-8886|the blithely even accounts. final deposits cajole around the blithely final packages. +11026|Customer#000011026|417913.4142|7738.76|ALGERIA|XorIktoJOAEJkpNNMx|10-184-163-4632|ly even dolphins eat along the blithely even instructions. express attainments cajole slyly. busy dolphins in +8501|Customer#000008501|412797.5100|6906.70|ARGENTINA|776af4rOa mZ66hczs|11-317-552-5840|y final deposits after the fluffily even accounts are slyly final, regular +1565|Customer#000001565|412506.0062|1820.03|BRAZIL|EWQO5Ck,nMuHVQimqL8dLrixRP6QKveXcz9QgorW|12-402-178-2007|ously regular accounts wake slyly ironic idea +14398|Customer#000014398|408575.3600|-602.24|UNITED STATES|GWRCgIPHajtU21vICVvbJJerFu2cUk|34-814-111-5424|s. blithely even accounts cajole blithely. even foxes doubt-- +1465|Customer#000001465|405055.3457|9365.93|INDIA|tDRaTC7UgFbBX7VF6cVXYQA0|18-807-487-1074|s lose blithely ironic, regular packages. regular, final foxes haggle c +12595|Customer#000012595|401402.2391|-6.92|INDIA|LmeaX5cR,w9NqKugl yRm98|18-186-132-3352|o the busy accounts. blithely special gifts maintain a +961|Customer#000000961|401198.1737|6963.68|JAPAN|5,81YDLFuRR47KKzv8GXdmi3zyP37PlPn|22-989-463-6089|e final requests: busily final accounts believe a +14299|Customer#000014299|400968.3751|6595.97|RUSSIA|7lFczTya0iM1bhEWT|32-156-618-1224|carefully regular requests. quickly ironic accounts against the ru +623|Customer#000000623|399883.4257|7887.60|INDONESIA|HXiFb9oWlgqZXrJPUCEJ6zZIPxAM4m6|19-113-202-7085|requests. dolphins above the busily regular dependencies cajole after +9151|Customer#000009151|396562.0295|5691.95|IRAQ|7gIdRdaxB91EVdyx8DyPjShpMD|21-834-147-4906|ajole fluffily. furiously regular accounts are special, silent account +14819|Customer#000014819|396271.1036|7308.39|FRANCE|w8StIbymUXmLCcUag6sx6LUIp8E3pA,Ux|16-769-398-7926|ss, final asymptotes use furiously slyly ironic dependencies. special, express dugouts according to the dep +13478|Customer#000013478|395513.1358|-778.11|KENYA|9VIsvIeZrJpC6OOdYheMC2vdtq8Ai0Rt|24-983-202-8240|r theodolites. slyly unusual pinto beans sleep fluffily against the asymptotes. quickly r diff --git a/test/src/test/resources/tpch/sf0.1/q11.csv b/test/src/test/resources/tpch/sf0.1/q11.csv new file mode 100644 index 0000000000..ce11bed399 --- /dev/null +++ b/test/src/test/resources/tpch/sf0.1/q11.csv @@ -0,0 +1,2542 @@ +ps_partkey|value +12098|16227681.21 +5134|15709338.52 +13334|15023662.41 +17052|14351644.20 +3452|14070870.14 +12552|13332469.18 +1084|13170428.29 +5797|13038622.72 +12633|12892561.61 +403|12856217.34 +1833|12024581.72 +2084|11502875.36 +17349|11354213.05 +18427|11282385.24 +2860|11262529.95 +17852|10934711.93 +9871|10889253.68 +12231|10841131.39 +6366|10759786.81 +12146|10257362.66 +5043|10226395.88 +12969|10125777.93 +1504|10004397.08 +14327|9981697.08 +134|9965150.66 +6860|9805871.26 +10624|9776138.40 +15819|9775705.31 +3293|9674928.12 +19865|9653766.83 +8870|9648981.87 +15778|9636332.82 +12360|9635023.92 +14389|9475588.34 +3257|9451029.24 +9476|9435207.28 +19629|9391236.40 +7179|9386222.25 +15723|9383900.80 +4054|9313810.02 +2380|9307751.22 +19084|9302916.80 +4703|9280804.80 +18791|9267017.97 +19994|9235972.92 +9149|9121803.90 +15118|9120819.50 +6116|9079369.20 +7052|9077468.92 +14147|9069193.78 +7305|9035228.53 +9130|9024379.25 +16698|8991337.95 +1553|8977226.10 +16777|8961355.62 +1402|8953779.12 +18963|8934063.40 +8358|8930611.48 +17547|8860117.00 +5128|8844222.75 +17063|8840649.60 +15490|8833581.40 +14761|8817240.56 +19601|8791341.02 +16160|8740262.76 +13597|8702669.82 +13653|8693170.16 +16383|8691505.92 +325|8667741.28 +8879|8667584.38 +10564|8667098.22 +17429|8661827.90 +17403|8643350.30 +18294|8616583.43 +4181|8592684.66 +13008|8567480.64 +13211|8537000.01 +1884|8532644.34 +11101|8530945.32 +11562|8528028.57 +15878|8523591.84 +834|8522135.27 +2423|8517902.85 +15383|8513433.11 +18119|8507611.80 +7389|8506099.20 +5016|8489784.15 +17473|8444766.24 +6669|8428618.46 +384|8418472.27 +12052|8411519.28 +17562|8409022.83 +8128|8379149.47 +13813|8374830.84 +12800|8318626.78 +10887|8315019.36 +1644|8285453.08 +16638|8274568.00 +1394|8255140.60 +7219|8254985.30 +13358|8253829.80 +5562|8252365.16 +14861|8242296.15 +15416|8196621.53 +1963|8192206.61 +2841|8148678.45 +6635|8122918.28 +3609|8099812.05 +6372|8093695.06 +5231|8091704.18 +8755|8085017.03 +4071|8083755.18 +4977|8058501.72 +11873|8057540.30 +12127|8051142.94 +2401|8049525.94 +15964|8037547.75 +10129|8030855.04 +7605|8028622.42 +9327|8022291.30 +11814|7983589.59 +4646|7981660.60 +6032|7981511.28 +1076|7977074.75 +4043|7971929.90 +8932|7967222.19 +13705|7953344.52 +16855|7923819.00 +3234|7920022.00 +17752|7901362.77 +2097|7892993.17 +18599|7890774.40 +19596|7874564.59 +11392|7861172.48 +18121|7857581.60 +17452|7838465.36 +6076|7821316.80 +15134|7804760.25 +8641|7802917.15 +2134|7800185.43 +16352|7797112.00 +19312|7775952.24 +2895|7759327.23 +12860|7758135.21 +153|7755681.28 +15089|7735438.26 +14797|7725353.16 +15946|7722773.88 +10919|7722425.36 +9867|7721597.78 +11881|7713136.42 +16552|7708518.15 +6925|7703999.68 +12147|7703826.98 +8923|7702690.28 +16116|7697970.84 +10661|7673830.20 +17094|7665368.16 +18648|7650862.02 +12172|7641326.40 +15123|7633032.50 +4993|7600570.80 +17162|7592062.56 +13506|7580809.83 +3436|7575616.33 +6271|7559793.93 +13314|7555156.63 +17242|7550949.50 +2753|7549574.06 +7391|7543159.68 +7418|7541449.65 +116|7520874.24 +12436|7520234.54 +1181|7494798.28 +12963|7491248.10 +213|7479470.28 +7114|7477681.20 +18521|7476478.30 +8973|7458603.67 +4202|7454095.74 +12009|7442105.40 +10609|7429346.40 +5622|7424142.66 +5143|7422760.28 +898|7414133.80 +12257|7408190.63 +6740|7400350.35 +1146|7394394.48 +5485|7378181.94 +8437|7376353.59 +6531|7362366.78 +16463|7362106.80 +10412|7359552.42 +12857|7340801.58 +12354|7332343.20 +7616|7320032.37 +3426|7312340.41 +8622|7307266.33 +6818|7304782.10 +3705|7299380.10 +12733|7298398.17 +1574|7293446.04 +10554|7289933.72 +9363|7284647.70 +4611|7282115.00 +7857|7266948.92 +9616|7265005.30 +15860|7254466.66 +15554|7247592.51 +3422|7247586.45 +9134|7236404.67 +17408|7220083.60 +15853|7219984.90 +9266|7218517.11 +1881|7208346.45 +10148|7205335.83 +8860|7202401.44 +8373|7189039.50 +10859|7188990.69 +12670|7188177.22 +2553|7180006.02 +19346|7176797.25 +1681|7160169.84 +15225|7158861.32 +1052|7158586.00 +77|7155531.10 +7231|7155250.38 +12622|7137408.42 +9814|7105363.14 +8695|7103187.00 +13174|7099182.53 +6179|7095134.05 +6451|7082495.36 +19860|7073206.83 +9307|7059973.68 +7819|7055963.04 +10556|7053491.07 +9366|7048690.74 +12124|7040021.31 +11476|7037906.76 +19245|7034045.24 +7562|7030275.79 +12290|7020372.06 +18118|7003396.80 +1253|7001569.62 +8662|6999834.27 +1779|6997385.73 +15386|6996871.79 +147|6989079.88 +9562|6983076.90 +3958|6969833.22 +7211|6966606.67 +12842|6923277.66 +4368|6918783.95 +11131|6918656.78 +4628|6894893.82 +5879|6881367.14 +16586|6865931.80 +32|6852925.59 +12119|6842773.70 +1371|6831137.52 +6136|6827917.01 +13857|6824240.60 +1074|6821747.88 +1863|6821522.19 +14597|6817385.66 +9271|6783068.88 +6389|6781075.68 +11703|6776538.36 +13701|6768880.56 +14880|6763788.24 +18428|6763670.54 +1006|6762065.94 +4927|6756765.21 +11659|6755246.68 +6815|6738928.35 +14367|6733857.20 +10703|6730936.46 +3150|6727920.40 +9963|6725919.35 +10438|6710153.62 +4745|6682153.67 +15297|6681711.28 +10848|6678666.25 +11749|6677895.73 +16739|6675549.12 +14915|6672248.66 +19841|6669191.20 +628|6666892.90 +1650|6657178.32 +7069|6648672.24 +7108|6646445.96 +8887|6641655.90 +18735|6636457.56 +3711|6632665.38 +2325|6630475.92 +6484|6622965.20 +2643|6617304.98 +7895|6615061.26 +12840|6604848.54 +4314|6600905.71 +19077|6591091.97 +17476|6576029.00 +7039|6559838.90 +8106|6558223.02 +2391|6557120.08 +7717|6547706.88 +12476|6546988.15 +9155|6540793.60 +360|6530297.41 +6383|6529336.02 +4830|6518998.92 +12600|6511549.46 +13740|6508057.92 +4678|6507847.98 +17815|6502284.76 +7329|6490811.95 +13884|6490063.10 +5147|6487069.00 +16548|6482024.50 +14144|6476413.40 +10181|6474984.88 +11031|6463308.02 +19958|6461506.38 +6043|6458177.64 +10060|6455476.89 +9144|6454042.05 +7043|6448019.98 +17346|6444307.52 +13963|6442014.48 +7111|6441947.07 +14140|6439955.54 +2327|6438977.28 +14812|6437152.54 +16755|6430895.36 +14840|6430549.14 +14134|6422079.26 +12655|6405496.79 +1518|6390148.22 +9888|6385033.02 +7387|6384005.18 +5393|6381083.04 +11057|6375974.22 +16818|6368828.80 +4576|6364925.71 +19644|6350000.33 +139|6336065.55 +11735|6334305.90 +10108|6332055.99 +15628|6329801.34 +4349|6314949.68 +7048|6313868.55 +17119|6298935.38 +18597|6291416.31 +2488|6286372.05 +2296|6275519.25 +4343|6272834.20 +9958|6267714.61 +2147|6267475.32 +9368|6254578.92 +13134|6252432.76 +10119|6251456.25 +2093|6249342.36 +2392|6237476.56 +17231|6233509.18 +3773|6226654.68 +9839|6214044.10 +19349|6213969.30 +7869|6212751.00 +8158|6210279.24 +13179|6205773.65 +2349|6205589.26 +9052|6200729.70 +1744|6189967.36 +597|6183103.47 +16721|6176606.60 +7498|6176277.25 +15157|6176222.50 +17524|6171107.36 +7922|6170906.07 +6615|6170738.42 +2706|6165991.65 +16432|6162740.68 +16473|6162427.96 +12825|6161595.60 +18813|6154678.55 +1030|6146500.28 +2571|6145772.43 +7707|6144754.71 +10327|6137612.00 +4710|6132346.56 +3649|6130602.63 +4893|6128461.24 +12844|6128191.24 +8794|6122690.28 +1157|6117749.22 +10895|6112017.68 +16166|6108250.98 +11920|6107122.56 +5621|6102123.56 +6141|6093826.56 +14076|6086671.08 +15884|6080485.59 +4814|6080337.96 +5814|6079842.96 +1134|6078685.20 +19048|6071813.28 +303|6070601.35 +15211|6065678.06 +1020|6054168.00 +11292|6052522.83 +7134|6049865.25 +14119|6049619.55 +2389|6042429.12 +5926|6034269.52 +8553|6030922.95 +18814|6023255.17 +12702|6023190.99 +2644|6020931.33 +19628|6010704.00 +18112|6008707.52 +13860|6008170.29 +1456|6005092.14 +1633|6002068.85 +2301|6000302.29 +10740|5999809.05 +2630|5997008.43 +8818|5992296.90 +10043|5990594.02 +653|5987942.83 +6829|5985990.66 +15179|5977727.52 +9663|5973523.92 +5863|5973328.92 +3628|5966340.09 +7618|5960155.86 +2588|5952648.56 +4865|5949383.40 +4233|5944699.60 +13390|5944104.69 +16321|5942714.70 +9653|5941308.50 +18884|5925548.24 +4394|5920927.14 +19774|5916723.12 +1257|5914052.36 +2963|5911917.77 +17157|5899573.02 +383|5884693.36 +11709|5884134.48 +18135|5871431.61 +13169|5869736.88 +2932|5868995.80 +2888|5863229.30 +6820|5853106.80 +18622|5850951.60 +9066|5846052.72 +19840|5832251.40 +6325|5827298.43 +14092|5823711.72 +11532|5823277.12 +18043|5815248.70 +3932|5809134.60 +10364|5808371.40 +1179|5808303.24 +11441|5799378.33 +15767|5798263.26 +14063|5797204.00 +11383|5793893.12 +10065|5781764.45 +17785|5766838.76 +18349|5761765.77 +14824|5760339.78 +14699|5759490.18 +11628|5755137.20 +4403|5752376.64 +13090|5751949.25 +15332|5744606.28 +17573|5744384.15 +12895|5741007.02 +13577|5739209.94 +16594|5732523.64 +8497|5727509.84 +2872|5724068.72 +16181|5721788.16 +6639|5712041.22 +13095|5708798.25 +4535|5693341.20 +10956|5692585.50 +19755|5686913.37 +12995|5682200.41 +13157|5681454.94 +1887|5681341.24 +18472|5680356.00 +19814|5679360.00 +18583|5669360.52 +3894|5664385.49 +1740|5659552.04 +62|5659470.16 +16532|5653779.46 +995|5648973.45 +7486|5646851.87 +19007|5642710.93 +13060|5642024.64 +12371|5635710.45 +2280|5634077.40 +3115|5631352.32 +11107|5631252.46 +5873|5629125.75 +14743|5628732.80 +2224|5624746.62 +2653|5623859.99 +17622|5623057.44 +14700|5615344.00 +14740|5613929.39 +6403|5611924.51 +6896|5609169.88 +10384|5607337.52 +16433|5605707.03 +5898|5604937.76 +4789|5600488.36 +8132|5593107.50 +3838|5592313.20 +13631|5586424.80 +11233|5585247.01 +849|5583516.45 +14653|5581550.45 +14788|5580433.00 +18181|5578562.88 +19815|5577102.62 +5584|5576692.20 +5385|5576420.19 +13780|5569028.61 +9342|5566783.71 +19056|5566524.12 +8189|5565694.74 +13808|5560721.96 +10635|5560058.55 +8304|5550784.41 +14257|5549164.06 +8999|5542100.10 +19134|5539312.56 +8360|5538031.10 +6397|5536651.92 +2597|5525317.76 +8631|5515909.38 +16729|5512663.65 +11861|5511785.93 +16853|5511689.91 +6341|5502790.08 +1312|5496649.40 +5566|5495885.87 +12519|5490649.97 +19032|5488105.02 +8231|5479312.50 +3026|5466732.32 +6388|5466168.80 +15349|5464571.52 +18985|5463897.13 +19848|5454266.40 +17378|5453284.74 +4000|5448690.39 +3710|5445822.53 +13181|5439774.06 +6420|5438325.32 +3644|5437772.14 +1117|5437024.97 +13027|5436968.46 +12884|5432632.34 +12781|5429161.08 +10084|5428231.62 +5640|5423318.58 +16208|5422901.40 +753|5416899.74 +4120|5413822.46 +12348|5412061.71 +1586|5411198.55 +2503|5411125.80 +1381|5397790.10 +19673|5397746.77 +19389|5394426.40 +15532|5386361.38 +3562|5380335.08 +19114|5375133.00 +3204|5372215.46 +6653|5365178.00 +3553|5363690.29 +12687|5361682.12 +3279|5357505.65 +9840|5350112.18 +8258|5347064.67 +11387|5345284.00 +15210|5341117.92 +15092|5340896.80 +6052|5339762.18 +14043|5339587.68 +6284|5336153.00 +6297|5332357.74 +16254|5326607.83 +18436|5326198.50 +14436|5325517.14 +10368|5319983.08 +6349|5317943.40 +19984|5317620.00 +19080|5310678.60 +1403|5306771.32 +5995|5305056.12 +13214|5299420.45 +19293|5297054.40 +7130|5289761.48 +9809|5286784.80 +9273|5277924.77 +16786|5260035.00 +11032|5256354.35 +17719|5246322.20 +3400|5244203.68 +8278|5243718.48 +7873|5241168.80 +9357|5239695.77 +2239|5235767.83 +18695|5223960.35 +19271|5216498.29 +4563|5214673.70 +1896|5210699.79 +15755|5210481.24 +17628|5209882.37 +5747|5206892.24 +18057|5204907.40 +5075|5204412.81 +5325|5190162.75 +17675|5183135.36 +18818|5181295.30 +11064|5180667.57 +12578|5177222.33 +3725|5169183.75 +11112|5161546.00 +4749|5161499.44 +7632|5159180.50 +13119|5151665.51 +5653|5140324.64 +16134|5137482.51 +5671|5136815.55 +18348|5132981.07 +562|5132487.25 +2562|5126763.83 +10304|5125180.00 +7622|5120719.98 +12755|5118213.92 +1814|5100705.58 +11269|5096671.33 +2964|5095253.72 +1616|5091834.00 +9294|5090753.53 +16793|5085330.54 +4999|5081651.75 +17209|5079029.28 +7151|5078937.60 +15522|5072469.60 +3056|5072329.55 +7612|5068322.87 +18453|5063892.92 +18324|5058901.22 +12266|5058186.75 +19394|5056235.73 +1713|5054968.05 +15681|5051569.63 +8274|5043328.00 +18160|5043074.83 +18253|5041572.00 +11840|5040590.04 +1532|5033171.00 +584|5031602.64 +12382|5028901.00 +14814|5022200.07 +19058|5019001.92 +4487|5016640.86 +8482|5015444.25 +18476|5011136.36 +12335|5003581.40 +4455|4997933.31 +14355|4992822.92 +15253|4992642.20 +14069|4983244.20 +17843|4977294.37 +9389|4975885.83 +14435|4971442.19 +13254|4959481.45 +9773|4955887.80 +7615|4952421.54 +6476|4947250.05 +9253|4945159.70 +14932|4934395.48 +13253|4932867.45 +19322|4931525.78 +16945|4931440.61 +731|4930191.93 +6540|4925114.51 +5148|4923048.00 +1934|4921196.90 +15402|4920840.72 +17914|4919607.04 +5416|4916041.92 +16734|4914205.27 +14967|4900262.08 +8706|4894595.58 +136|4891960.92 +19494|4886028.30 +8737|4880640.44 +7653|4879423.64 +4149|4875782.40 +7890|4872424.40 +11142|4871415.42 +10386|4863623.50 +8603|4861814.61 +2680|4861223.74 +4891|4858103.88 +19236|4855097.69 +14251|4854739.86 +18895|4853365.10 +17134|4852041.04 +4932|4843701.45 +10033|4841647.72 +1383|4839144.31 +18721|4837983.36 +8618|4833125.42 +17386|4831545.84 +3790|4830282.36 +1043|4825921.31 +12434|4822597.78 +18385|4819643.40 +6046|4817460.06 +5821|4814423.45 +10836|4814303.24 +6848|4813954.08 +6880|4804600.35 +11249|4800116.82 +11970|4799739.66 +14253|4796521.29 +7782|4793227.13 +75|4790042.88 +7076|4789347.34 +9566|4782531.80 +2137|4767931.74 +2336|4763870.79 +15362|4759043.38 +3284|4755048.76 +12964|4753627.48 +1781|4752835.20 +5454|4748342.98 +12597|4742077.84 +19120|4733459.96 +14884|4731499.44 +825|4730720.28 +14683|4730482.32 +5361|4726113.00 +12179|4725018.10 +1461|4710954.69 +9890|4709658.40 +13369|4705085.39 +11612|4701627.99 +3096|4699414.40 +10383|4697866.47 +11293|4697336.06 +3383|4695825.20 +6231|4694381.72 +7396|4691319.06 +17827|4688797.44 +15856|4683368.21 +8253|4678560.86 +12327|4677984.74 +4395|4676829.82 +4232|4676646.40 +14260|4670522.80 +15288|4669273.99 +17526|4668545.64 +9884|4662693.84 +2118|4660352.78 +4524|4653956.60 +19090|4650872.94 +3928|4649359.44 +14325|4647762.17 +15476|4643469.04 +4179|4639931.76 +14408|4639631.28 +19424|4634817.44 +3334|4633102.50 +9477|4628073.51 +11803|4625396.80 +14805|4618452.18 +463|4616307.28 +16628|4607490.96 +3116|4604463.10 +19962|4602949.47 +12859|4602870.55 +12063|4600708.45 +5648|4592273.25 +8556|4590726.86 +15281|4589425.41 +9414|4587426.90 +13951|4586281.25 +19328|4582624.82 +15963|4579705.50 +10773|4573276.20 +14179|4568816.00 +1895|4563988.16 +6408|4561496.39 +5958|4554000.00 +3653|4548134.40 +11218|4546237.92 +19327|4543987.77 +9572|4535941.16 +14556|4531464.75 +2475|4529761.50 +9631|4529261.56 +1901|4528592.55 +86|4528475.38 +9586|4527146.22 +17361|4519098.87 +8112|4514949.45 +13468|4499728.20 +18239|4497633.64 +10215|4494553.60 +6211|4492264.96 +836|4490945.10 +895|4489141.50 +19542|4488393.75 +4322|4487884.23 +2116|4486944.65 +553|4486075.48 +2515|4485188.26 +16286|4481470.47 +12271|4478224.95 +16570|4465818.00 +7995|4457574.66 +18396|4457229.60 +16331|4455735.48 +18157|4452196.63 +5271|4452040.01 +11622|4451244.84 +4052|4446397.34 +2864|4446008.38 +490|4442892.30 +19837|4434172.39 +4114|4433657.85 +11436|4433070.15 +6085|4431306.57 +9735|4430445.60 +17834|4416286.33 +8157|4416116.65 +18840|4414925.32 +13553|4412261.70 +12562|4411183.04 +14025|4403442.16 +17964|4400360.09 +636|4399863.84 +8390|4389024.33 +231|4387397.30 +9699|4385891.02 +10622|4384005.32 +14364|4383236.90 +10580|4381533.23 +10124|4369800.96 +10451|4368867.50 +4673|4367113.44 +11351|4362616.50 +4770|4362397.32 +12932|4362042.60 +10603|4357216.50 +19733|4348931.75 +4222|4348871.91 +17319|4347687.69 +3375|4346529.48 +14995|4338295.65 +7675|4337499.60 +15043|4333921.20 +4835|4332648.00 +4408|4332588.90 +5559|4330577.09 +7376|4328936.54 +18061|4328793.98 +2749|4328671.53 +6628|4328501.88 +5888|4323049.72 +18872|4322595.62 +5476|4319642.58 +1755|4318935.63 +10623|4315822.56 +18775|4314677.64 +3570|4312697.87 +11147|4310740.57 +6071|4307612.40 +10807|4306006.00 +9550|4299478.56 +657|4296794.19 +19669|4294640.90 +8532|4290651.60 +13469|4281715.62 +8809|4280778.80 +11301|4276847.95 +6147|4266879.92 +2612|4265962.35 +15699|4256118.72 +12300|4254409.11 +3494|4250810.60 +11040|4250030.20 +6190|4244046.80 +17616|4239937.50 +7271|4234407.00 +14048|4226977.44 +4456|4224684.98 +10012|4223841.21 +11175|4223704.14 +18675|4215406.86 +10792|4214898.57 +10806|4209678.32 +18749|4204787.00 +17410|4198025.28 +8032|4195430.00 +11094|4192304.94 +17582|4187341.44 +12246|4183230.95 +6640|4182968.80 +7346|4174707.60 +12747|4169865.81 +3869|4164957.44 +13106|4161902.08 +10547|4159541.36 +15289|4156205.76 +1679|4156156.64 +1126|4155593.08 +19106|4147439.52 +9705|4144024.20 +15324|4142518.56 +16544|4140375.72 +8812|4139322.81 +10772|4134101.64 +2800|4127150.08 +15549|4124704.64 +3607|4118697.57 +1980|4117633.72 +214|4113117.36 +19217|4104217.60 +2460|4098577.46 +19156|4093864.46 +18359|4092727.29 +12865|4092526.84 +14616|4092434.54 +908|4088856.20 +11791|4083804.97 +4157|4078345.60 +3857|4070872.87 +15114|4056112.50 +395|4052997.76 +17456|4051457.28 +10562|4050894.19 +10884|4050330.76 +12177|4049842.68 +15595|4040577.56 +15916|4036044.50 +7084|4035102.72 +4424|4034761.56 +10874|4031015.85 +4740|4030403.76 +16585|4030010.26 +18824|4028984.10 +14875|4028452.08 +13855|4024828.34 +10932|4024002.40 +9084|4021362.45 +14352|4018089.74 +18086|4015180.68 +9514|4013666.67 +15787|4013154.56 +714|4010249.44 +8811|4009588.90 +14386|4007210.88 +616|4004057.26 +7460|4003412.48 +866|4003182.54 +782|4001299.94 +8562|3999441.62 +1366|3994060.86 +2879|3993056.55 +16679|3992434.99 +17306|3990723.30 +13140|3982817.39 +17942|3980857.04 +6572|3977676.28 +3578|3977523.94 +15802|3969946.90 +336|3967938.38 +9807|3964469.60 +12104|3964273.40 +4271|3962359.28 +6702|3961657.44 +19763|3955582.75 +369|3953702.88 +4089|3953455.68 +2593|3946153.80 +590|3943841.16 +8325|3942118.75 +158|3941881.65 +12054|3938362.69 +18330|3938303.88 +5354|3936239.58 +8150|3925793.46 +8344|3921293.60 +6069|3921130.55 +4032|3920008.59 +17939|3917750.27 +7014|3914471.20 +2840|3913131.58 +1868|3912987.54 +10975|3911920.48 +5374|3910802.74 +11128|3908156.46 +18449|3907589.40 +11740|3907459.84 +2356|3907189.00 +5721|3901585.97 +4231|3900779.05 +4352|3899933.44 +432|3899836.44 +15321|3899516.58 +10296|3897015.14 +5647|3895088.16 +7386|3891916.51 +507|3891487.68 +3995|3887387.07 +4278|3882294.02 +18407|3880267.86 +6127|3879166.71 +145|3875277.24 +19269|3874685.76 +18257|3874454.89 +9068|3869767.74 +576|3860007.79 +4860|3852862.02 +18793|3849838.16 +15988|3847257.05 +6891|3846386.75 +3231|3846344.30 +15237|3845421.00 +9035|3844166.85 +7597|3838643.35 +16349|3837121.65 +2497|3827850.20 +3616|3827390.95 +11566|3826122.47 +18403|3822033.02 +2972|3821903.55 +812|3821523.72 +2043|3820561.36 +505|3818922.03 +8257|3815071.92 +6084|3814194.95 +11253|3813917.24 +366|3812257.88 +13632|3811601.32 +14298|3801412.42 +7092|3798729.48 +2058|3796109.04 +14820|3791195.86 +7157|3788690.82 +17211|3786030.17 +16644|3786019.25 +15693|3783662.19 +2627|3782394.60 +11231|3782077.60 +12696|3781761.66 +8705|3778077.00 +16052|3771577.04 +99|3760269.31 +2082|3757517.50 +872|3750005.34 +7126|3749138.92 +10302|3744475.25 +17122|3741012.98 +10080|3740107.10 +16021|3739611.20 +3074|3739224.96 +3142|3738811.02 +13213|3735116.25 +13442|3733132.14 +11542|3731000.12 +13732|3730444.90 +2608|3729372.40 +5|3725511.50 +19157|3723844.72 +18231|3721707.99 +8179|3714155.04 +12740|3708646.91 +11597|3706528.59 +13968|3702376.08 +6436|3687346.44 +9181|3687134.08 +564|3680200.80 +13464|3678406.20 +14084|3673790.38 +2755|3670593.69 +14284|3668640.80 +12178|3653392.48 +15730|3650258.30 +5560|3649569.59 +8594|3647140.56 +7032|3646439.54 +16846|3644843.10 +1530|3642838.08 +3978|3639712.05 +2897|3639442.32 +16625|3636527.54 +12029|3636339.72 +16830|3633448.57 +9597|3632662.11 +5533|3630338.67 +5181|3625965.93 +8131|3625738.62 +8560|3620761.26 +11860|3618746.25 +12008|3614604.40 +10737|3611990.64 +18208|3611596.10 +5119|3611038.20 +11958|3601654.65 +15124|3598278.20 +14058|3597490.02 +12270|3593912.10 +17793|3593318.95 +9385|3587327.84 +12814|3587083.84 +5304|3586230.61 +3631|3582841.65 +610|3581917.30 +19317|3580412.43 +128|3567004.56 +11616|3566154.80 +10176|3565392.15 +7349|3564110.64 +1712|3560408.43 +18860|3559340.60 +17617|3557516.00 +6443|3556296.96 +15408|3554814.56 +16350|3554388.63 +17436|3554105.13 +5740|3551324.68 +12181|3550218.54 +16895|3550119.30 +19995|3548839.70 +4968|3548306.87 +2257|3546692.29 +1825|3543198.78 +18989|3539038.08 +18727|3536081.40 +16165|3533789.84 +3249|3533709.87 +11731|3532875.00 +13032|3532415.79 +9377|3531582.08 +5883|3531479.00 +1211|3528833.40 +12065|3526948.10 +10866|3526146.66 +2073|3520131.30 +2378|3512186.20 +16860|3509693.07 +389|3507814.64 +15604|3505653.27 +11257|3502831.80 +1327|3502022.60 +16602|3501074.88 +1493|3498808.95 +8224|3498179.52 +622|3497158.36 +3072|3495958.72 +1478|3494880.48 +3125|3494169.90 +2052|3488438.08 +8476|3487191.28 +10735|3477740.76 +14860|3476235.84 +6586|3475745.10 +5130|3472024.50 +7181|3471306.30 +618|3467906.52 +15698|3464859.47 +17585|3462450.46 +2548|3456856.96 +2632|3456230.74 +2882|3453986.86 +12216|3452907.15 +4925|3452904.63 +9012|3442581.36 +6667|3430076.40 +17958|3424962.56 +6093|3424241.92 +10648|3417414.00 +1462|3413248.61 +2569|3412388.82 +18616|3409880.91 +7368|3408036.45 +3110|3407374.60 +10824|3406819.29 +11510|3404701.96 +4840|3397236.40 +4449|3396993.60 +1358|3396616.32 +3885|3395817.60 +13381|3391953.52 +1655|3383051.51 +282|3381785.42 +4928|3374270.48 +3199|3372488.80 +16086|3370710.65 +8612|3362922.50 +19597|3360764.00 +8867|3354400.11 +4098|3353574.28 +12617|3351499.05 +14365|3347296.00 +10443|3345493.10 +76|3342081.82 +11585|3341941.22 +4383|3338960.27 +13910|3335964.16 +8076|3332449.89 +16005|3332190.40 +2622|3329364.45 +12822|3321183.52 +17076|3320398.06 +5392|3320357.15 +18628|3319615.84 +13695|3318525.99 +10326|3318274.16 +9109|3317833.90 +1489|3317620.80 +3378|3315948.00 +7738|3312979.20 +1844|3312277.36 +19963|3307500.00 +2436|3306419.05 +886|3302180.70 +15475|3301693.50 +6327|3300680.78 +6050|3299460.20 +9876|3298410.05 +19586|3291131.25 +14349|3289862.52 +10993|3287980.57 +18784|3286752.12 +1800|3285466.24 +990|3284595.50 +3823|3281992.94 +15737|3279305.96 +19518|3276759.63 +9032|3272440.32 +7786|3271217.28 +8648|3271162.44 +5532|3270187.97 +15914|3268520.98 +16065|3265068.84 +11212|3264657.03 +13229|3262022.28 +15827|3260862.72 +1582|3260340.00 +3827|3260093.76 +3546|3259244.07 +15849|3258918.00 +14856|3258379.40 +2028|3255013.96 +6618|3254581.95 +17461|3252926.88 +13551|3241602.20 +19561|3239795.32 +2276|3236172.30 +14203|3234649.39 +7757|3231351.84 +122|3226213.88 +12954|3225943.00 +647|3224783.76 +12383|3223989.44 +3831|3223126.60 +16836|3222260.73 +4565|3221597.44 +19426|3218106.54 +17855|3217813.02 +5624|3207777.36 +8368|3203376.45 +9480|3200904.00 +11181|3199500.53 +8981|3197864.00 +16426|3195995.97 +1648|3195558.90 +14404|3192729.60 +17867|3188571.00 +18117|3183229.04 +14289|3182261.60 +53|3182256.00 +15546|3180180.04 +16245|3178277.46 +1597|3176247.48 +1653|3173456.64 +2845|3171619.61 +15906|3171187.54 +18304|3168571.50 +14068|3167367.60 +6837|3165012.48 +9446|3164446.52 +18889|3156140.96 +16587|3154210.20 +7705|3152977.38 +1120|3151591.17 +17665|3148848.00 +5311|3146721.86 +14157|3144707.32 +7996|3131351.04 +8663|3130526.32 +18271|3127800.96 +6446|3125685.96 +6972|3125007.06 +2572|3123186.83 +13536|3122527.54 +6196|3122172.48 +9338|3121262.40 +11992|3118647.55 +2580|3118284.37 +9098|3117494.10 +5118|3112661.96 +10184|3109293.40 +9932|3105818.24 +18545|3102273.32 +10963|3099314.50 +8405|3097121.12 +9037|3095195.00 +179|3091107.28 +1930|3090915.80 +17723|3090624.66 +4308|3089472.75 +8702|3080129.92 +18621|3079984.80 +4501|3079781.10 +3590|3079049.42 +18264|3078858.44 +15648|3078564.06 +5998|3073264.00 +16904|3072610.80 +3794|3071333.09 +3147|3068485.32 +17221|3068337.22 +4709|3067523.31 +18017|3066743.41 +15613|3063987.86 +16271|3057051.34 +13621|3054774.59 +12919|3054518.50 +12493|3050836.30 +15838|3050645.95 +3273|3048955.15 +8324|3046011.25 +13628|3045324.50 +5522|3044408.50 +2202|3043132.05 +19052|3042566.55 +5767|3041871.70 +17895|3036452.22 +12586|3036386.30 +12425|3035041.52 +13517|3034351.47 +2363|3033336.60 +15060|3032598.51 +6764|3032591.10 +340|3030522.00 +4723|3028910.25 +3566|3027858.61 +17796|3026838.96 +15384|3023792.64 +16336|3010813.56 +679|3010713.30 +7554|3010667.80 +14553|3009756.96 +8379|3009745.17 +15436|3007499.77 +12471|3003991.86 +18059|3003037.53 +8536|3000746.00 +19033|2999373.28 +18179|2996151.20 +10711|2996143.17 +17271|2994264.79 +13932|2989023.58 +3101|2987788.16 +14550|2977853.65 +3080|2977232.58 +14533|2976490.49 +14439|2975313.24 +9237|2973124.78 +1205|2971470.28 +12361|2963419.47 +429|2962631.88 +3970|2960418.45 +8403|2957698.45 +1098|2957514.00 +7932|2955046.14 +16266|2952298.38 +19386|2948854.48 +13147|2947037.91 +2720|2947011.08 +3840|2944219.35 +13482|2942474.88 +9436|2940396.21 +19779|2937105.96 +18032|2933224.38 +7743|2932733.77 +14620|2930766.89 +4606|2927832.59 +18076|2924134.83 +19276|2918176.20 +7483|2915918.95 +8575|2915132.64 +11052|2913140.88 +17251|2908345.80 +8788|2907935.93 +10960|2906511.14 +18782|2903643.78 +19988|2897461.53 +726|2896009.27 +19942|2894251.36 +10864|2892252.48 +17840|2891563.22 +18717|2888939.96 +12391|2886051.30 +18219|2885921.06 +15100|2883342.33 +2491|2880385.74 +12389|2879696.96 +3880|2877770.24 +18579|2874542.48 +13647|2873838.34 +15758|2873804.92 +12917|2873659.60 +18866|2873616.26 +13894|2872986.12 +15200|2872571.93 +9628|2872404.56 +8568|2871598.08 +8389|2870237.88 +5788|2867210.18 +19450|2863310.66 +9440|2863162.92 +16795|2860135.41 +19643|2858987.80 +1974|2856825.84 +14622|2852089.12 +6885|2851437.62 +12532|2848992.64 +1087|2847858.80 +5777|2846407.41 +5629|2846076.12 +6316|2840544.65 +12767|2840514.12 +12134|2840036.91 +14476|2839853.01 +803|2838388.16 +18964|2836942.44 +6020|2833459.20 +10401|2832688.74 +1323|2829964.50 +1151|2829662.44 +1458|2824034.43 +2271|2820756.53 +18740|2814140.80 +7348|2811730.95 +4281|2807190.52 +8043|2804706.24 +3843|2804217.96 +7813|2802350.88 +347|2802245.52 +745|2801725.10 +10388|2799170.58 +18100|2793358.50 +19043|2789013.80 +10644|2787797.01 +16170|2787402.80 +398|2782729.05 +9370|2780078.13 +14504|2780036.04 +1210|2778485.76 +13385|2777445.62 +3799|2775223.60 +11325|2769766.02 +3489|2769554.52 +17181|2769028.50 +6964|2766653.78 +7381|2764898.80 +6253|2764394.64 +5975|2760819.72 +11996|2760687.86 +7570|2758977.12 +4387|2757672.00 +9014|2755367.42 +9403|2748021.66 +11653|2739731.07 +17697|2739312.29 +958|2738032.00 +18816|2737140.00 +14104|2735008.64 +15966|2732250.20 +17912|2724160.95 +7089|2720170.04 +16032|2718976.18 +16891|2717293.32 +19579|2716909.86 +17470|2715048.84 +12408|2712556.52 +4763|2711800.90 +1138|2709709.81 +7363|2708414.40 +7877|2705439.45 +17532|2703698.68 +10512|2701235.92 +11957|2700133.22 +2455|2699593.88 +15119|2696860.80 +9868|2696801.52 +14172|2695307.48 +16120|2689337.82 +13958|2679025.28 +15169|2676686.04 +2648|2672232.00 +6164|2671317.32 +12701|2669216.40 +16382|2669034.54 +15588|2667212.10 +14830|2666758.15 +9119|2665812.24 +1622|2665206.50 +878|2664045.79 +13269|2662784.12 +619|2655417.63 +18386|2653795.02 +2501|2652260.40 +2310|2651631.09 +19420|2649395.61 +4895|2645152.27 +7553|2643682.07 +17814|2642781.44 +16097|2642500.00 +10995|2640811.16 +14895|2637733.72 +18546|2637026.71 +9875|2631358.80 +9591|2626899.54 +6001|2625893.76 +7739|2624573.28 +10431|2624379.54 +4544|2615313.75 +16387|2603195.76 +18375|2601407.83 +8395|2598728.44 +18853|2593356.36 +4900|2592813.15 +1302|2592197.76 +17032|2589806.40 +14292|2589749.56 +43|2587359.58 +5221|2587024.04 +397|2579751.46 +17890|2579674.24 +12157|2575510.48 +7340|2574645.83 +19368|2572618.95 +8848|2570819.15 +13789|2570243.26 +14596|2568234.24 +8408|2567434.41 +19726|2565750.42 +13964|2565579.12 +7740|2563027.50 +14768|2560392.60 +11734|2559062.22 +10294|2558257.97 +15032|2557926.22 +9127|2556379.80 +2181|2553175.00 +16653|2552229.68 +3866|2549994.79 +16814|2548710.76 +1866|2545838.40 +3512|2532626.80 +4145|2529786.15 +12120|2528298.72 +644|2528123.05 +15379|2525181.01 +6392|2524063.08 +2652|2521456.80 +3363|2519202.23 +19167|2517993.18 +16042|2516599.92 +2892|2511854.40 +5711|2509401.72 +14591|2506344.69 +6564|2506277.34 +1231|2505421.24 +5049|2502603.00 +14576|2501606.69 +10211|2500852.20 +293|2493168.48 +7371|2491134.65 +18154|2491047.20 +9494|2489825.52 +14836|2480432.40 +19471|2480403.75 +802|2478998.33 +12541|2477242.60 +15065|2473563.94 +15995|2472803.20 +9408|2471953.56 +9776|2470447.90 +17325|2468989.05 +3391|2468317.72 +16123|2467022.22 +18758|2463798.06 +407|2460304.47 +6840|2456170.78 +9995|2455155.36 +3877|2453696.65 +5817|2452493.13 +14122|2452226.22 +16699|2450273.98 +8921|2450116.48 +15103|2449861.20 +7637|2449628.72 +3076|2443927.38 +6648|2443248.95 +17116|2442263.72 +1645|2440838.40 +3181|2440017.60 +5966|2431558.08 +15882|2428947.30 +7529|2428381.28 +12836|2427897.33 +18052|2427637.76 +13616|2426638.50 +16615|2424775.08 +18147|2424412.68 +4586|2424123.90 +14403|2423141.96 +11606|2422794.31 +13526|2422212.80 +3677|2421404.46 +5553|2418506.21 +12109|2416514.17 +13118|2415931.80 +1563|2408855.40 +16591|2408045.39 +6411|2404918.53 +10272|2402834.48 +10597|2400247.68 +13700|2398035.86 +9548|2397147.90 +14963|2395781.09 +13325|2390637.58 +13864|2388067.88 +7450|2383447.71 +9275|2382868.40 +5829|2378037.92 +13437|2377806.54 +13594|2375046.30 +11442|2374591.08 +15619|2374052.38 +9063|2374035.84 +5990|2368686.50 +7811|2363829.26 +9525|2362974.53 +5597|2361031.84 +8963|2360774.00 +1709|2359839.29 +15814|2358656.64 +17613|2357519.04 +5022|2354550.45 +17740|2354242.83 +3388|2351042.26 +13773|2348739.12 +14467|2348665.04 +11544|2345324.45 +349|2344664.13 +10356|2340862.72 +18272|2338754.60 +4627|2337430.84 +327|2335298.46 +19846|2332224.73 +10814|2330319.60 +13102|2326122.75 +18867|2323972.00 +2824|2323315.08 +19117|2319911.10 +1906|2319757.60 +245|2319450.90 +17318|2317860.39 +3862|2316453.72 +8100|2313874.12 +2958|2312239.47 +10263|2308514.06 +13814|2304940.40 +9394|2303161.74 +18080|2299416.78 +1271|2289526.98 +3327|2278474.48 +8740|2278405.92 +8119|2276428.17 +3368|2274373.62 +7963|2272300.80 +2151|2270932.72 +16995|2270264.68 +9918|2269733.07 +503|2268535.25 +16692|2256484.50 +793|2254198.72 +16455|2252361.86 +6644|2249521.82 +17280|2249437.50 +6813|2248982.00 +4674|2246915.32 +16325|2244369.80 +182|2243290.00 +4626|2242474.35 +10860|2241291.60 +14034|2241220.80 +2476|2240855.20 +4253|2239985.64 +3211|2239871.02 +1290|2233313.00 +8479|2232189.04 +11895|2231607.00 +3487|2230171.62 +14870|2229915.37 +16328|2229483.96 +18585|2228215.50 +7638|2228208.08 +5436|2225672.28 +14594|2223005.07 +4532|2215711.02 +7586|2210562.51 +11870|2205182.82 +18487|2203653.60 +9179|2202720.52 +16500|2201185.31 +3679|2200592.70 +12803|2198295.00 +18056|2196741.90 +11396|2195645.64 +5087|2194120.72 +8067|2192048.64 +15357|2191646.58 +4491|2189713.50 +208|2189046.80 +10958|2188766.82 +9126|2188410.50 +15084|2184327.02 +18850|2183309.52 +3398|2180250.00 +16137|2177318.76 +211|2174808.96 +18422|2174381.00 +15840|2173510.40 +19553|2173079.77 +8221|2169992.16 +17000|2169611.16 +6755|2168505.15 +10817|2167710.68 +8327|2167650.60 +543|2167368.00 +4553|2163371.52 +15019|2162288.00 +334|2162178.48 +8516|2161479.04 +11349|2158941.88 +3902|2157027.86 +14731|2155302.24 +326|2153380.08 +11403|2151242.30 +11657|2150446.08 +9496|2149219.01 +8110|2149120.13 +5153|2148527.25 +884|2148324.98 +8637|2146185.10 +2364|2145790.72 +12386|2145001.47 +10133|2144903.96 +9895|2143324.80 +13755|2142539.40 +4327|2138501.40 +3369|2137408.76 +5815|2136985.00 +19357|2132657.28 +2675|2124158.72 +17869|2123991.72 +11702|2122132.99 +17257|2117850.64 +9952|2116686.32 +3881|2111457.15 +10951|2111185.58 +2128|2109702.30 +6699|2106578.40 +3155|2103636.64 +16649|2101956.20 +15257|2100297.75 +9978|2099566.56 +16810|2098301.44 +10653|2093388.70 +10476|2092766.48 +10883|2087495.28 +9704|2086967.61 +1119|2085182.84 +19139|2079788.34 +2144|2078391.14 +9135|2076377.80 +18548|2075584.32 +10545|2075230.35 +6220|2074341.72 +8616|2072887.65 +5230|2072161.74 +13916|2070504.72 +4299|2069922.96 +894|2069688.16 +17847|2063367.04 +18879|2061902.25 +13036|2061600.17 +10606|2060492.40 +9454|2060016.48 +118|2059808.86 +9601|2059715.76 +13769|2057668.08 +1987|2057289.27 +13863|2055368.00 +13562|2054754.24 +1840|2054183.92 +17995|2053221.90 +17389|2051128.20 +15168|2045987.49 +2139|2045365.40 +4024|2044243.10 +8964|2041648.85 +181|2040167.04 +7628|2039548.92 +3|2038846.09 +15553|2036958.91 +11355|2035405.60 +13006|2034991.20 +3091|2031393.51 +1281|2030628.48 +1408|2028621.66 +18211|2024538.67 +2287|2020754.32 +6228|2019198.82 +4362|2018495.25 +10873|2013280.32 +7383|2009581.92 +1386|2006544.26 +9820|2005815.76 +18134|2003409.73 +15727|2000654.50 +157|2000148.16 +19571|1999891.11 +17728|1997944.40 +5278|1996644.21 +17737|1994653.76 +10220|1989890.98 +1397|1984509.22 +6195|1983928.26 +4270|1983726.95 +16965|1983286.25 +1683|1980638.64 +13086|1978609.40 +7124|1974039.38 +5211|1973843.76 +6794|1973149.47 +257|1973035.44 +6995|1968281.55 +8447|1967292.70 +15873|1967257.89 +12862|1964014.13 +8295|1961467.08 +931|1958825.22 +6876|1957359.48 +1932|1954592.40 +1061|1952688.06 +18108|1951143.67 +5138|1950861.00 +12598|1950211.61 +10829|1943924.62 +11950|1941211.00 +12076|1939323.96 +2176|1938691.37 +6616|1937401.88 +5893|1934358.58 +976|1933066.80 +13173|1932557.52 +14947|1929229.98 +16857|1928814.80 +13403|1928702.88 +4819|1926969.68 +13127|1926929.83 +6871|1926787.68 +15465|1925145.09 +1131|1920005.50 +11845|1913576.40 +8364|1909122.20 +16588|1904272.37 +6759|1903906.29 +11586|1901895.65 +8145|1901787.66 +17333|1897297.20 +13290|1890633.75 +6499|1887621.00 +4881|1887535.92 +7147|1886710.20 +3883|1886567.78 +18911|1885597.12 +11336|1883573.60 +8653|1883275.76 +19476|1881492.48 +14799|1880543.40 +14491|1879219.92 +11815|1877434.34 +3173|1874302.10 +7161|1873023.45 +14631|1873015.30 +4247|1869912.96 +3568|1865824.40 +1500|1865451.03 +11833|1863665.23 +495|1860771.30 +6776|1855589.17 +11374|1855221.12 +5637|1853782.17 +3597|1852826.80 +981|1852083.60 +16076|1850349.69 +17597|1845420.95 +19609|1843185.48 +10997|1843072.02 +3403|1842975.00 +897|1842845.10 +16697|1840630.68 +17644|1840597.80 +6485|1838812.02 +5492|1836202.88 +12038|1835075.06 +9325|1832634.84 +10637|1832347.44 +11318|1830158.39 +4357|1828730.00 +18553|1826335.20 +12623|1825950.85 +961|1825869.60 +1677|1821816.90 +8211|1820432.52 +19719|1819333.55 +19663|1819074.35 +16296|1818353.77 +16527|1817834.42 +4964|1815400.02 +1769|1812929.20 +13126|1808799.96 +7854|1807608.06 +18380|1803641.22 +6584|1802346.98 +7665|1801765.35 +16553|1796146.78 +17761|1795095.72 +11179|1794890.30 +15171|1794148.72 +3018|1793183.88 +15741|1788612.00 +5331|1783901.35 +9860|1775071.26 +7984|1774302.75 +15354|1774270.77 +17884|1774212.44 +16257|1771869.71 +10696|1768645.20 +2104|1767902.64 +14465|1764946.40 +10089|1764692.32 +6719|1762699.54 +3648|1760594.42 +7241|1759913.59 +11122|1757430.04 +17019|1752560.65 +13877|1744271.10 +15325|1743826.26 +17860|1739870.44 +2236|1739795.80 +4436|1738760.32 +7701|1738670.40 +8147|1736855.16 +6676|1736341.44 +19505|1735413.43 +9885|1731366.26 +2112|1725934.08 +5330|1722196.98 +3561|1720377.96 +10104|1714419.16 +16362|1712457.38 +15573|1712365.44 +15006|1711381.35 +14629|1709942.05 +9612|1709528.38 +19910|1709211.15 +13145|1708907.46 +11494|1707973.68 +15895|1706999.45 +8239|1705479.10 +2403|1705331.10 +19436|1702706.00 +3476|1702335.80 +6828|1702292.08 +771|1701589.50 +8448|1700312.44 +3755|1699047.03 +13895|1698679.03 +9785|1698056.37 +6180|1695571.53 +532|1694356.15 +6741|1692552.42 +19964|1692367.64 +3747|1691244.60 +3253|1690719.42 +16119|1688339.25 +7113|1681911.00 +12368|1681219.80 +16378|1679705.60 +1393|1675545.35 +11119|1675453.44 +4469|1674023.49 +6955|1672618.90 +11579|1672345.32 +19898|1671781.70 +15351|1659204.30 +6133|1658215.46 +9110|1658054.68 +2979|1656016.74 +18764|1653708.48 +8995|1653627.58 +13096|1651408.67 +15062|1650548.02 +7924|1650202.40 +10076|1647970.24 +15859|1646036.28 +17932|1642640.66 +19694|1642089.50 +13827|1642001.31 +17963|1639689.00 +10698|1635848.26 +18003|1633530.78 +8416|1633366.77 +476|1631154.06 +2806|1630782.80 +12129|1628615.47 +11215|1626624.70 +14061|1624933.44 +5956|1623586.10 +9043|1622670.40 +13287|1621980.36 +11410|1621420.90 +13990|1621268.20 +12952|1619215.18 +15181|1619088.68 +9784|1618120.53 +10733|1616168.88 +16054|1614531.23 +5864|1614397.83 +1875|1611927.00 +17381|1611664.80 +14562|1607467.92 +575|1605941.73 +2005|1605591.72 +4332|1605448.83 +4653|1602596.30 +15403|1601830.44 +17430|1599681.42 +4798|1593630.50 +12991|1593321.52 +15653|1593138.66 +10066|1593049.06 +8892|1592100.90 +6708|1590159.12 +9825|1589403.92 +8271|1588475.41 +17084|1584280.88 +4003|1583631.00 +869|1582643.16 +16400|1582313.20 +19088|1581708.56 +6581|1581346.80 +9481|1581048.60 +6092|1580846.49 +3624|1578777.30 +6503|1578507.78 +14557|1578280.96 +2428|1577543.92 +15513|1573560.21 +4641|1573363.54 +10152|1570213.60 +5932|1566902.52 +7482|1561323.50 +13745|1558358.34 +2251|1558274.70 +9845|1558068.12 +7603|1557388.20 +1809|1553837.20 +18128|1547643.36 +8086|1543199.04 +14948|1541721.57 +16725|1540948.50 +2999|1540317.66 +8861|1540008.47 +1964|1538815.25 +19374|1537884.78 +15428|1535994.36 +7449|1534782.48 +16884|1534509.16 +10271|1534397.34 +11782|1529963.22 +8184|1529750.70 +4560|1527433.24 +4616|1525374.46 +3814|1524077.04 +17265|1523932.08 +16520|1522906.28 +10475|1518705.06 +5094|1517317.83 +8626|1515142.07 +19895|1512286.68 +19933|1506235.36 +6854|1505626.00 +13995|1505562.18 +7102|1504945.67 +9079|1501237.20 +18329|1500146.90 +3742|1496990.77 +12395|1496904.43 +12214|1496489.40 +12298|1495554.30 +4978|1495389.50 +2927|1494280.10 +2119|1494151.14 +15143|1492039.75 +14548|1487406.60 +840|1486128.98 +5902|1486097.28 +10614|1482144.72 +5895|1481356.80 +15958|1480951.60 +11408|1479948.96 +8407|1474236.00 +6243|1471007.85 +10389|1469004.46 +13871|1468938.64 +19811|1464597.09 +10495|1464290.49 +4389|1463010.83 +1311|1461703.36 +17874|1459408.88 +6597|1458761.87 +19211|1456741.63 +12879|1456178.24 +8840|1455731.46 +14755|1454890.60 +16957|1454465.96 +9257|1454388.76 +5193|1454011.32 +6884|1452474.60 +19948|1452024.00 +15076|1448395.00 +16016|1447557.45 +11693|1445839.68 +6975|1440516.96 +4290|1439768.46 +18900|1438722.10 +14383|1438477.92 +15098|1435941.78 +9322|1435282.80 +458|1433040.45 +10042|1432906.35 +5052|1431900.90 +6600|1431116.55 +3630|1428665.04 +9636|1428193.84 +16511|1427308.74 +4045|1427248.35 +19562|1426348.82 +8814|1425690.09 +2616|1425178.04 +4587|1425109.40 +148|1424237.37 +2712|1423780.26 +10863|1423386.16 +16096|1421942.09 +18936|1421938.65 +18327|1419872.92 +11620|1419050.10 +3740|1418609.85 +3457|1418603.50 +1185|1417637.47 +8178|1417357.26 +17791|1413293.13 +13608|1411323.12 +17849|1409613.50 +6814|1406228.40 +14022|1406138.04 +14231|1403771.52 +19546|1402854.60 +19619|1402389.16 +5609|1402302.54 +5342|1401567.59 +3084|1401096.10 +5708|1400334.90 +17998|1399862.45 +19850|1397630.33 +14004|1395443.10 +13071|1394653.24 +2797|1393747.58 +2866|1392947.25 +19809|1389067.68 +13600|1380865.80 +13614|1380654.36 +5884|1380319.74 +9404|1378623.66 +10656|1376954.32 +12324|1376502.40 +7325|1375030.43 +13295|1373987.34 +11864|1373555.68 +6987|1373481.51 +8386|1371854.41 +10916|1370374.32 +12867|1369058.11 +14668|1369040.34 +13383|1367342.30 +18572|1366953.96 +1152|1366861.38 +6015|1366452.18 +3344|1366185.15 +7889|1365521.92 +13345|1364088.88 +6276|1363421.62 +8069|1361824.20 +17509|1360892.49 +15137|1358678.07 +17163|1357391.52 +4704|1356692.40 +8609|1356578.19 +12644|1356088.14 +17141|1356022.38 +11805|1354826.78 +6386|1354187.22 +3004|1352173.44 +8634|1350211.80 +4399|1349881.20 +10362|1349411.34 +1572|1348835.20 +7359|1348224.10 +11884|1346696.82 +11671|1346424.15 +5350|1346359.28 +3119|1345996.48 +5307|1345356.00 +16117|1345045.12 +8715|1342665.72 +5398|1341179.28 +7627|1338820.56 +8457|1337714.68 +4958|1334732.71 +84|1334146.71 +6932|1333235.36 +757|1332921.07 +4076|1332441.00 +1751|1329112.32 +15701|1327052.16 +4119|1326549.90 +1562|1325604.28 +8741|1325517.60 +1135|1325422.71 +1002|1323418.65 +5832|1323085.71 +5368|1322793.96 +5382|1322628.84 +5616|1319082.26 +2832|1318691.95 +3895|1317858.44 +8629|1317756.51 +5709|1317058.68 +18383|1316451.05 +15797|1314806.64 +1900|1313660.40 +13882|1310455.86 +6785|1309877.80 +14855|1309280.76 +7761|1308602.24 +14268|1306810.40 +6257|1306056.96 +19002|1305509.52 +5095|1303729.02 +10320|1301657.58 +7826|1299561.68 +13359|1298717.14 +7436|1298127.36 +5644|1295055.77 +11327|1290526.41 +5277|1289329.65 +15932|1286235.84 +14322|1284809.36 +144|1284270.12 +3043|1281162.79 +16788|1280955.34 +17136|1280443.12 +12560|1279117.95 +13833|1278834.75 +5414|1277893.26 +12582|1277592.32 +4644|1277535.00 +14032|1277077.88 +18325|1271719.68 +7072|1271228.48 +16868|1267469.42 +8137|1267425.81 +5976|1266206.85 +14125|1265569.05 +13299|1265287.55 +18376|1264249.30 +6157|1261759.92 +5002|1261669.64 +13368|1260918.60 +15589|1260059.76 +2149|1258981.44 +9639|1256283.38 +11689|1256027.92 +9083|1245924.24 +16231|1242625.65 +5084|1242385.28 +11634|1240760.18 +15617|1239731.25 +9865|1237181.62 +14212|1236365.52 +10325|1235223.36 +19582|1235105.76 +740|1234746.81 +19231|1233623.10 +16840|1233063.85 +5703|1231744.33 +5761|1229435.20 +15630|1226611.62 +10408|1224698.40 +9177|1221942.51 +13389|1221666.75 +6104|1221577.92 +9673|1218826.64 +2707|1217124.48 +18672|1214208.80 +5112|1209590.20 +6264|1208318.50 +18496|1207881.75 +10971|1207183.52 +19059|1206729.90 +431|1205938.44 +3821|1201192.75 +826|1200454.62 +3317|1200440.90 +19689|1198899.52 +19641|1198797.99 +6379|1197195.50 +814|1194417.40 +18643|1194000.78 +11865|1193965.76 +12393|1193896.80 +9218|1193660.58 +8674|1191881.32 +8582|1191804.02 +13084|1191508.00 +18844|1190239.96 +16061|1189935.00 +6134|1185550.80 +8628|1183245.60 +8884|1181547.48 +7697|1181032.50 +9044|1180922.60 +13257|1180158.57 +8066|1178808.12 +5876|1177376.80 +14694|1177059.31 +16062|1175391.00 +9104|1175178.90 +11600|1175091.06 +10337|1172684.92 +19188|1172349.78 +8833|1171372.93 +6895|1170602.07 +14100|1168878.40 +13538|1168554.28 +3408|1166645.16 +1860|1165673.68 +13436|1164278.70 +19325|1162733.70 +7403|1161982.00 +4882|1161404.81 +13105|1161320.58 +17880|1161256.02 +19284|1160927.60 +13476|1159035.15 +18913|1158208.30 +18523|1158135.00 +12508|1157538.45 +9090|1156362.64 +17653|1154338.08 +3926|1152652.52 +10183|1148324.57 +7556|1146268.14 +16436|1142656.47 +4741|1141614.00 +15651|1141497.93 +3183|1140081.36 +9532|1139902.50 +16403|1139306.37 +2368|1137421.16 +3889|1136395.50 +2885|1135838.14 +7851|1135110.76 +16234|1135017.24 +12746|1134531.04 +2647|1132941.12 +5373|1132158.01 +10340|1132004.24 +8873|1131949.28 +1132|1131338.88 +15594|1131328.62 +4376|1130282.20 +240|1126682.48 +2231|1124447.15 +929|1121383.92 +11599|1119307.27 +3765|1119093.50 +17635|1118420.16 +7119|1118285.08 +15121|1117715.34 +11858|1116963.54 +16963|1116929.45 +16356|1113648.98 +6924|1112198.40 +16223|1111257.00 +18091|1110043.02 +12628|1108954.80 +16043|1108831.05 +9402|1108290.48 +708|1107084.00 +4078|1105993.96 +17593|1104713.40 +12776|1104362.59 +7583|1102813.53 +14619|1102675.80 +8842|1100110.26 +4196|1099726.55 +2019|1098178.64 +6863|1097246.36 +6489|1096503.07 +2459|1094813.04 +11964|1094485.02 +3236|1093969.80 +17647|1093809.15 +17648|1093114.62 +119|1092687.48 +9626|1092080.00 +9124|1091569.68 +13175|1089851.76 +2532|1088706.35 +16083|1088295.39 +8874|1086011.34 +12872|1082970.30 +19821|1082520.84 +4800|1080389.70 +18696|1079685.36 +19545|1079184.33 +13120|1077742.28 +10588|1076203.83 +17696|1075092.72 +14651|1073222.23 +903|1071146.76 +5858|1070259.48 +8302|1069504.80 +18728|1069225.51 +18026|1068569.00 +19383|1066907.58 +18690|1065930.90 +5924|1065143.12 +4880|1065011.75 +12439|1064381.19 +16529|1062371.70 +19653|1057683.56 +3136|1056810.44 +18932|1056193.65 +2124|1054160.52 +16851|1052646.84 +10123|1051624.00 +5618|1048447.93 +19851|1045187.85 +16278|1044808.38 +11479|1044276.22 +13263|1042046.20 +6041|1041123.38 +7193|1040455.32 +19408|1039430.01 +11260|1036828.52 +5179|1035633.44 +1331|1034398.00 +7706|1034249.40 +8436|1033549.35 +1801|1031886.00 +4170|1031642.90 +11827|1031139.39 +17114|1027985.88 +18278|1026583.11 +1995|1025165.68 +7667|1022980.15 +6559|1021635.45 +17488|1021612.13 +16059|1019781.19 +7633|1018782.57 +10032|1016809.50 +2899|1016438.76 +14628|1016033.20 +10126|1015846.78 +3884|1014413.50 +16913|1013604.40 +18644|1010288.10 +19870|1007919.36 +18564|1007416.20 +10179|1004920.00 +883|1004650.68 +3627|1004461.04 \ No newline at end of file diff --git a/test/src/test/resources/tpch/sf0.1/q12.csv b/test/src/test/resources/tpch/sf0.1/q12.csv new file mode 100644 index 0000000000..86211166b2 --- /dev/null +++ b/test/src/test/resources/tpch/sf0.1/q12.csv @@ -0,0 +1,3 @@ +lineitem.l_shipmode|high_line_count|low_line_count +MAIL|647|945 +SHIP|620|943 \ No newline at end of file diff --git a/test/src/test/resources/tpch/sf0.1/q14.csv b/test/src/test/resources/tpch/sf0.1/q14.csv new file mode 100644 index 0000000000..29b37dd533 --- /dev/null +++ b/test/src/test/resources/tpch/sf0.1/q14.csv @@ -0,0 +1,2 @@ +promo_revenue +16.283855689005982 \ No newline at end of file diff --git a/test/src/test/resources/tpch/sf0.1/q15.csv b/test/src/test/resources/tpch/sf0.1/q15.csv new file mode 100644 index 0000000000..2d4519e033 --- /dev/null +++ b/test/src/test/resources/tpch/sf0.1/q15.csv @@ -0,0 +1,2 @@ +s_suppkey|s_name|s_address|s_phone|total_revenue +677|Supplier#000000677|8mhrffG7D2WJBSQbOGstQ|23-290-639-3315|1614410.2928 \ No newline at end of file diff --git a/test/src/test/resources/tpch/sf0.1/q2.csv b/test/src/test/resources/tpch/sf0.1/q2.csv index 9c5612bba0..857b574154 100644 --- a/test/src/test/resources/tpch/sf0.1/q2.csv +++ b/test/src/test/resources/tpch/sf0.1/q2.csv @@ -1,45 +1,45 @@ s_acctbal|s_name|n_name|p_partkey|p_mfgr|s_address|s_phone|s_comment -9828.21|Supplier#000000647|UNITED KINGDOM|13120|Manufacturer#5|vV6Teq1EvLlR|33-258-202-4782|mong the carefully quiet accounts slee -9508.37|Supplier#000000070|FRANCE|3563|Manufacturer#1|jd4djZv0cc5KdnA0q9oOqvceaPUbNloOW|16-821-608-1166|n instructions are about the ironic, ironic excuses. instructions cajol -9508.37|Supplier#000000070|FRANCE|17268|Manufacturer#4|jd4djZv0cc5KdnA0q9oOqvceaPUbNloOW|16-821-608-1166|n instructions are about the ironic, ironic excuses. instructions cajol -9453.01|Supplier#000000802|ROMANIA|10021|Manufacturer#5|1Uj23QWxQjj7EyeqHWqGWTbN|29-342-882-6463|s according to the even deposits integrate express packages. express -9453.01|Supplier#000000802|ROMANIA|13275|Manufacturer#4|1Uj23QWxQjj7EyeqHWqGWTbN|29-342-882-6463|s according to the even deposits integrate express packages. express -9192.10|Supplier#000000115|UNITED KINGDOM|13325|Manufacturer#1|EhrYy0MT5M1vfZ0V4skpifdp6pgFz5|33-597-248-1220|onic instructions. ironic, regular deposits haggle f -9032.15|Supplier#000000959|GERMANY|4958|Manufacturer#4|TK qrnjpDvd1Jc|17-108-642-3106|nag across the slyly even pin -8702.02|Supplier#000000333|RUSSIA|11810|Manufacturer#3|fQ5Lr4KvbNHI3WDMhkcI S6xYtgIi1k|32-508-202-6136|ounts around the requests cajole furiously blithely even instructions. slyly -8615.50|Supplier#000000812|FRANCE|10551|Manufacturer#2|TAJWyNst8OGVPINgqtzwyyp002iYNDVub|16-585-724-6633|ress ideas eat quickly. blithely express deposits was slyly. final, -8615.50|Supplier#000000812|FRANCE|13811|Manufacturer#4|TAJWyNst8OGVPINgqtzwyyp002iYNDVub|16-585-724-6633|ress ideas eat quickly. blithely express deposits was slyly. final, -8488.53|Supplier#000000367|RUSSIA|6854|Manufacturer#4|nr8wRQ a5LXXess|32-458-198-9557|ect. quickly pending deposits sleep carefully even, express dependencies. -8430.52|Supplier#000000646|FRANCE|11384|Manufacturer#3|j6szE80YCpLHJ4bZ7F37gUiGhk0WJ0,8h9y|16-601-220-5489|quickly slyly even deposits. quickly ironic theodolites sleep fluffily after the c -8271.39|Supplier#000000146|RUSSIA|4637|Manufacturer#5|ApndKp ,Wu0 LNsoV0KldxyoIlY|32-792-619-3155|slyly regular foxes. unusual accounts about the regular packages -8096.98|Supplier#000000574|RUSSIA|323|Manufacturer#4|ZcSrzuRKYEGpcxmIsH,BrYBMwH0|32-866-246-8752|boost according to the slyly final instructions. furiously ironic packages cajole furiously -7392.78|Supplier#000000170|UNITED KINGDOM|7655|Manufacturer#2|ayz3a18xDGrr3jtS|33-803-340-5398|egular, even packages. pending, -7205.20|Supplier#000000477|GERMANY|10956|Manufacturer#5|6yQdgeVeAxJVtJTIYFNNWvQL|17-180-144-7991|ual accounts use quickly above the carefully quiet dolphins. packages nag closely. iro -6820.35|Supplier#000000007|UNITED KINGDOM|13217|Manufacturer#5| 0W7IPdkpWycUbQ9Adp6B|33-990-965-2201|ke across the slyly ironic packages. carefully special pinto beans wake blithely. even deposits los -6721.70|Supplier#000000954|FRANCE|4191|Manufacturer#3|cXcVBs6lsZbzfE14|16-537-341-8517|mong the quickly express pinto b -6329.90|Supplier#000000996|GERMANY|10735|Manufacturer#2|5uWNawcqv4IL8okyBL e|17-447-811-3282|deas. bold dinos are. carefully reg -6173.87|Supplier#000000408|RUSSIA|18139|Manufacturer#1|BOC Zy0wh3rCGHDgV0NIGt2dEK|32-858-724-2950| are carefully above the carefully final pinto beans. blithely express foxes ab -5364.99|Supplier#000000785|RUSSIA|13784|Manufacturer#4|5r5GjqBatnYAHaH5kB4IPcBEiglMJEnN4tUUG6k2|32-297-653-2203|se carefully after the bravely stealthy instru -5069.27|Supplier#000000328|GERMANY|16327|Manufacturer#1|9eEYWOr4kUZ|17-231-513-5721|es according to the slyly ironic package -4941.88|Supplier#000000321|ROMANIA|7320|Manufacturer#5|CfDKlGVtMePjtCw|29-573-279-1406| instructions boost carefu -4672.25|Supplier#000000239|RUSSIA|12238|Manufacturer#1|4cZ,ZHKj hRKgYlgZ6UapQ7mrEOozeQMx7KhUCS|32-396-654-6826|s wake fluffily slyly special foxes. ironic, bold -4586.49|Supplier#000000680|RUSSIA|5679|Manufacturer#3|7JwnLOmLhJ1aPMT61PSx9kcY77r,HmRUD314m|32-522-382-1620|e even pinto beans. blithely fluffy ideas cajole slyly around the bl -4518.31|Supplier#000000149|FRANCE|18344|Manufacturer#5|C5t4zIcINBkgBWdMg6WtgMtE|16-660-553-2456|silent platelets. ideas hinder carefully among the slyly regular deposits. slyly pending inst -4315.15|Supplier#000000509|FRANCE|18972|Manufacturer#2|9lTN9T5VBg|16-298-154-3365|ep boldly ironic theodolites. special dependencies lose blithely. final, regular packages wake -3526.53|Supplier#000000553|FRANCE|8036|Manufacturer#4|R0FI5DL3Poi|16-599-552-3755|l foxes wake slyly even f -3526.53|Supplier#000000553|FRANCE|17018|Manufacturer#3|R0FI5DL3Poi|16-599-552-3755|l foxes wake slyly even f -3294.68|Supplier#000000350|GERMANY|4841|Manufacturer#4|hilu5UXMCwFvJJ|17-113-181-4017|ronic ideas. blithely blithe accounts sleep blithely. regular requests boost carefully about the r -2972.26|Supplier#000000016|RUSSIA|1015|Manufacturer#4|3HbVoWVsjn4fTfQGgYTsMaDvMINBIDXqeBwK|32-822-502-4215|platelets thrash against the slyly special req -2963.09|Supplier#000000840|ROMANIA|3080|Manufacturer#2|J2s6iuBgJo03|29-781-337-5584|s sleep blithely unusual packages! even, bold accounts sleep slyly about the even -2221.25|Supplier#000000771|ROMANIA|13981|Manufacturer#2|Gv1ri,V ARHE136eJF|29-986-304-9006|lphins affix blithely along the carefully final ide -1381.97|Supplier#000000104|FRANCE|18103|Manufacturer#3|oOFWtl sAwYcbM9dWRPgKTS3Ebmn9Tcp3iz0F|16-434-972-6922|s. blithely pending requests against the regular instructions cajole sometimes according to the qu -906.07|Supplier#000000138|ROMANIA|8363|Manufacturer#4|yyPBFrErKTaEu5L3CdNJP ak4ys9AbN,Aj8wPgv|29-533-434-6776|deas haggle. final, regular packages wake. quiet packages cajole pinto beans -765.69|Supplier#000000799|RUSSIA|11276|Manufacturer#2|IvldT2pX7R el|32-579-339-1495| deposits: pending, unusual forges nag fluffily regular ideas -727.89|Supplier#000000470|ROMANIA|6213|Manufacturer#3|4OGPs qKpfQ6GNLIKhmbIE6e7fSMP8fmwi|29-165-289-1523|ly silent accounts. foxes maintain blithely along the idly -683.07|Supplier#000000651|RUSSIA|4888|Manufacturer#4|D4MGIq5Uz0,K|32-181-426-4490|ve to are slyly ironic asymptot -167.56|Supplier#000000290|FRANCE|2037|Manufacturer#1|VpG,Ul5yv1RgAK,,|16-675-286-5102| carefully furiously stealthy accounts. bold acc -91.39|Supplier#000000949|UNITED KINGDOM|9430|Manufacturer#2|R06m0VD95FZLoBJHcCMyaZQHitqmhZrQZkZk5|33-332-697-2768|sual requests. carefully regular requests bo --314.06|Supplier#000000510|ROMANIA|17242|Manufacturer#4|6E3aFs0w2SiImzMDSewWtzOwdpLz2|29-207-852-3454|lyly regular accounts. deposits --820.89|Supplier#000000409|GERMANY|2156|Manufacturer#5|gt362msTQ3AwtUVHgqP7Ryksk90dnpPNyn|17-719-517-9836|nal deposits doubt blithely regular packages. fr --845.44|Supplier#000000704|ROMANIA|9926|Manufacturer#5|KawFpBPAADrVnKC,pLL9q3TSyHG9x|29-300-896-5991|ous pearls boost carefully --942.73|Supplier#000000563|GERMANY|5797|Manufacturer#1|aOT6ZP96J2 ,Xhn|17-108-537-2691|are blithely silent requests. quickly even packages use blit +9828.21|Supplier#000000647|UNITED KINGDOM|13120|Manufacturer#5|x5U7MBZmwfG9|33-258-202-4782|s the slyly even ideas poach fluffily +9508.37|Supplier#000000070|FRANCE|3563|Manufacturer#1|INWNH2w,OOWgNDq0BRCcBwOMQc6PdFDc4|16-821-608-1166|ests sleep quickly express ideas. ironic ideas haggle about the final T +9508.37|Supplier#000000070|FRANCE|17268|Manufacturer#4|INWNH2w,OOWgNDq0BRCcBwOMQc6PdFDc4|16-821-608-1166|ests sleep quickly express ideas. ironic ideas haggle about the final T +9453.01|Supplier#000000802|ROMANIA|10021|Manufacturer#5|,6HYXb4uaHITmtMBj4Ak57Pd|29-342-882-6463|gular frets. permanently special multipliers believe blithely alongs +9453.01|Supplier#000000802|ROMANIA|13275|Manufacturer#4|,6HYXb4uaHITmtMBj4Ak57Pd|29-342-882-6463|gular frets. permanently special multipliers believe blithely alongs +9192.10|Supplier#000000115|UNITED KINGDOM|13325|Manufacturer#1|nJ 2t0f7Ve,wL1,6WzGBJLNBUCKlsV|33-597-248-1220|es across the carefully express accounts boost caref +9032.15|Supplier#000000959|GERMANY|4958|Manufacturer#4|8grA EHBnwOZhO|17-108-642-3106|nding dependencies nag furiou +8702.02|Supplier#000000333|RUSSIA|11810|Manufacturer#3|MaVf XgwPdkiX4nfJGOis8Uu2zKiIZH|32-508-202-6136|oss the deposits cajole carefully even pinto beans. regular foxes detect alo +8615.50|Supplier#000000812|FRANCE|10551|Manufacturer#2|8qh4tezyScl5bidLAysvutB,,ZI2dn6xP|16-585-724-6633|y quickly regular deposits? quickly pending packages after the caref +8615.50|Supplier#000000812|FRANCE|13811|Manufacturer#4|8qh4tezyScl5bidLAysvutB,,ZI2dn6xP|16-585-724-6633|y quickly regular deposits? quickly pending packages after the caref +8488.53|Supplier#000000367|RUSSIA|6854|Manufacturer#4|E Sv9brQVf43Mzz|32-458-198-9557|ages. carefully final excuses nag finally. carefully ironic deposits abov +8430.52|Supplier#000000646|FRANCE|11384|Manufacturer#3|IUzsmT,2oBgjhWP2TlXTL6IkJH,4h,1SJRt|16-601-220-5489|ites among the always final ideas kindle according to the theodolites. notornis in +8271.39|Supplier#000000146|RUSSIA|4637|Manufacturer#5|rBDNgCr04x0sfdzD5,gFOutCiG2|32-792-619-3155|s cajole quickly special requests. quickly enticing theodolites h +8096.98|Supplier#000000574|RUSSIA|323|Manufacturer#4|2O8 sy9g2mlBOuEjzj0pA2pevk,|32-866-246-8752|ully after the regular requests. slyly final dependencies wake slyly along the busy deposit +7392.78|Supplier#000000170|UNITED KINGDOM|7655|Manufacturer#2|RtsXQ,SunkA XHy9|33-803-340-5398|ake carefully across the quickly +7205.20|Supplier#000000477|GERMANY|10956|Manufacturer#5|VtaNKN5Mqui5yh7j2ldd5waf|17-180-144-7991|excuses wake express deposits. furiously careful asymptotes according to the carefull +6820.35|Supplier#000000007|UNITED KINGDOM|13217|Manufacturer#5|s,4TicNGB4uO6PaSqNBUq|33-990-965-2201|s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit +6721.70|Supplier#000000954|FRANCE|4191|Manufacturer#3|P3O5p UFz1QsLmZX|16-537-341-8517|ect blithely blithely final acco +6329.90|Supplier#000000996|GERMANY|10735|Manufacturer#2|Wx4dQwOAwWjfSCGupfrM|17-447-811-3282|ironic forges cajole blithely agai +6173.87|Supplier#000000408|RUSSIA|18139|Manufacturer#1|qcor1u,vJXAokjnL5,dilyYNmh|32-858-724-2950|blithely pending packages cajole furiously slyly pending notornis. slyly final +5364.99|Supplier#000000785|RUSSIA|13784|Manufacturer#4|W VkHBpQyD3qjQjWGpWicOpmILFehmEdWy67kUGY|32-297-653-2203|packages boost carefully. express ideas along +5069.27|Supplier#000000328|GERMANY|16327|Manufacturer#1|SMm24d WG62|17-231-513-5721|he unusual ideas. slyly final packages a +4941.88|Supplier#000000321|ROMANIA|7320|Manufacturer#5|pLngFl5yeMcHyov|29-573-279-1406|y final requests impress s +4672.25|Supplier#000000239|RUSSIA|12238|Manufacturer#1|XO101kgHrJagK2FL1U6QCaTE ncCsMbeuTgK6o8|32-396-654-6826|arls wake furiously deposits. even, regular depen +4586.49|Supplier#000000680|RUSSIA|5679|Manufacturer#3|UhvDfdEfJh,Qbe7VZb8uSGO2TU 0jEa6nXZXE|32-522-382-1620|the regularly regular dependencies. carefully bold excuses under th +4518.31|Supplier#000000149|FRANCE|18344|Manufacturer#5|pVyWsjOidpHKp4NfKU4yLeym|16-660-553-2456|ts detect along the foxes. final Tiresias are. idly pending deposits haggle; even, blithe pin +4315.15|Supplier#000000509|FRANCE|18972|Manufacturer#2|SF7dR8V5pK|16-298-154-3365|ronic orbits are furiously across the requests. quickly express ideas across the special, bold +3526.53|Supplier#000000553|FRANCE|8036|Manufacturer#4|a,liVofXbCJ|16-599-552-3755|lar dinos nag slyly brave +3526.53|Supplier#000000553|FRANCE|17018|Manufacturer#3|a,liVofXbCJ|16-599-552-3755|lar dinos nag slyly brave +3294.68|Supplier#000000350|GERMANY|4841|Manufacturer#4|KIFxV73eovmwhh|17-113-181-4017|e slyly special foxes. furiously unusual deposits detect carefully carefully ruthless foxes. quick +2972.26|Supplier#000000016|RUSSIA|1015|Manufacturer#4|YjP5C55zHDXL7LalK27zfQnwejdpin4AMpvh|32-822-502-4215|ously express ideas haggle quickly dugouts? fu +2963.09|Supplier#000000840|ROMANIA|3080|Manufacturer#2|iYzUIypKhC0Y|29-781-337-5584|eep blithely regular dependencies. blithely regular platelets sublate alongside o +2221.25|Supplier#000000771|ROMANIA|13981|Manufacturer#2|lwZ I15rq9kmZXUNhl|29-986-304-9006|nal foxes eat slyly about the fluffily permanent id +1381.97|Supplier#000000104|FRANCE|18103|Manufacturer#3|Dcl4yGrzqv3OPeRO49bKh78XmQEDR7PBXIs0m|16-434-972-6922|gular ideas. bravely bold deposits haggle through the carefully final deposits. slyly unusual idea +906.07|Supplier#000000138|ROMANIA|8363|Manufacturer#4|utbplAm g7RmxVfYoNdhcrQGWuzRqPe0qHSwbKw|29-533-434-6776|ickly unusual requests cajole. accounts above the furiously special excuses +765.69|Supplier#000000799|RUSSIA|11276|Manufacturer#2|jwFN7ZB3T9sMF|32-579-339-1495|nusual requests. furiously unusual epitaphs integrate. slyly +727.89|Supplier#000000470|ROMANIA|6213|Manufacturer#3|XckbzsAgBLbUkdfjgJEPjmUMTM8ebSMEvI|29-165-289-1523|gular excuses. furiously regular excuses sleep slyly caref +683.07|Supplier#000000651|RUSSIA|4888|Manufacturer#4|oWekiBV6s,1g|32-181-426-4490|ly regular requests cajole abou +167.56|Supplier#000000290|FRANCE|2037|Manufacturer#1|6Bk06GVtwZaKqg01|16-675-286-5102|the theodolites. ironic, ironic deposits above +91.39|Supplier#000000949|UNITED KINGDOM|9430|Manufacturer#2|a,UE,6nRVl2fCphkOoetR1ajIzAEJ1Aa1G1HV|33-332-697-2768|pinto beans. carefully express requests hagg +-314.06|Supplier#000000510|ROMANIA|17242|Manufacturer#4|VmXQl ,vY8JiEseo8Mv4zscvNCfsY|29-207-852-3454|bold deposits. carefully even d +-820.89|Supplier#000000409|GERMANY|2156|Manufacturer#5|LyXUYFz7aXrvy65kKAbTatGzGS,NDBcdtD|17-719-517-9836|y final, slow theodolites. furiously regular req +-845.44|Supplier#000000704|ROMANIA|9926|Manufacturer#5|hQvlBqbqqnA5Dgo1BffRBX78tkkRu|29-300-896-5991|ctions. carefully sly requ +-942.73|Supplier#000000563|GERMANY|5797|Manufacturer#1|Rc7U1cRUhYs03JD|17-108-537-2691|slyly furiously final decoys; silent, special realms poach f diff --git a/test/src/test/resources/tpch/sf0.1/q20.csv b/test/src/test/resources/tpch/sf0.1/q20.csv index f1f9843c2e..72e0cad14e 100644 --- a/test/src/test/resources/tpch/sf0.1/q20.csv +++ b/test/src/test/resources/tpch/sf0.1/q20.csv @@ -1,10 +1,10 @@ s_name|s_address -Supplier#000000157|1EmkCApL5iF -Supplier#000000197|3oYqODDUGH3XsHXmPuzYHW5NLU3,ONZl -Supplier#000000287|UQR8bUA4V2HxVbw9K -Supplier#000000378|mLPJtpu4wOc cSFzBR -Supplier#000000530|0BvoewCPg2scOEfuL93FRKqSxHmdhw1 -Supplier#000000555|8Lp0QWPLFXrJrX1sTWkAEdzUsh5ke -Supplier#000000557|IH,v63JRgXMkVhJOJ Gxur0W -Supplier#000000729|CAOGYCBtTVT7aB1p6qHbxF6VVhXaHLgTpI -Supplier#000000935|JHRSOterYgt4MTNo7cupTzA,6MoNw 4 +Supplier#000000157|,mEGorBfVIm +Supplier#000000197|YC2Acon6kjY3zj3Fbxs2k4Vdf7X0cd2F +Supplier#000000287|7a9SP7qW5Yku5PvSg +Supplier#000000378|FfbhyCxWvcPrO8ltp9 +Supplier#000000530|0qwCMwobKY OcmLyfRXlagA8ukENJv, +Supplier#000000555|TfB,a5bfl3Ah 3Z 74GqnNs6zKVGM +Supplier#000000557|jj0wUYh9K3fG5Jhdhrkuy ,4 +Supplier#000000729|pqck2ppy758TQpZCUAjPvlU55K3QjfL7Bi +Supplier#000000935|ij98czM 2KzWe7dDTOxB8sq0UfCdvrX diff --git a/test/src/test/resources/tpch/sf0.1/q22.csv b/test/src/test/resources/tpch/sf0.1/q22.csv new file mode 100644 index 0000000000..d345246838 --- /dev/null +++ b/test/src/test/resources/tpch/sf0.1/q22.csv @@ -0,0 +1,8 @@ +cntrycode|numcust|totacctbal +13|94|714035.05 +17|96|722560.15 +18|99|738012.52 +23|93|708285.25 +29|85|632693.46 +30|87|646748.02 +31|87|647372.50 \ No newline at end of file diff --git a/test/src/test/resources/tpch/sf0.1/q7.csv b/test/src/test/resources/tpch/sf0.1/q7.csv new file mode 100644 index 0000000000..adce33e9f2 --- /dev/null +++ b/test/src/test/resources/tpch/sf0.1/q7.csv @@ -0,0 +1,5 @@ +supp_nation|cust_nation|l_year|revenue +FRANCE|GERMANY|1995|4637235.1501 +FRANCE|GERMANY|1996|5224779.5736 +GERMANY|FRANCE|1995|6232818.7037 +GERMANY|FRANCE|1996|5557312.1121 \ No newline at end of file diff --git a/test/src/test/resources/tpch/sf0.1/q8.csv b/test/src/test/resources/tpch/sf0.1/q8.csv new file mode 100644 index 0000000000..3d7360a6b8 --- /dev/null +++ b/test/src/test/resources/tpch/sf0.1/q8.csv @@ -0,0 +1,3 @@ +o_year|mkt_share +1995|0.028648741305617557 +1996|0.018250279107962147 \ No newline at end of file