diff --git a/sqrl-planner/sqrl-common/src/main/java/com/datasqrl/calcite/SqrlFramework.java b/sqrl-planner/sqrl-common/src/main/java/com/datasqrl/calcite/SqrlFramework.java index ce30e5559..f6b2e49bc 100644 --- a/sqrl-planner/sqrl-common/src/main/java/com/datasqrl/calcite/SqrlFramework.java +++ b/sqrl-planner/sqrl-common/src/main/java/com/datasqrl/calcite/SqrlFramework.java @@ -29,6 +29,7 @@ public class SqrlFramework { private RelMetadataProvider relMetadataProvider; private AtomicInteger uniqueMacroInt = new AtomicInteger(0); private AtomicInteger uniqueTableInt = new AtomicInteger(0); + private Map tableNameToIdMap = new HashMap<>(); private AtomicInteger uniqueColumnInt = new AtomicInteger(0); private Map tableNameShadowing = new HashMap(); diff --git a/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/CalciteTableFactory.java b/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/CalciteTableFactory.java index efb52b184..879f82720 100644 --- a/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/CalciteTableFactory.java +++ b/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/CalciteTableFactory.java @@ -29,7 +29,7 @@ public class CalciteTableFactory { @Inject public CalciteTableFactory(SqrlFramework framework) { - this.tableIdFactory = new TableIdFactory(framework.getUniqueTableInt()); + this.tableIdFactory = new TableIdFactory(framework.getTableNameToIdMap()); this.tableConverter = new TableConverter(framework.getTypeFactory(), framework.getNameCanonicalizer()); } public CalciteTableFactory(TableIdFactory tableIdFactory, TableConverter tableConverter) { @@ -39,13 +39,13 @@ public CalciteTableFactory(TableIdFactory tableIdFactory, TableConverter tableCo public ImportedRelationalTableImpl createImportedTable(RelDataType rootType, TableSource tableSource, Name tableName) { - Name importName = tableIdFactory.createImportTableId(tableName); + Name importName = tableIdFactory.createTableId(tableName); return new ImportedRelationalTableImpl(importName, rootType, tableSource); } public ProxyImportRelationalTable createProxyTable(RelDataType rootType, UniversalTable rootTable, ImportedRelationalTableImpl importedTable) { - Name proxyName = tableIdFactory.createQueryTableId(rootTable.getName()); + Name proxyName = tableIdFactory.createTableId(rootTable.getName()); TimestampInference tsInference = getTimestampInference(rootTable); return new ProxyImportRelationalTable( proxyName, @@ -58,7 +58,7 @@ public ProxyImportRelationalTable createProxyTable(RelDataType rootType, Univers } public PhysicalRelationalTable createPhysicalRelTable(Name name, LPAnalysis analyzedLP) { - Name tableId = tableIdFactory.createQueryTableId(name); + Name tableId = tableIdFactory.createTableId(name); return new QueryRelationalTable(tableId, name, analyzedLP); } diff --git a/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/TableIdFactory.java b/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/TableIdFactory.java index 6526222a2..eb6bd359f 100644 --- a/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/TableIdFactory.java +++ b/sqrl-planner/sqrl-planner-local/src/main/java/com/datasqrl/plan/table/TableIdFactory.java @@ -1,6 +1,7 @@ package com.datasqrl.plan.table; import com.datasqrl.canonicalizer.Name; +import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import lombok.AllArgsConstructor; import lombok.NonNull; @@ -8,7 +9,7 @@ @AllArgsConstructor public class TableIdFactory { - AtomicInteger uniqueTableId; + private Map tableNameToIdMap; public Name createTableId(@NonNull Name name) { return createTableId(name, null); @@ -18,14 +19,7 @@ public Name createTableId(@NonNull Name name, String type) { if (!StringUtils.isEmpty(type)) { name = name.suffix(type); } - return name.suffix(Integer.toString(uniqueTableId.incrementAndGet())); - } - - public Name createImportTableId(Name name) { - return createTableId(name, "i"); - } - - public Name createQueryTableId(Name name) { - return createTableId(name, "q"); + AtomicInteger counter = tableNameToIdMap.computeIfAbsent(name, k -> new AtomicInteger(0)); + return name.suffix(Integer.toString(counter.incrementAndGet())); } } diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest1.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest1.txt index c1091202c..9c39bc780 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest1.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest1.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$4 +>>>x$1 LogicalProject(_uuid=[$0], productid=[$2], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest2.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest2.txt index 97808417f..60be1e3d9 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest2.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/absoluteTest2.txt @@ -1,10 +1,10 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], discount=[$10], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/accessTableFunctionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/accessTableFunctionTest.txt index 6fc0ce2ac..ef8163a27 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/accessTableFunctionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/accessTableFunctionTest.txt @@ -1,14 +1,14 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5]) LogicalFilter(condition=[=($2, ?0)]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne.txt index bd941e656..b68648b10 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne.txt @@ -1,18 +1,18 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>stats$q$7 +>>>stats$1 LogicalProject(___uuid$pk$1=[$0], num=[$2], total=[$3], time=[$1]) LogicalAggregate(group=[{0, 4}], num=[COUNT()], total=[SUM($10)]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>x$q$10 +>>>x$1 LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], num=[$7], time=[$4]) LogicalJoin(condition=[AND(=($0, $6), =($9, $4))], joinType=[left]) - LogicalTableScan(table=[[orders$q$2]]) - LogicalTableScan(table=[[stats$q$7]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[stats$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne2.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne2.txt index bd941e656..b68648b10 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne2.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/aggregateIsToOne2.txt @@ -1,18 +1,18 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>stats$q$7 +>>>stats$1 LogicalProject(___uuid$pk$1=[$0], num=[$2], total=[$3], time=[$1]) LogicalAggregate(group=[{0, 4}], num=[COUNT()], total=[SUM($10)]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>x$q$10 +>>>x$1 LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], num=[$7], time=[$4]) LogicalJoin(condition=[AND(=($0, $6), =($9, $4))], joinType=[left]) - LogicalTableScan(table=[[orders$q$2]]) - LogicalTableScan(table=[[stats$q$7]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[stats$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/assignmentHintTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/assignmentHintTest.txt index b06afdd79..cc26da71c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/assignmentHintTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/assignmentHintTest.txt @@ -1,10 +1,10 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/caseWhenTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/caseWhenTest.txt index f057a246c..cd426271c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/caseWhenTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/caseWhenTest.txt @@ -1,17 +1,17 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>customernames$q$13 +>>>customernames$1 LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4], EXPR$7=[CASE(IS NULL($10), 0:DOUBLE, $10)]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castExpression.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castExpression.txt index 3e54a8010..ecb484eb9 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castExpression.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castExpression.txt @@ -1,4 +1,4 @@ ->>>orders$q$2 +>>>orders$2 LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], x=['1':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"]) - LogicalTableScan(table=[[orders$i$1]]) + LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castTest.txt index 915343eb8..341a88758 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/castTest.txt @@ -1,23 +1,23 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$11 +>>>x$1 +LogicalProject(_uuid=[$0], cast1=['1':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], time=[$4]) + LogicalTableScan(table=[[orders$2]]) + +>>>x$2 +LogicalProject(_uuid=[$0], cast2=[false], time=[$4]) + LogicalTableScan(table=[[orders$2]]) + +>>>x$3 LogicalProject(_uuid=[$0], cast3=[1:DOUBLE], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>x$q$13 +>>>x$4 LogicalProject(_uuid=[$0], cast4=[1:BIGINT], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>x$q$15 +>>>x$5 LogicalProject(_uuid=[$0], cast5=[1970-01-01 00:00:00.001:TIMESTAMP_WITH_LOCAL_TIME_ZONE(3)], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) - ->>>x$q$7 -LogicalProject(_uuid=[$0], cast1=['1':VARCHAR(2147483647) CHARACTER SET "UTF-16LE"], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) - ->>>x$q$9 -LogicalProject(_uuid=[$0], cast2=[false], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/categoryTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/categoryTest.txt index 8215fe65a..a3ddd0ab0 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/categoryTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/categoryTest.txt @@ -1,13 +1,13 @@ ->>>category$q$13 +>>>category$1 LogicalProject(name=[$5], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/coalesceTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/coalesceTest.txt index 8ee6a5fcf..1785ba8e8 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/coalesceTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/coalesceTest.txt @@ -1,3 +1,3 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/compoundJoinDeclarations.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/compoundJoinDeclarations.txt index 1b7ea0df7..5ec4a0a51 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/compoundJoinDeclarations.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/compoundJoinDeclarations.txt @@ -1,3 +1,3 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/computeTableFunctionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/computeTableFunctionTest.txt index 323fba88d..90ec113b0 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/computeTableFunctionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/computeTableFunctionTest.txt @@ -1,14 +1,14 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], x=[1]) LogicalFilter(condition=[=($2, ?0)]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/countFncTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/countFncTest.txt index 11133ec5f..a2d2456f4 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/countFncTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/countFncTest.txt @@ -1,13 +1,13 @@ ->>>entries_2$q$7 +>>>entries_2$1 LogicalProject(___uuid$pk$1=[$0], discount=[$1], cnt=[$3], time=[$2]) LogicalAggregate(group=[{0, 1, 4}], cnt=[COUNT()]) LogicalProject(___uuid$pk$1=[$0], discount=[COALESCE($10, 0:DOUBLE)], _idx=[$6], _ingest_time=[$1], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/crossJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/crossJoinTest.txt index 426fb4796..55b180a88 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/crossJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/crossJoinTest.txt @@ -1,12 +1,12 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$5 +>>>product2$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _uuid00=[$12], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], _ingest_time0=[$13], productid0=[$14], name0=[$15], description0=[$16], category0=[$17], __timestamp19=[CASE(<($1, $18), $18, $1)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], _uuid0=[$6], _ingest_time0=[$7], productid0=[$8], name0=[$9], description0=[$10], category0=[$11], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[=($2, $8)], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerDistinctTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerDistinctTest.txt index e3b0a74cc..feb51f2d8 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerDistinctTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerDistinctTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$13 -LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$2]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$3 +LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) + LogicalTableScan(table=[[customer$2]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerOrdersTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerOrdersTest.txt index 8931d8e95..4f35c7900 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerOrdersTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerOrdersTest.txt @@ -1,19 +1,19 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$14 +>>>product$3 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], _uuid=[$11], _ingest_time=[$12], productid=[$13], name=[$14], description=[$15], category=[$16], __timestamp=[CASE(<($4, $12), $12, $4)]) LogicalJoin(condition=[=($13, $7)], joinType=[inner]) LogicalCorrelate(correlation=[$cor3], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor3.entries]) LogicalValues(tuples=[[{ 0 }]]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerRecentProductsTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerRecentProductsTest.txt index dd44e6adf..6d0bd076d 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerRecentProductsTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerRecentProductsTest.txt @@ -1,23 +1,23 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$14 +>>>product$3 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], _uuid=[$11], _ingest_time=[$12], productid=[$13], name=[$14], description=[$15], category=[$16], __timestamp=[CASE(<($4, $12), $12, $4)]) LogicalJoin(condition=[=($13, $7)], joinType=[inner]) LogicalCorrelate(correlation=[$cor10], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor10.entries]) LogicalValues(tuples=[[{ 0 }]]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) ->>>recent_products$q$17 +>>>recent_products$1 LogicalProject(___uuid$pk$3=[$0], productid=[$1], category=[$2], quantity=[$3], num_orders=[$4], __timestamp=[$5]) LogicalAggregate(group=[{0, 1, 2}], quantity=[SUM($3)], num_orders=[COUNT()], __timestamp=[MAX($7)]) LogicalProject(___uuid$pk$3=[$6], productid=[$19], category=[COALESCE($32, '')], quantity=[$20], _uuid=[$0], _idx=[$18], _uuid1=[$27], __timestamp35=[CASE(<($24, $33), $33, $24)], ___uuid$pk$1=[$25], ___idx$pk$2=[$26], _rownum=[$34]) @@ -25,16 +25,16 @@ LogicalProject(___uuid$pk$3=[$0], productid=[$1], category=[$2], quantity=[$3], LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _uuid0=[$6], _ingest_time0=[$7], customerid0=[$8], email=[$9], name=[$10], lastUpdated=[$11], _uuid00=[$12], _ingest_time00=[$13], id0=[$14], customerid00=[$15], time0=[$16], entries0=[$17], _idx=[$18], productid=[$19], quantity=[$20], unit_price=[$21], discount=[$22], __timestamp=[$23], __timestamp24=[CASE(<($4, $23), $23, $4)]) LogicalJoin(condition=[=($12, $0)], joinType=[inner]) LogicalFilter(condition=[<(NOW(), +($4, 31536000000:INTERVAL SECOND(11)))]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], _uuid0=[$6], _ingest_time0=[$7], id=[$8], customerid0=[$9], time=[$10], entries=[$11], _idx=[$12], productid=[$13], quantity=[$14], unit_price=[$15], discount=[$16], __timestamp=[CASE(<($1, $10), $10, $1)]) LogicalJoin(condition=[=($2, $9)], joinType=[inner]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) LogicalCorrelate(correlation=[$cor12], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor12.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalFilter(condition=[=($9, 1)]) LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$1], _uuid=[$2], _ingest_time=[$3], productid=[$4], name=[$5], description=[$6], category=[$7], __timestamp=[$8], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0, $1)]) - LogicalTableScan(table=[[product$q$14]]) + LogicalTableScan(table=[[product$3]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerTest.txt index 7ff7ac7b3..643c0f4e5 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerWithPurchaseTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerWithPurchaseTest.txt index f88027728..53fe9ba46 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerWithPurchaseTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/customerWithPurchaseTest.txt @@ -1,22 +1,22 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>customerwithpurchase$q$13 +>>>customerwithpurchase$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[=($2, $6)], joinType=[inner]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) LogicalFilter(condition=[=($2, 1)]) LogicalProject($f0=[$0], time=[$1], _rownum=[ROW_NUMBER() OVER (ORDER BY $1 DESC NULLS LAST)]) LogicalProject($f0=[SINGLE_VALUE($3) IGNORE NULLS OVER (ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/differentGroupByFromSelectOrderTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/differentGroupByFromSelectOrderTest.txt index 8767675ac..182a4d12c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/differentGroupByFromSelectOrderTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/differentGroupByFromSelectOrderTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(description=[$3], name=[$4], MAX=[MAX($2) IGNORE NULLS OVER (PARTITION BY $3, $4 ORDER BY $1 ROWS UNBOUNDED PRECEDING)], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpression2Test.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpression2Test.txt index c03e43015..71b1d60e1 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpression2Test.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpression2Test.txt @@ -1,9 +1,9 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product2$q$7 +>>>product2$1 LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], customerid=[$3], time=[$4], entries=[$5]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $4 DESC NULLS LAST)]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionAliasTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionAliasTest.txt index f68e2c550..6610b7d43 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionAliasTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionAliasTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(pid=[/($2, 10)], _uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionTest.txt index f68e2c550..6610b7d43 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctOnWithExpressionTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(pid=[/($2, 10)], _uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctSingleColumnTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctSingleColumnTest.txt index 5d22351e8..56c7ec9e3 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctSingleColumnTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctSingleColumnTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(productid=[$2], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctStarTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctStarTest.txt index 3fa359db3..d6e436658 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctStarTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/distinctStarTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/duplicateImportTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/duplicateImportTest.txt index 0eccc6f12..882586241 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/duplicateImportTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/duplicateImportTest.txt @@ -1,6 +1,6 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$5 -LogicalTableScan(table=[[product$i$4]]) +>>>product$4 +LogicalTableScan(table=[[product$3]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/expressionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/expressionTest.txt index 42b5cb609..a673ca1ab 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/expressionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/expressionTest.txt @@ -1,4 +1,4 @@ ->>>product$q$2 +>>>product$2 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], descriptionLength=[CHAR_LENGTH($4)]) - LogicalTableScan(table=[[product$i$1]]) + LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/groupTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/groupTest.txt index 3546383c1..4e6ca0994 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/groupTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/groupTest.txt @@ -1,11 +1,11 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(gp=[$0], min_price=[$2], time=[$1]) LogicalAggregate(group=[{0, 4}], min_price=[MIN($9)]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import1.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import1.txt index 8ee6a5fcf..1785ba8e8 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import1.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import1.txt @@ -1,3 +1,3 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import2.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import2.txt index 7e4162b81..216fa2ecb 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import2.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import2.txt @@ -1,9 +1,9 @@ ->>>customer$q$11 -LogicalTableScan(table=[[customer$i$10]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import3.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import3.txt index 9480aba34..090535b35 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import3.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/import3.txt @@ -1,3 +1,3 @@ ->>>o$q$2 -LogicalTableScan(table=[[o$i$1]]) +>>>o$2 +LogicalTableScan(table=[[o$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importAllTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importAllTest.txt index 7e4162b81..216fa2ecb 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importAllTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importAllTest.txt @@ -1,9 +1,9 @@ ->>>customer$q$11 -LogicalTableScan(table=[[customer$i$10]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importDuplicateAliasTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importDuplicateAliasTest.txt index 0eccc6f12..882586241 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importDuplicateAliasTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importDuplicateAliasTest.txt @@ -1,6 +1,6 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$5 -LogicalTableScan(table=[[product$i$4]]) +>>>product$4 +LogicalTableScan(table=[[product$3]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestamp.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestamp.txt index 029f826d4..276926510 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestamp.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestamp.txt @@ -1,4 +1,4 @@ ->>>customer$q$2 +>>>customer$2 LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], c_ts=[$1]) - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestampAndAlias.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestampAndAlias.txt index 402b8dfb3..38da8c889 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestampAndAlias.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/importWithTimestampAndAlias.txt @@ -1,4 +1,4 @@ ->>>c2$q$2 +>>>c2$2 LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], c_ts=[$1]) - LogicalTableScan(table=[[c2$i$1]]) + LogicalTableScan(table=[[c2$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/inlinePathMultiplicityTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/inlinePathMultiplicityTest.txt index 015734312..3fd34c045 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/inlinePathMultiplicityTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/inlinePathMultiplicityTest.txt @@ -1,27 +1,27 @@ ->>>joindeclaration$q$6 +>>>joindeclaration$1 LogicalProject(__productid$pk$1=[$0], productid=[$7], _uuid=[$8], _ingest_time=[$9], name=[$10], description=[$11], category=[$12], __timestamp=[CASE(<($2, $9), $9, $2)]) LogicalJoin(condition=[=($0, $7)], joinType=[inner]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[product$q$4]]) + LogicalTableScan(table=[[product$3]]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[product$q$4]]) + LogicalTableScan(table=[[product$3]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$4 +>>>product$3 LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product2$q$9 +>>>product2$1 LogicalProject(productid0=[$0], productid=[$8], __timestamp16=[CASE(<($2, $14), $14, $2)], __productid$pk$1=[$7], _rownum0=[$15]) LogicalJoin(condition=[=($0, $7)], joinType=[left]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[product$q$4]]) + LogicalTableScan(table=[[product$3]]) LogicalFilter(condition=[=($8, 1)]) LogicalProject(__productid$pk$1=[$0], productid=[$1], _uuid=[$2], _ingest_time=[$3], name=[$4], description=[$5], category=[$6], __timestamp=[$7], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0)]) - LogicalTableScan(table=[[joindeclaration$q$6]]) + LogicalTableScan(table=[[joindeclaration$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinDiscountTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinDiscountTest.txt index 8f64bf286..fc648fca6 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinDiscountTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinDiscountTest.txt @@ -1,29 +1,29 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], _uuid0=[$11], _idx0=[$17], _uuid00=[$22], _idx00=[$28], discount=[$10], __timestamp34=[CASE(<($4, $33), $33, $4)]) LogicalJoin(condition=[true], joinType=[inner]) LogicalCorrelate(correlation=[$cor14], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor14.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], _uuid0=[$11], _ingest_time0=[$12], id0=[$13], customerid0=[$14], time0=[$15], entries0=[$16], _idx0=[$17], productid0=[$18], quantity0=[$19], unit_price0=[$20], discount0=[$21], __timestamp=[CASE(<($4, $15), $15, $4)]) LogicalJoin(condition=[true], joinType=[inner]) LogicalCorrelate(correlation=[$cor10], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor10.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalCorrelate(correlation=[$cor12], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor12.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTest.txt index c70ca1869..37d286610 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTest.txt @@ -1,18 +1,18 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], _idx0=[$11], _idx1=[$16], discount=[$15], discount0=[$20], time=[$4]) LogicalCorrelate(correlation=[$cor15], joinType=[inner], requiredColumns=[{5}]) LogicalCorrelate(correlation=[$cor13], joinType=[inner], requiredColumns=[{5}]) LogicalCorrelate(correlation=[$cor11], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor11.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTimeTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTimeTest.txt index 0b3454838..9fe487379 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTimeTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/innerJoinTimeTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], time1=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoinTest.txt index 11f2cafb3..c9a0cf5fa 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoinTest.txt @@ -1,12 +1,12 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$8 -LogicalTableScan(table=[[product$i$7]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$10 +>>>x$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], _ingest_time0=[$7], id=[$8], customerid=[$9], time=[$10], entries=[$11]) LogicalJoin(condition=[AND(>($7, $1), <($7, +($1, 31504464000:INTERVAL SECOND(11))))], joinType=[inner]) - LogicalTableScan(table=[[product$q$8]]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoins.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoins.txt index 285d355cd..b06479dae 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoins.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalJoins.txt @@ -1,27 +1,27 @@ ->>>customer$q$11 -LogicalTableScan(table=[[customer$i$10]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>customerorders1$q$13 +>>>customerorders1$1 LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], _ingest_time0=[$7]) LogicalJoin(condition=[AND(<($1, $7), <($7, +($1, 31504464000:INTERVAL SECOND(11))))], joinType=[inner]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$11]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customerorders1$q$17 +>>>customerorders1$2 LogicalProject(_uuid=[$0], ouuid=[COALESCE($6, '')], id=[$8], name=[$4], _ingest_time=[$1]) LogicalJoin(condition=[AND(<($7, $1), <($1, +($7, 31504464000:INTERVAL SECOND(11))))], joinType=[left]) - LogicalTableScan(table=[[customer$q$11]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[customer$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>customerorders2$q$15 +>>>customerorders2$1 LogicalProject(_uuid=[$0], cuuid=[COALESCE($6, '')], id=[$2], name=[$10], _ingest_time=[$1]) LogicalJoin(condition=[AND(<($1, $7), <($7, +($1, 31504464000:INTERVAL SECOND(11))))], joinType=[left]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$11]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest.txt index cdd9770d7..a8c436bcf 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(_uuid=[$0], x=[+($1, 7200000:INTERVAL HOUR(1))], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest2.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest2.txt index 9b2aafb95..e8199aac7 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest2.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalSecondTest2.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(_uuid=[$0], x=[+($1, 60000:INTERVAL SECOND(2))], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalTest.txt index f41d76254..b65504c6f 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/intervalTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(_uuid=[$0], x=[+($1, 172800000:INTERVAL DAY(1))], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedAggregateNoGroupTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedAggregateNoGroupTest.txt index 27647e5ab..ff6001757 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedAggregateNoGroupTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedAggregateNoGroupTest.txt @@ -1,12 +1,12 @@ ->>>entries_2$q$7 +>>>entries_2$1 LogicalProject(___uuid$pk$1=[$0], cnt=[$2], time=[$1]) LogicalAggregate(group=[{0, 4}], cnt=[COUNT()]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedCrossJoinQueryTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedCrossJoinQueryTest.txt index 3d7103a28..24a6ccc51 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedCrossJoinQueryTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedCrossJoinQueryTest.txt @@ -1,9 +1,9 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>productcopy$q$4 +>>>productcopy$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], _ingest_time0=[$7], productid0=[$8], name0=[$9], description0=[$10], category0=[$11], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedGroupByTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedGroupByTest.txt index 11133ec5f..a2d2456f4 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedGroupByTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedGroupByTest.txt @@ -1,13 +1,13 @@ ->>>entries_2$q$7 +>>>entries_2$1 LogicalProject(___uuid$pk$1=[$0], discount=[$1], cnt=[$3], time=[$2]) LogicalAggregate(group=[{0, 1, 4}], cnt=[COUNT()]) LogicalProject(___uuid$pk$1=[$0], discount=[COALESCE($10, 0:DOUBLE)], _idx=[$6], _ingest_time=[$1], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedPathsTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedPathsTest.txt index d53a75468..a508402ab 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedPathsTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedPathsTest.txt @@ -1,16 +1,16 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], discount=[$10], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedSelfJoinQueryTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedSelfJoinQueryTest.txt index bc10127ff..683e235ca 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedSelfJoinQueryTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedSelfJoinQueryTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>productself$q$4 +>>>productself$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedUnionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedUnionTest.txt index 34f463248..171d2d832 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedUnionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/nestedUnionTest.txt @@ -1,9 +1,9 @@ ->>>p2$q$4 +>>>p2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) LogicalUnion(all=[true]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/noPathOrderByTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/noPathOrderByTest.txt index b06afdd79..cc26da71c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/noPathOrderByTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/noPathOrderByTest.txt @@ -1,10 +1,10 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/normalJoins.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/normalJoins.txt index b9ff5b80f..7e214f685 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/normalJoins.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/normalJoins.txt @@ -1,27 +1,27 @@ ->>>customer$q$11 -LogicalTableScan(table=[[customer$i$10]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>customerorders1$q$13 +>>>customerorders1$1 LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[inner]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$11]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customerorders2$q$15 +>>>customerorders2$1 LogicalProject(_uuid=[$0], cuuid=[COALESCE($6, '')], id=[$2], name=[$10], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[left]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$11]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customerorders3$q$17 +>>>customerorders3$1 LogicalProject(_uuid=[$0], ouuid=[COALESCE($6, '')], id=[$8], name=[$4], __timestamp=[CASE(<($1, $10), $10, $1)]) LogicalJoin(condition=[=($9, $2)], joinType=[left]) - LogicalTableScan(table=[[customer$q$11]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[customer$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderCoalesceTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderCoalesceTest.txt index fe106b808..3a565e0ec 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderCoalesceTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderCoalesceTest.txt @@ -1,17 +1,17 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>discount0$q$13 +>>>discount0$1 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], discount=[COALESCE($10, 0.0:DOUBLE)], time=[$4]) LogicalCorrelate(correlation=[$cor1], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor1.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderDiscountDescTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderDiscountDescTest.txt index 61836281d..9d6681d69 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderDiscountDescTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderDiscountDescTest.txt @@ -1,16 +1,16 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentCustomerTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentCustomerTest.txt index 015632279..29133a781 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentCustomerTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentCustomerTest.txt @@ -1,17 +1,17 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>d$q$13 +>>>d$1 LogicalProject(_uuid0=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], time=[$4], _ingest_time=[$1], id=[$2], customerid=[$3], entries=[$5]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountConditionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountConditionTest.txt index 21ecd3135..8fb27453c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountConditionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountConditionTest.txt @@ -1,16 +1,16 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], id=[$2], discount=[$10], time=[$4]) LogicalCorrelate(correlation=[$cor2], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor2.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountTest.txt index 21ecd3135..8fb27453c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdDiscountTest.txt @@ -1,16 +1,16 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], id=[$2], discount=[$10], time=[$4]) LogicalCorrelate(correlation=[$cor2], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor2.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdTest.txt index 04b7bc22e..57f9de9fe 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderParentIdTest.txt @@ -1,17 +1,17 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>d$q$13 +>>>d$1 LogicalProject(_uuid=[$0], _idx=[$6], id=[$2], time=[$4]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderSelectTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderSelectTest.txt index 10aab24df..366e6aae4 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderSelectTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderSelectTest.txt @@ -1,15 +1,15 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>o2$q$13 +>>>o2$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], __timestamp=[CASE(<($4, $10), $10, $4)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsNestedTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsNestedTest.txt index 8e1397888..bc6277d73 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsNestedTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsNestedTest.txt @@ -1,19 +1,19 @@ ->>>_stats$q$13 +>>>_stats$1 LogicalProject(___uuid$pk$1=[$0], total=[$2], total_savings=[$3], total_entries=[$4], time=[$1]) LogicalAggregate(group=[{0, 5}], total=[SUM($1)], total_savings=[SUM($2)], total_entries=[COUNT()]) LogicalProject(___uuid$pk$1=[$0], $f1=[-(*($8, $9), $10)], discount=[$10], _idx=[$6], _ingest_time=[$1], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsTest.txt index 8e1397888..bc6277d73 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderStatsTest.txt @@ -1,19 +1,19 @@ ->>>_stats$q$13 +>>>_stats$1 LogicalProject(___uuid$pk$1=[$0], total=[$2], total_savings=[$3], total_entries=[$4], time=[$1]) LogicalAggregate(group=[{0, 5}], total=[SUM($1)], total_savings=[SUM($2)], total_entries=[COUNT()]) LogicalProject(___uuid$pk$1=[$0], $f1=[-(*($8, $9), $10)], discount=[$10], _idx=[$6], _ingest_time=[$1], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTest.txt index 82c9d4a60..01bc900c0 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTest.txt @@ -1,11 +1,11 @@ ->>>ordered_entries$q$7 +>>>ordered_entries$1 LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTotalTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTotalTest.txt index 3f7541eb7..09f512e59 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTotalTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orderTotalTest.txt @@ -1,16 +1,16 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>total$q$13 +>>>total$1 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], total=[-(*($8, $9), $10)], time=[$4]) LogicalCorrelate(correlation=[$cor1], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor1.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders2Test.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders2Test.txt index 513175994..535e12d0a 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders2Test.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders2Test.txt @@ -1,22 +1,22 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>orders2$q$16 +>>>orders2$1 LogicalProject(_uuid=[$0], _idx=[$6], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) LogicalCorrelate(correlation=[$cor12], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor12.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders3$q$13 +>>>orders3$1 LogicalProject(_uuid=[$0], _idx=[$6], _idx0=[$11], productid=[$12], quantity=[$13], unit_price=[$14], discount=[$15], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor16], joinType=[inner], requiredColumns=[{5}]) LogicalCorrelate(correlation=[$cor14], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor14.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -24,6 +24,6 @@ LogicalProject(_uuid=[$0], _idx=[$6], _idx0=[$11], productid=[$12], quantity=[$1 LogicalProject($f0=[$cor16.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders3Test.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders3Test.txt index f0db32fad..b21e71cc0 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders3Test.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/orders3Test.txt @@ -1,14 +1,14 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>orders3$q$13 +>>>orders3$1 LogicalProject(_uuid=[$0], _idx=[$6], _idx0=[$11], productid=[$12], quantity=[$13], unit_price=[$14], discount=[$15], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor10], joinType=[inner], requiredColumns=[{5}]) LogicalCorrelate(correlation=[$cor8], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor8.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -16,6 +16,6 @@ LogicalProject(_uuid=[$0], _idx=[$6], _idx0=[$11], productid=[$12], quantity=[$1 LogicalProject($f0=[$cor10.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesDiscountTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesDiscountTest.txt index faf6f7b2c..216fa2ecb 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesDiscountTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesDiscountTest.txt @@ -1,9 +1,9 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesProductTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesProductTest.txt index 6d7e5f673..673fcacf3 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesProductTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesProductTest.txt @@ -1,19 +1,19 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>dproduct$q$14 +>>>dproduct$1 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], name=[$16], __timestamp=[CASE(<($4, $12), $12, $4)]) LogicalJoin(condition=[=($7, $13)], joinType=[inner]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesTest.txt index 8e4875f01..0bc559958 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesTest.txt @@ -1,17 +1,17 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>entries2$q$13 +>>>entries2$1 LogicalProject(___uuid$pk$1=[$0], _idx=[$6], id=[$2], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesXTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesXTest.txt index e05f77541..72f712045 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesXTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersEntriesXTest.txt @@ -1,25 +1,25 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>dproduct$q$16 +>>>dproduct$1 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], unit_price=[$9], category=[$16], name=[$14], time=[$4]) LogicalJoin(condition=[=($7, $11)], joinType=[left]) LogicalCorrelate(correlation=[$cor2], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor2.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[product$q$13]]) + LogicalTableScan(table=[[product$3]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$13 +>>>product$3 LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersNewIdTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersNewIdTest.txt index 9aa23389e..94829335b 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersNewIdTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersNewIdTest.txt @@ -1,15 +1,15 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>newid$q$13 +>>>newid$1 LogicalProject(___uuid$pk$1=[$0], _uuid0=[$6], EXPR$1=[NOW()], EXPR$2=[parseTimestamp(timestampToString(epochToTimestamp(100:BIGINT)))], __timestamp=[CASE(<($4, $10), $10, $4)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersTest.txt index 9b6e7abb0..41746841e 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersUUIDTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersUUIDTest.txt index 60c2feef2..0eb474302 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersUUIDTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersUUIDTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>o2$q$13 +>>>o2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersXTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersXTest.txt index a878023c4..95c8c2692 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersXTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/ordersXTest.txt @@ -1,15 +1,15 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _ingest_time0=[$7], productid=[$8], name=[$9], description=[$10], category=[$11], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest.txt index fdafbf4c6..ce8bc1c75 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest.txt @@ -1,19 +1,19 @@ ->>>newproduct$q$11 +>>>newproduct$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _idx=[$12], customerid=[$21], __timestamp24=[CASE(<($17, $22), $22, $17)]) LogicalJoin(condition=[=($6, $18)], joinType=[left]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], _uuid0=[$6], _ingest_time0=[$7], id=[$8], customerid=[$9], time=[$10], entries=[$11], _idx=[$12], productid0=[$13], quantity=[$14], unit_price=[$15], discount=[$16], __timestamp=[CASE(<($1, $10), $10, $1)]) LogicalJoin(condition=[=($2, $13)], joinType=[inner]) - LogicalTableScan(table=[[product$q$8]]) + LogicalTableScan(table=[[product$2]]) LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$8 -LogicalTableScan(table=[[product$i$7]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest2.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest2.txt index 62d08d563..366f275c6 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest2.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/parentTest2.txt @@ -1,16 +1,16 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/pathTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/pathTest.txt index e3cb557ae..6811a88b7 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/pathTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/pathTest.txt @@ -1,10 +1,10 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productIntervalTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productIntervalTest.txt index a2c10064a..ccb160b15 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productIntervalTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productIntervalTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$13 +>>>product2$1 LogicalProject(_uuid=[$0], x=[+($1, 31536000000:INTERVAL DAY(3))], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productJoinTest.txt index 458808865..4f35c7900 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productJoinTest.txt @@ -1,19 +1,19 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$13 +>>>product$3 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], _uuid=[$11], _ingest_time=[$12], productid=[$13], name=[$14], description=[$15], category=[$16], __timestamp=[CASE(<($4, $12), $12, $4)]) LogicalJoin(condition=[=($13, $7)], joinType=[inner]) LogicalCorrelate(correlation=[$cor3], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor3.entries]) LogicalValues(tuples=[[{ 0 }]]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productTest.txt index 1b688046d..374acdf2f 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/productTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionSameNamedTest4.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionSameNamedTest4.txt index 9b5724132..ce60cee57 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionSameNamedTest4.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionSameNamedTest4.txt @@ -1,9 +1,9 @@ ->>>example$q$4 +>>>example$1 LogicalProject(___uuid$pk$1=[$0], example=[$2], _ingest_time=[$1]) LogicalFilter(condition=[>($2, 10)]) LogicalAggregate(group=[{0, 1}], example=[SUM($2)]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest.txt index 6c8fd8945..7a5b9bbbb 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest.txt @@ -1,8 +1,8 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>total$q$4 +>>>total$1 LogicalProject(___uuid$pk$1=[$0], sum=[-($2, 1)], _ingest_time=[$1]) LogicalAggregate(group=[{0, 1}], agg#0=[SUM($2)]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest2.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest2.txt index 263898452..7ba747826 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest2.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionTest2.txt @@ -1,7 +1,7 @@ ->>>example$q$4 +>>>example$1 LogicalProject(___uuid$pk$1=[$0], productid=[$2], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionUnnamedTest3.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionUnnamedTest3.txt index c008472ea..290642bfa 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionUnnamedTest3.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryAsExpressionUnnamedTest3.txt @@ -1,9 +1,9 @@ ->>>example$q$4 +>>>example$1 LogicalProject(___uuid$pk$1=[$0], _uuid0=[$6], pid=[+($2, 1)], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryNotAsExpressionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryNotAsExpressionTest.txt index dc19a5d66..3e18b0d1c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryNotAsExpressionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/queryNotAsExpressionTest.txt @@ -1,9 +1,9 @@ ->>>example$q$4 +>>>example$1 LogicalProject(___uuid$pk$1=[$0], _uuid0=[$6], productid=[$8], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest1.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest1.txt index 870df840c..1c9173efc 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest1.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest1.txt @@ -1,11 +1,11 @@ ->>>d2$q$7 +>>>d2$1 LogicalProject(___uuid$pk$1=[$0], ___idx$pk$2=[$6], discount=[$10], time=[$4]) LogicalCorrelate(correlation=[$cor1], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor1.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest2.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest2.txt index e12f10d17..c1bc7bb95 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest2.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/relativeTest2.txt @@ -1,10 +1,10 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(___uuid$pk$1=[$0], _idx=[$6], discount=[$10], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceJoinDeclarationTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceJoinDeclarationTest.txt index 1b7ea0df7..5ec4a0a51 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceJoinDeclarationTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceJoinDeclarationTest.txt @@ -1,3 +1,3 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceRelationshipTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceRelationshipTest.txt index 1b7ea0df7..5ec4a0a51 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceRelationshipTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/replaceRelationshipTest.txt @@ -1,3 +1,3 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectListHintTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectListHintTest.txt index b06afdd79..cc26da71c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectListHintTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectListHintTest.txt @@ -1,10 +1,10 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectStarQueryTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectStarQueryTest.txt index e0a8a6c40..19365e154 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectStarQueryTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/selectStarQueryTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>productcopy$q$4 +>>>productcopy$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/shadowUuidTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/shadowUuidTest.txt index ef4583954..1523bfc40 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/shadowUuidTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/shadowUuidTest.txt @@ -1,15 +1,15 @@ ->>>nested$q$4 +>>>nested$1 LogicalProject(___uuid$pk$1=[$0], _uuid=[$6], _ingest_time=[$7], productid=[$8], name=[$9], description=[$10], category=[$11], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$7 +>>>x$1 LogicalProject(_uuid=[$0], _uuid0=[$7], __timestamp14=[CASE(<($1, $13), $13, $1)]) LogicalJoin(condition=[=($0, $6)], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[nested$q$4]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[nested$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/starAliasPrefixTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/starAliasPrefixTest.txt index c476b40c0..b45790b54 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/starAliasPrefixTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/starAliasPrefixTest.txt @@ -1,9 +1,9 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$4 +>>>x$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/streamTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/streamTest.txt index 5249d56be..18c5c8dab 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/streamTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/streamTest.txt @@ -1,14 +1,14 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>x$q$6 +>>>x$1 LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], _uuid0=[$3], _ingest_time=[$4], email=[$5], name=[$6], lastUpdated=[$7]) LogicalStream(stream=[ADD]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[y$q$4]]) + LogicalTableScan(table=[[y$1]]) ->>>y$q$4 +>>>y$1 LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLibTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLibTest.txt index b15c1d7e6..8f5fc9902 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLibTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLibTest.txt @@ -1,13 +1,13 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$11 -LogicalTableScan(table=[[product$i$10]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>x$q$13 +>>>x$1 LogicalProject(_uuid=[$0], b64Name=[TO_BASE64($3)], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLiteral.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLiteral.txt index a20703b0b..ecb786761 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLiteral.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/stringLiteral.txt @@ -1,4 +1,4 @@ ->>>product$q$2 +>>>product$2 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], url=['test']) - LogicalTableScan(table=[[product$i$1]]) + LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryExpressionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryExpressionTest.txt index 146668ff5..2ae740825 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryExpressionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryExpressionTest.txt @@ -1,12 +1,12 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$5 +>>>product2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[=($2, $6)], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) LogicalFilter(condition=[=($2, 1)]) LogicalProject($f0=[$0], _ingest_time=[$1], _rownum=[ROW_NUMBER() OVER (ORDER BY $1 DESC NULLS LAST)]) LogicalProject($f0=[SINGLE_VALUE($2) IGNORE NULLS OVER (ORDER BY $1 ROWS UNBOUNDED PRECEDING)], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryTest.txt index 7578a8e09..5297a6874 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/subQueryTest.txt @@ -1,12 +1,12 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$5 +>>>product2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], min=[$6]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) LogicalFilter(condition=[=($2, 1)]) LogicalProject(min=[$0], _ingest_time=[$1], _rownum=[ROW_NUMBER() OVER (ORDER BY $1 DESC NULLS LAST)]) LogicalProject(min=[MIN($2) IGNORE NULLS OVER (ORDER BY $1 ROWS UNBOUNDED PRECEDING)], _ingest_time=[$1]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/tablePathTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/tablePathTest.txt index dfe2448e6..af804b2ad 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/tablePathTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/tablePathTest.txt @@ -1,9 +1,9 @@ ->>>newproduct$q$5 +>>>newproduct$1 LogicalProject(_uuid=[$0], _uuid0=[$6], _ingest_time=[$7], productid=[$8], name=[$9], description=[$10], category=[$11], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[=($2, $8)], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/temporalJoins.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/temporalJoins.txt index c1e5e06fa..90c9db165 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/temporalJoins.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/temporalJoins.txt @@ -1,37 +1,37 @@ ->>>customer$q$11 -LogicalTableScan(table=[[customer$i$10]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>customer$q$13 +>>>customer$3 LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$11]]) + LogicalTableScan(table=[[customer$2]]) ->>>customerorders$q$15 +>>>customerorders$1 LogicalProject(_uuid=[$0], id=[$2], name=[$10], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[inner]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>customerorders$q$17 +>>>customerorders$2 LogicalProject(_uuid=[$0], id=[$2], name=[$10], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[left]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>customerorders$q$19 +>>>customerorders$3 LogicalProject(_uuid=[$0], id=[$2], name=[$10], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[left]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>orders$q$5 -LogicalTableScan(table=[[orders$i$4]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testJoinDeclaration.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testJoinDeclaration.txt index 604235755..ee5a6d0c0 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testJoinDeclaration.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testJoinDeclaration.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$4 +>>>product$3 LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testOrderedJoinDeclaration.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testOrderedJoinDeclaration.txt index 604235755..ee5a6d0c0 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testOrderedJoinDeclaration.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/testOrderedJoinDeclaration.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product$q$4 +>>>product$3 LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampAliasTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampAliasTest.txt index 9480aba34..090535b35 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampAliasTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampAliasTest.txt @@ -1,3 +1,3 @@ ->>>o$q$2 -LogicalTableScan(table=[[o$i$1]]) +>>>o$2 +LogicalTableScan(table=[[o$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampTest.txt index 8ee6a5fcf..1785ba8e8 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/timestampTest.txt @@ -1,3 +1,3 @@ ->>>orders$q$2 -LogicalTableScan(table=[[orders$i$1]]) +>>>orders$2 +LogicalTableScan(table=[[orders$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/topNTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/topNTest.txt index 93ee50563..c2e9db2c7 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/topNTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/topNTest.txt @@ -1,9 +1,9 @@ ->>>nested$q$4 +>>>nested$1 LogicalProject(___uuid$pk$1=[$0], _uuid=[$6], _ingest_time=[$7], productid=[$8], name=[$9], description=[$10], category=[$11], __timestamp=[CASE(<($1, $7), $7, $1)]) LogicalJoin(condition=[true], joinType=[inner]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionAllTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionAllTest.txt index e59c0dd59..c97d21acf 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionAllTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionAllTest.txt @@ -1,9 +1,9 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) LogicalUnion(all=[true]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionTest.txt index e59c0dd59..c97d21acf 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/unionTest.txt @@ -1,9 +1,9 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) LogicalUnion(all=[true]) - LogicalTableScan(table=[[product$q$2]]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/uniqueOrderByTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/uniqueOrderByTest.txt index 536ab110c..d2d1a0955 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/uniqueOrderByTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/uniqueOrderByTest.txt @@ -1,7 +1,7 @@ ->>>product$q$2 -LogicalTableScan(table=[[product$i$1]]) +>>>product$2 +LogicalTableScan(table=[[product$1]]) ->>>product2$q$4 +>>>product2$1 LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], EXPR$6=[/($2, 10)]) - LogicalTableScan(table=[[product$q$2]]) + LogicalTableScan(table=[[product$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/validateMultiplePKWarning.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/validateMultiplePKWarning.txt index ec2d6287d..5a03b1b95 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/validateMultiplePKWarning.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/QuerySnapshotTest/validateMultiplePKWarning.txt @@ -1,9 +1,9 @@ ->>>customer$q$2 -LogicalTableScan(table=[[customer$i$1]]) +>>>customer$2 +LogicalTableScan(table=[[customer$1]]) ->>>customer2$q$4 +>>>customer2$1 LogicalProject(id1=[$0], id2=[$0], newid=[+($2, 5)], _ingest_time=[$1]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) >>>warnings [WARN] The primary key is mapped to multiple columns in SELECT: [$0, $0, +($2, 5)] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/addingSimpleColumns.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/addingSimpleColumns.txt index 6a0850bec..cfd97e30e 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/addingSimpleColumns.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/addingSimpleColumns.txt @@ -1,18 +1,18 @@ ->>>orders$q$2-lp-STREAM +>>>orders$2-lp-STREAM LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], col1=[/(+($2, $3), 2)]) hints[WatermarkHint options:[4]] - LogicalTableScan(table=[[orders$i$1]]) + LogicalTableScan(table=[[orders$1]]) ->>>orderentry$q$7-lp-STREAM +>>>orderentry$1-lp-STREAM LogicalProject(_uuid=[$0], _idx=[$7], col1=[$6], time=[$4], productid=[$8], discount2=[COALESCE($11, 0.0:DOUBLE)], _ingest_time=[$1]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orderentry$q$7-lp-DATABASE +>>>orderentry$1-lp-DATABASE LogicalProject(_uuid=[$0], _idx=[$8], col1=[$6], time=[$4], productid=[$9], discount2=[$13], _ingest_time=[$1]) LogicalJoin(condition=[=($0, $7)], joinType=[inner]) - LogicalTableScan(table=[[orders$q$2]]) - LogicalTableScan(table=[[entries$3]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[entries$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/aggregateWithMaxTimestamp.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/aggregateWithMaxTimestamp.txt index 4f0cdc7b5..8ab17e57c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/aggregateWithMaxTimestamp.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/aggregateWithMaxTimestamp.txt @@ -1,42 +1,42 @@ ->>>orderagg1$q$18-lp-STREAM +>>>orderagg1$1-lp-STREAM LogicalProject(customerid=[$3], count=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg1$q$18-lp-DATABASE +>>>orderagg1$1-lp-DATABASE LogicalProject(customerid=[$0], count=[$1], time=[$2]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], count=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], count=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg2$q$20-lp-STREAM +>>>orderagg2$1-lp-STREAM LogicalProject(customerid=[$3], timestamp=[MAX($4) IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], count=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg2$q$20-lp-DATABASE +>>>orderagg2$1-lp-DATABASE LogicalProject(customerid=[$0], timestamp=[$1], count=[$2]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], timestamp=[$1], count=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) LogicalProject(customerid=[$3], timestamp=[MAX($4) IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], count=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg3$q$22-lp-STREAM +>>>orderagg3$1-lp-STREAM LogicalProject(customerid=[$0], count=[$1], __timestamp=[$2]) LogicalAggregate(group=[{3}], count=[COUNT()], __timestamp=[MAX($4)]) - LogicalTableScan(table=[[ordersstate$q$13]]) + LogicalTableScan(table=[[ordersstate$1]]) ->>>orderagg3$q$22-lp-DATABASE +>>>orderagg3$1-lp-DATABASE LogicalProject(customerid=[$0], count=[$1], __timestamp=[$2]) LogicalAggregate(group=[{3}], count=[COUNT()], __timestamp=[MAX($4)]) - LogicalTableScan(table=[[ordersstate$q$13]]) + LogicalTableScan(table=[[ordersstate$1]]) ->>>orderagg4$q$24-lp-STREAM +>>>orderagg4$1-lp-STREAM LogicalProject(customerid=[$0], timestamp=[$1], count=[$2]) LogicalAggregate(group=[{3}], timestamp=[MAX($4)], count=[COUNT()]) - LogicalTableScan(table=[[ordersstate$q$13]]) + LogicalTableScan(table=[[ordersstate$1]]) ->>>orderagg4$q$24-lp-DATABASE +>>>orderagg4$1-lp-DATABASE LogicalProject(customerid=[$0], timestamp=[$1], count=[$2]) LogicalAggregate(group=[{3}], timestamp=[MAX($4)], count=[COUNT()]) - LogicalTableScan(table=[[ordersstate$q$13]]) + LogicalTableScan(table=[[ordersstate$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/convert2StreamTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/convert2StreamTest.txt index a08922028..6021a442b 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/convert2StreamTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/convert2StreamTest.txt @@ -1,36 +1,36 @@ ->>>productcount$q$12-lp-STREAM +>>>productcount$1-lp-STREAM LogicalProject(productid=[$11], name=[$14], quantity=[SUM($8) IGNORE NULLS OVER (PARTITION BY $11, $14 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[=($7, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) - LogicalTableScan(table=[[product$q$10]]) + LogicalTableScan(table=[[product$3]]) ->>>productcount$q$12-lp-DATABASE +>>>productcount$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>countstream$q$14-lp-STREAM +>>>countstream$1-lp-STREAM LogicalProject(_uuid=[$0], _source_time=[$1], productid=[$2], name=[$3], quantity=[$4]) LogicalStream(stream=[ADD]) LogicalFilter(condition=[>($2, 1)]) LogicalFilter(condition=[=($4, 1)]) hints[DedupHint] LogicalProject(productid=[$0], name=[$1], quantity=[$2], time=[$3], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0, $1 ORDER BY $3 DESC NULLS LAST)]) - LogicalTableScan(table=[[productcount$q$12]]) + LogicalTableScan(table=[[productcount$1]]) ->>>countstream$q$14-lp-DATABASE +>>>countstream$1-lp-DATABASE Stage [database] does not support capabilities: [TO_STREAM] ->>>productcount2$q$16-lp-STREAM +>>>productcount2$1-lp-STREAM LogicalProject(productid=[$2], _uuid=[$0], _source_time=[$1], name=[$3], quantity=[$4]) - LogicalTableScan(table=[[countstream$q$14]]) + LogicalTableScan(table=[[countstream$1]]) ->>>productcount2$q$16-lp-DATABASE +>>>productcount2$1-lp-DATABASE LogicalProject(productid=[$2], _uuid=[$0], _source_time=[$1], name=[$3], quantity=[$4]) LogicalFilter(condition=[=($5, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _source_time=[$1], productid=[$2], name=[$3], quantity=[$4], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $1 DESC NULLS LAST)]) - LogicalTableScan(table=[[countstream$q$14]]) + LogicalTableScan(table=[[countstream$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/distinctTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/distinctTest.txt index 889dee5c7..c32f66f54 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/distinctTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/distinctTest.txt @@ -1,12 +1,12 @@ ->>>orders$q$13-lp-STREAM +>>>orders$3-lp-STREAM LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], customerid=[$3], time=[$4], entries=[$5]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $4 DESC NULLS LAST)]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orders$q$13-lp-DATABASE +>>>orders$3-lp-DATABASE LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], customerid=[$3], time=[$4], entries=[$5]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $4 DESC NULLS LAST)]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/exportStreamTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/exportStreamTest.txt index 441498327..84259c907 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/exportStreamTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/exportStreamTest.txt @@ -1,11 +1,11 @@ ->>>countstream$q$13-lp-STREAM +>>>countstream$1-lp-STREAM LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], num_orders=[$3]) LogicalStream(stream=[ADD]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], num_orders=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>countstream$q$13-lp-DATABASE +>>>countstream$1-lp-DATABASE Stage [database] does not support capabilities: [TO_STREAM] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nestedAggregationAndSelfJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nestedAggregationAndSelfJoinTest.txt index a73dd436a..5fbc054a8 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nestedAggregationAndSelfJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nestedAggregationAndSelfJoinTest.txt @@ -1,43 +1,43 @@ ->>>total$q$12-lp-STREAM +>>>total$1-lp-STREAM LogicalProject(___uuid$pk$1=[$0], price=[$2], num=[$3], discount=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($1)], num=[COUNT()], discount=[SUM($2)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(___uuid$pk$1=[$0], $f1=[-(*($8, $9), $10)], discount=[$10], _idx=[$6], time=[$4]) LogicalCorrelate(correlation=[$cor5], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor5.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>total$q$12-lp-DATABASE +>>>total$1-lp-DATABASE LogicalProject(___uuid$pk$1=[$0], price=[$2], num=[$3], discount=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($1)], num=[COUNT()], discount=[SUM($2)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(___uuid$pk$1=[$0], $f1=[-(*($9, $10), $11)], discount=[$11], _idx=[$7], time=[$4]) LogicalJoin(condition=[=($0, $6)], joinType=[inner]) - LogicalTableScan(table=[[orders$q$2]]) - LogicalTableScan(table=[[entries$3]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[entries$1]]) ->>>ordersinline$q$15-lp-STREAM +>>>ordersinline$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], time=[$4], price=[$7], num=[$8]) LogicalJoin(condition=[AND(=($0, $6), =($10, $4))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$q$2]]) - LogicalTableScan(table=[[total$q$12]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[total$1]]) ->>>ordersinline$q$15-lp-DATABASE +>>>ordersinline$1-lp-DATABASE LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], time=[$4], price=[$7], num=[$8]) LogicalJoin(condition=[AND(=($0, $6), =($10, $4))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$q$2]]) - LogicalTableScan(table=[[total$q$12]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[total$1]]) ->>>orders_by_day$q$17-lp-STREAM +>>>orders_by_day$1-lp-STREAM LogicalProject(__customerid$pk$2=[$0], day=[$1], total_price=[$2], total_num=[$3]) LogicalAggregate(group=[{0, 1}], total_price=[SUM($2)], total_num=[SUM($3)]) hints[TumbleAggregationHint options:[1, FUNCTION, 3, 86400000, 0]] LogicalProject(__customerid$pk$2=[$6], day=[endOfDay($3)], price=[$4], num=[$5], _uuid=[$0]) LogicalJoin(condition=[=($2, $6)], joinType=[inner]) hints[TemporalJoinHint options:[3, 2, 0]] - LogicalTableScan(table=[[ordersinline$q$15]]) + LogicalTableScan(table=[[ordersinline$1]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$10]]) + LogicalTableScan(table=[[customer$3]]) ->>>orders_by_day$q$17-lp-DATABASE +>>>orders_by_day$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTest.txt index 1f8fb58d9..78ea68b7d 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTest.txt @@ -1,42 +1,42 @@ ->>>ordernow1$q$13-lp-STREAM +>>>ordernow1$1-lp-STREAM LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 86400000, 0]] LogicalProject(customer=[$3], bucket=[endOfDay($4)], _uuid=[$0]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordernow1$q$13-lp-DATABASE +>>>ordernow1$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] ->>>ordernow2$q$15-lp-STREAM +>>>ordernow2$1-lp-STREAM LogicalProject(bucket=[$0], order_count=[$1]) LogicalAggregate(group=[{0}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[0, FUNCTION, 4, 86400000, 0]] LogicalProject(bucket=[endOfDay($4)], _uuid=[$0]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordernow2$q$15-lp-DATABASE +>>>ordernow2$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] ->>>ordernow3$q$17-lp-STREAM +>>>ordernow3$1-lp-STREAM LogicalProject(customer=[$0], order_count=[$2], time=[$1]) LogicalAggregate(group=[{3, 4}], order_count=[COUNT()]) hints[SlidingAggregationHint options:[4, 691200000, 13824000]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordernow3$q$17-lp-DATABASE +>>>ordernow3$1-lp-DATABASE LogicalProject(customer=[$0], order_count=[$1], time=[$2]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], order_count=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], order_count=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalFilter(condition=[<(NOW(), +($4, 691200000:INTERVAL SECOND(9)))]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderaugment$q$19-lp-STREAM +>>>orderaugment$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], time=[$4], order_count=[$7]) LogicalJoin(condition=[=($3, $6)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customer=[$0], order_count=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[ordernow3$q$17]]) + LogicalTableScan(table=[[ordernow3$1]]) ->>>orderaugment$q$19-lp-DATABASE +>>>orderaugment$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTestWOGroupBY.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTestWOGroupBY.txt index 3bb1cd175..c89d38038 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTestWOGroupBY.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowAggregateTestWOGroupBY.txt @@ -1,20 +1,20 @@ ->>>recenttotal$q$13-lp-STREAM +>>>recenttotal$1-lp-STREAM LogicalProject(_pk=[1], total=[$1], quantity=[$2], time=[$0]) LogicalAggregate(group=[{4}], total=[SUM($0)], quantity=[SUM($1)]) hints[SlidingAggregationHint options:[4, 604800000, 12096000]] LogicalProject($f0=[*($9, $8)], quantity=[$8], _uuid=[$0], _idx=[$6], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>recenttotal$q$13-lp-DATABASE +>>>recenttotal$1-lp-DATABASE LogicalProject(_pk=[1], total=[$0], quantity=[$1], time=[$2]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(total=[$0], quantity=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (ORDER BY $2 DESC NULLS LAST)]) LogicalProject(total=[SUM(*($10, $9)) IGNORE NULLS OVER (ORDER BY $4 ROWS UNBOUNDED PRECEDING)], quantity=[SUM($9) IGNORE NULLS OVER (ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[=($0, $6)], joinType=[inner]) LogicalFilter(condition=[<(NOW(), +($4, 604800000:INTERVAL SECOND(9)))]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[entries$6]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[entries$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowFilterTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowFilterTest.txt index 65fdb45a9..82c786e75 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowFilterTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/nowFilterTest.txt @@ -1,27 +1,27 @@ ->>>orderfilter$q$13-lp-STREAM +>>>orderfilter$1-lp-STREAM LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderfilter$q$13-lp-DATABASE +>>>orderfilter$1-lp-DATABASE LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) LogicalFilter(condition=[<(NOW(), +($4, 86400000:INTERVAL SECOND(8)))]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg1$q$18-lp-STREAM +>>>orderagg1$1-lp-STREAM LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 1000, 0]] LogicalProject(customer=[$3], bucket=[endOfSecond($4)], _uuid=[$0]) - LogicalTableScan(table=[[orderfilter$q$13]]) + LogicalTableScan(table=[[orderfilter$1]]) ->>>orderagg1$q$18-lp-DATABASE +>>>orderagg1$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] ->>>orderagg2$q$20-lp-STREAM +>>>orderagg2$1-lp-STREAM LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 1000, 0]] LogicalProject(customer=[$3], bucket=[endOfSecond($4)], _uuid=[$0]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg2$q$20-lp-DATABASE +>>>orderagg2$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/partitionSelectDistinctTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/partitionSelectDistinctTest.txt index 35f51670e..70e4f6aaa 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/partitionSelectDistinctTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/partitionSelectDistinctTest.txt @@ -1,35 +1,35 @@ ->>>customer$q$13-lp-STREAM +>>>customer$3-lp-STREAM LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customer$q$13-lp-DATABASE +>>>customer$3-lp-DATABASE LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $1 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>orders$q$5-lp-STREAM -LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] +>>>orders$2-lp-STREAM +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>distinctorders$q$15-lp-STREAM +>>>distinctorders$1-lp-STREAM LogicalProject(__customerid$pk$1=[$6], id=[$2], time=[$4]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>distinctorders$q$15-lp-DATABASE +>>>distinctorders$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>distinctorderstime$q$18-lp-STREAM +>>>distinctorderstime$1-lp-STREAM LogicalProject(__customerid$pk$2=[$6], id=[$2], time=[$4]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>distinctorderstime$q$18-lp-DATABASE +>>>distinctorderstime$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctNestedTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctNestedTest.txt index 221afc1ec..a21c4e219 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctNestedTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctNestedTest.txt @@ -1,46 +1,46 @@ ->>>productid$q$13-lp-STREAM +>>>productid$1-lp-STREAM LogicalProject(productid=[$7], time=[$4]) LogicalCorrelate(correlation=[$cor16], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor16.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>productid$q$13-lp-DATABASE +>>>productid$1-lp-DATABASE LogicalProject(productid=[$8], time=[$4]) LogicalFilter(condition=[=($13, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _uuid0=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], __timestamp=[$12], _rownum=[ROW_NUMBER() OVER (PARTITION BY $8 ORDER BY $4 DESC NULLS LAST)]) LogicalJoin(condition=[=($0, $6)], joinType=[inner]) - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[entries$6]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[entries$1]]) ->>>productorders$q$15-lp-STREAM +>>>productorders$1-lp-STREAM LogicalProject(_uuid=[$0], _idx=[$6], id=[$2], productid=[$11], time=[$4]) LogicalJoin(condition=[=($7, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 1, 0]] LogicalCorrelate(correlation=[$cor18], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor18.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(productid=[$0], time=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) - LogicalTableScan(table=[[productid$q$13]]) + LogicalTableScan(table=[[productid$1]]) ->>>productorders$q$15-lp-DATABASE +>>>productorders$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>suborders$q$17-lp-STREAM +>>>suborders$1-lp-STREAM LogicalProject(__productid$pk$1=[$2], orderid=[$11], numOrders=[COUNT() IGNORE NULLS OVER (PARTITION BY $2, $11 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], lastOrder=[MAX($4) IGNORE NULLS OVER (PARTITION BY $2, $11 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) LogicalJoin(condition=[=($7, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 1, 0]] LogicalCorrelate(correlation=[$cor20], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor20.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(productid=[$0], time=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) - LogicalTableScan(table=[[productid$q$13]]) + LogicalTableScan(table=[[productid$1]]) ->>>suborders$q$17-lp-DATABASE +>>>suborders$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctTest.txt index 50f23cfd9..ed9537161 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selectDistinctTest.txt @@ -1,21 +1,21 @@ ->>>customerid$q$13-lp-STREAM +>>>customerid$1-lp-STREAM LogicalProject(customerid=[$2], _ingest_time=[$1]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customerid$q$13-lp-DATABASE +>>>customerid$1-lp-DATABASE LogicalProject(customerid=[$2], _ingest_time=[$1]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $1 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customerorders$q$15-lp-STREAM +>>>customerorders$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], customerid=[$6], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[inner]) hints[TemporalJoinHint options:[4, 1, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _ingest_time=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) - LogicalTableScan(table=[[customerid$q$13]]) + LogicalTableScan(table=[[customerid$1]]) ->>>customerorders$q$15-lp-DATABASE +>>>customerorders$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selfJoinSubqueryTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selfJoinSubqueryTest.txt index 252b46ade..4796c8e35 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selfJoinSubqueryTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/selfJoinSubqueryTest.txt @@ -1,8 +1,8 @@ ->>>orders2$q$13-lp-STREAM +>>>orders2$1-lp-STREAM LogicalProject(_uuid=[$0], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orders2$q$13-lp-DATABASE +>>>orders2$1-lp-DATABASE LogicalProject(_uuid=[$0], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamAggregateTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamAggregateTest.txt index ebb84c4b5..60185df6c 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamAggregateTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamAggregateTest.txt @@ -1,22 +1,22 @@ ->>>orderagg1$q$13-lp-STREAM +>>>orderagg1$1-lp-STREAM LogicalProject(customer=[$3], order_count=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg1$q$13-lp-DATABASE +>>>orderagg1$1-lp-DATABASE LogicalProject(customer=[$0], order_count=[$1], time=[$2]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], order_count=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], order_count=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg2$q$15-lp-STREAM +>>>orderagg2$1-lp-STREAM LogicalProject(_pk=[1], order_count=[COUNT() IGNORE NULLS OVER (ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>orderagg2$q$15-lp-DATABASE +>>>orderagg2$1-lp-DATABASE LogicalProject(_pk=[1], order_count=[$0], time=[$1]) LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(order_count=[$0], time=[$1], _rownum=[ROW_NUMBER() OVER (ORDER BY $1 DESC NULLS LAST)]) LogicalProject(order_count=[COUNT() IGNORE NULLS OVER (ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamStateAggregateTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamStateAggregateTest.txt index bd3b11d09..9771662a0 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamStateAggregateTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamStateAggregateTest.txt @@ -1,10 +1,10 @@ ->>>agg1$q$15-lp-STREAM +>>>agg1$1-lp-STREAM LogicalProject(customer=[$0], order_count=[$1], __timestamp=[$2]) LogicalAggregate(group=[{4}], order_count=[COUNT()], __timestamp=[MAX($5)]) - LogicalTableScan(table=[[ordercustomer$q$13]]) + LogicalTableScan(table=[[ordercustomer$1]]) ->>>agg1$q$15-lp-DATABASE +>>>agg1$1-lp-DATABASE LogicalProject(customer=[$0], order_count=[$1], __timestamp=[$2]) LogicalAggregate(group=[{4}], order_count=[COUNT()], __timestamp=[MAX($5)]) - LogicalTableScan(table=[[ordercustomer$q$13]]) + LogicalTableScan(table=[[ordercustomer$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamTimeAggregateTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamTimeAggregateTest.txt index 348609a43..ea0f2bc49 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamTimeAggregateTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/streamTimeAggregateTest.txt @@ -1,27 +1,27 @@ ->>>ordertime1$q$13-lp-STREAM +>>>ordertime1$1-lp-STREAM LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 1000, 0]] LogicalProject(customer=[$3], bucket=[endOfSecond($4)], _uuid=[$0]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordertime1$q$13-lp-DATABASE +>>>ordertime1$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] ->>>ordertime2$q$15-lp-STREAM +>>>ordertime2$1-lp-STREAM LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 60000, 15000]] LogicalProject(customer=[$3], bucket=[endOfMinute($4, 1:BIGINT, 15:BIGINT)], _uuid=[$0]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordertime2$q$15-lp-DATABASE +>>>ordertime2$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] ->>>ordertime3$q$17-lp-STREAM +>>>ordertime3$1-lp-STREAM LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 18000000, 1800000]] LogicalProject(customer=[$3], bucket=[endOfHour($4, 5:BIGINT, 30:BIGINT)], _uuid=[$0]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordertime3$q$17-lp-DATABASE +>>>ordertime3$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableDefinitionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableDefinitionTest.txt index 7cc353339..dd80590be 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableDefinitionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableDefinitionTest.txt @@ -1,14 +1,14 @@ ->>>entrycount$q$7-lp-STREAM +>>>entrycount$1-lp-STREAM LogicalProject(_uuid=[$0], _idx=[$6], price=[-(*($8, $9), $10)], time=[$4]) LogicalCorrelate(correlation=[$cor4], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) Uncollect LogicalProject($f0=[$cor4.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>entrycount$q$7-lp-DATABASE +>>>entrycount$1-lp-DATABASE LogicalProject(_uuid=[$0], _idx=[$7], price=[-(*($9, $10), $11)], time=[$4]) LogicalJoin(condition=[=($0, $6)], joinType=[inner]) - LogicalTableScan(table=[[orders$q$2]]) - LogicalTableScan(table=[[entries$3]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[entries$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableFunctionsBasic.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableFunctionsBasic.txt index 65f8777fa..e8f520058 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableFunctionsBasic.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableFunctionsBasic.txt @@ -1,10 +1,10 @@ LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) LogicalFilter(condition=[>($2, ?0)]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalProject(id=[$2], delta=[-($2, ?0)], time=[$4]) LogicalFilter(condition=[>($2, ?0)]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableImportTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableImportTest.txt index f986eae02..03fdbd48d 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableImportTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableImportTest.txt @@ -1,9 +1,9 @@ ->>>customer$q$2-lp-STREAM -LogicalTableScan(table=[[customer$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1]] +>>>customer$2-lp-STREAM +LogicalTableScan(table=[[customer$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1]] ->>>product$q$11-lp-STREAM -LogicalTableScan(table=[[product$i$10]], hints=[[[WatermarkHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1]] +>>>product$2-lp-STREAM +LogicalTableScan(table=[[product$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1]] ->>>orders$q$5-lp-STREAM -LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] +>>>orders$2-lp-STREAM +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableIntervalJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableIntervalJoinTest.txt index da952bd21..7cffde547 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableIntervalJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableIntervalJoinTest.txt @@ -1,24 +1,24 @@ ->>>ordercustomer$q$13-lp-STREAM +>>>ordercustomer$1-lp-STREAM LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], time=[$4]) LogicalJoin(condition=[AND(=($3, $8), >($4, $7), <=($4, +($7, 2678400000:INTERVAL DAY(2))))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomer$q$13-lp-DATABASE +>>>ordercustomer$1-lp-DATABASE LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], time=[$4]) LogicalJoin(condition=[AND(=($3, $8), >($4, $7), <=($4, +($7, 2678400000:INTERVAL DAY(2))))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomer2$q$15-lp-STREAM +>>>ordercustomer2$1-lp-STREAM LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], time=[$4]) LogicalJoin(condition=[AND(=($3, $8), >($4, $7), <=($4, +($7, 2678400000:INTERVAL DAY(2))))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomer2$q$15-lp-DATABASE +>>>ordercustomer2$1-lp-DATABASE LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], time=[$4]) LogicalJoin(condition=[AND(=($3, $8), >($4, $7), <=($4, +($7, 2678400000:INTERVAL DAY(2))))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableJoinTest.txt index 53c83869a..07e6058c8 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableJoinTest.txt @@ -1,68 +1,68 @@ ->>>ordercustomer$q$13-lp-STREAM +>>>ordercustomer$1-lp-STREAM LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[inner]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomer$q$13-lp-DATABASE +>>>ordercustomer$1-lp-DATABASE LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[inner]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomerleft$q$15-lp-STREAM +>>>ordercustomerleft$1-lp-STREAM LogicalProject(_uuid=[$0], cuuid=[COALESCE($6, '')], id=[$2], name=[$10], customerid=[$3], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomerleft$q$15-lp-DATABASE +>>>ordercustomerleft$1-lp-DATABASE LogicalProject(_uuid=[$0], cuuid=[COALESCE($6, '')], id=[$2], name=[$10], customerid=[$3], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomerleftexcluded$q$17-lp-STREAM +>>>ordercustomerleftexcluded$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], __timestamp=[$12]) LogicalFilter(condition=[IS NULL($6)]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _uuid0=[$6], _ingest_time0=[$7], customerid0=[$8], email=[$9], name=[$10], lastUpdated=[$11], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomerleftexcluded$q$17-lp-DATABASE +>>>ordercustomerleftexcluded$1-lp-DATABASE LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], __timestamp=[$12]) LogicalFilter(condition=[IS NULL($6)]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _uuid0=[$6], _ingest_time0=[$7], customerid0=[$8], email=[$9], name=[$10], lastUpdated=[$11], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>ordercustomerright$q$19-lp-STREAM +>>>ordercustomerright$1-lp-STREAM LogicalProject(_uuid=[$0], ouuid=[COALESCE($6, '')], id=[$8], name=[$4], customerid=[$9], __timestamp=[CASE(<($1, $10), $10, $1)]) LogicalJoin(condition=[=($9, $2)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[customer$q$2]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[customer$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordercustomerright$q$19-lp-DATABASE +>>>ordercustomerright$1-lp-DATABASE LogicalProject(_uuid=[$0], ouuid=[COALESCE($6, '')], id=[$8], name=[$4], customerid=[$9], __timestamp=[CASE(<($1, $10), $10, $1)]) LogicalJoin(condition=[=($9, $2)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[customer$q$2]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[customer$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordercustomerrightexcluded$q$21-lp-STREAM +>>>ordercustomerrightexcluded$1-lp-STREAM LogicalProject(_uuid=[$0], customerid=[$2], name=[$4], __timestamp=[$12]) LogicalFilter(condition=[IS NULL($6)]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], _uuid0=[$6], _ingest_time0=[$7], id=[$8], customerid0=[$9], time=[$10], entries=[$11], __timestamp=[CASE(<($1, $10), $10, $1)]) LogicalJoin(condition=[=($9, $2)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[customer$q$2]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[customer$2]]) + LogicalTableScan(table=[[orders$2]]) ->>>ordercustomerrightexcluded$q$21-lp-DATABASE +>>>ordercustomerrightexcluded$1-lp-DATABASE LogicalProject(_uuid=[$0], customerid=[$2], name=[$4], __timestamp=[$12]) LogicalFilter(condition=[IS NULL($6)]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], _uuid0=[$6], _ingest_time0=[$7], id=[$8], customerid0=[$9], time=[$10], entries=[$11], __timestamp=[CASE(<($1, $10), $10, $1)]) LogicalJoin(condition=[=($9, $2)], joinType=[left]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[customer$q$2]]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[customer$2]]) + LogicalTableScan(table=[[orders$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinTest.txt index ff18c06a4..6784289dd 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinTest.txt @@ -1,22 +1,22 @@ ->>>orderwithcount$q$15-lp-STREAM +>>>orderwithcount$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], order_count=[$7], customerid=[$3], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customer=[$0], order_count=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customercount$q$13]]) + LogicalTableScan(table=[[customercount$1]]) ->>>orderwithcount$q$15-lp-DATABASE +>>>orderwithcount$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>orderwithcount2$q$17-lp-STREAM +>>>orderwithcount2$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], order_count=[$7], customerid=[$3], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customer=[$0], order_count=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customercount$q$13]]) + LogicalTableScan(table=[[customercount$1]]) ->>>orderwithcount2$q$17-lp-DATABASE +>>>orderwithcount2$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinWithTimeFilterTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinWithTimeFilterTest.txt index 0c8e1ce91..7cc797e3b 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinWithTimeFilterTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/tableTemporalJoinWithTimeFilterTest.txt @@ -1,69 +1,69 @@ ->>>totals$q$19-lp-STREAM +>>>totals$1-lp-STREAM LogicalProject(__customerid$pk$1=[$1], category=[$2], num=[$3], time=[$0]) LogicalAggregate(group=[{4, 6, 23}], num=[SUM($15)]) hints[SlidingAggregationHint options:[4, 86400000, 1728000]] LogicalJoin(condition=[=($14, $18)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[product$q$15]]) + LogicalTableScan(table=[[product$3]]) ->>>totals$q$19-lp-DATABASE +>>>totals$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>ordercustomer$q$22-lp-STREAM +>>>ordercustomer$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], name=[$10], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[left]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>ordercustomer$q$22-lp-DATABASE +>>>ordercustomer$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>ordercustomer2$q$24-lp-STREAM +>>>ordercustomer2$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], name=[$10], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[left]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>ordercustomer2$q$24-lp-DATABASE +>>>ordercustomer2$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>ordercustomer3$q$26-lp-STREAM +>>>ordercustomer3$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], name=[$10], time=[$4]) LogicalJoin(condition=[=($3, $6)], joinType=[left]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>ordercustomer3$q$26-lp-DATABASE +>>>ordercustomer3$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] ->>>ordercustomer4$q$28-lp-STREAM +>>>ordercustomer4$1-lp-STREAM LogicalProject(_uuid=[$0], id=[$2], name=[$10], __timestamp=[CASE(<($4, $8), $8, $4)]) LogicalJoin(condition=[=($3, $6)], joinType=[left]) hints[JoinCostHint options:[STREAM, DEDUP_STREAM, 1, RIGHT]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>ordercustomer4$q$28-lp-DATABASE +>>>ordercustomer4$1-lp-DATABASE LogicalProject(_uuid=[$0], id=[$2], name=[$10], __timestamp=[CASE(<($4, $8), $8, $4)]) LogicalJoin(condition=[=($3, $6)], joinType=[left]) hints[JoinCostHint options:[STREAM, DEDUP_STREAM, 1, RIGHT]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testExecutionTypeHint.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testExecutionTypeHint.txt index 580f61757..d3c2c66de 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testExecutionTypeHint.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testExecutionTypeHint.txt @@ -1,26 +1,26 @@ ->>>customeragg1$q$4-lp-STREAM +>>>customeragg1$1-lp-STREAM LogicalProject(customerid=[$1], num=[$2], _ingest_time=[$0]) LogicalAggregate(group=[{1, 2}], num=[COUNT()]) hints[SlidingAggregationHint options:[1, 3600000, 72000]] - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customeragg1$q$4-lp-DATABASE +>>>customeragg1$1-lp-DATABASE LogicalProject(customerid=[$0], num=[$1], _ingest_time=[$2]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], num=[$1], _ingest_time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$2], num=[COUNT() IGNORE NULLS OVER (PARTITION BY $2 ORDER BY $1 ROWS UNBOUNDED PRECEDING)], _ingest_time=[$1]) LogicalFilter(condition=[<(NOW(), +($1, 3600000:INTERVAL SECOND(7)))]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customeragg2$q$6-lp-DATABASE +>>>customeragg2$1-lp-DATABASE LogicalProject(customerid=[$0], num=[$1], _ingest_time=[$2]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], num=[$1], _ingest_time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$2], num=[COUNT() IGNORE NULLS OVER (PARTITION BY $2 ORDER BY $1 ROWS UNBOUNDED PRECEDING)], _ingest_time=[$1]) LogicalFilter(condition=[<(NOW(), +($1, 3600000:INTERVAL SECOND(7)))]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customeragg3$q$8-lp-STREAM +>>>customeragg3$1-lp-STREAM LogicalProject(customerid=[$1], num=[$2], _ingest_time=[$0]) LogicalAggregate(group=[{1, 2}], num=[COUNT()]) hints[SlidingAggregationHint options:[1, 3600000, 72000]] - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithTimestamp.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithTimestamp.txt index 89830e07c..fdfd1fd01 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithTimestamp.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithTimestamp.txt @@ -1,25 +1,25 @@ ->>>combinedstream$q$13-lp-STREAM +>>>combinedstream$1-lp-STREAM LogicalProject(_uuid=[$0], customerid=[$1], rowtime=[$2]) LogicalUnion(all=[true]) LogicalProject(_uuid=[$0], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalProject(_uuid=[$0], customerid=[$2], _ingest_time=[$1]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>combinedstream$q$13-lp-DATABASE +>>>combinedstream$1-lp-DATABASE LogicalProject(_uuid=[$0], customerid=[$1], rowtime=[$2]) LogicalUnion(all=[true]) LogicalProject(_uuid=[$0], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalProject(_uuid=[$0], customerid=[$2], _ingest_time=[$1]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>streamcount$q$15-lp-STREAM +>>>streamcount$1-lp-STREAM LogicalProject(day=[$0], num=[$1]) LogicalAggregate(group=[{0}], num=[COUNT()]) hints[TumbleAggregationHint options:[0, FUNCTION, 2, 86400000, 0]] LogicalProject(day=[endOfDay($2)], _uuid=[$0]) - LogicalTableScan(table=[[combinedstream$q$13]]) + LogicalTableScan(table=[[combinedstream$1]]) ->>>streamcount$q$15-lp-DATABASE +>>>streamcount$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithoutTimestamp.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithoutTimestamp.txt index 776b7dda7..a1cfb6bf2 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithoutTimestamp.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/testUnionWithoutTimestamp.txt @@ -1,16 +1,16 @@ ->>>combinedstream$q$13-lp-STREAM +>>>combinedstream$1-lp-STREAM LogicalProject(_uuid=[$0], customerid=[$1], _timestamp=[$2]) LogicalUnion(all=[true]) LogicalProject(_uuid=[$0], customerid=[$3], _timestamp=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalProject(_uuid=[$0], customerid=[$2], _timestamp=[$1]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>combinedstream$q$13-lp-DATABASE +>>>combinedstream$1-lp-DATABASE LogicalProject(_uuid=[$0], customerid=[$1], _timestamp=[$2]) LogicalUnion(all=[true]) LogicalProject(_uuid=[$0], customerid=[$3], _timestamp=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalProject(_uuid=[$0], customerid=[$2], _timestamp=[$1]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinition.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinition.txt index 2ef725953..e1fb74a0e 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinition.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinition.txt @@ -1,4 +1,4 @@ ->>>customer$q$2-lp-STREAM +>>>customer$2-lp-STREAM LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinitionWithPropagation.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinitionWithPropagation.txt index f30a49d5b..6e7c71fbe 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinitionWithPropagation.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampColumnDefinitionWithPropagation.txt @@ -1,11 +1,11 @@ ->>>customer$q$2-lp-STREAM +>>>customer$2-lp-STREAM LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customercopy$q$4-lp-STREAM +>>>customercopy$1-lp-STREAM LogicalProject(_uuid=[$0], timestamp=[$6], month=[endOfMonth(endOfMonth($6))]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customercopy$q$4-lp-DATABASE +>>>customercopy$1-lp-DATABASE Stage [database] does not support capabilities: [EXTENDED_FUNCTIONS] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampDefinitionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampDefinitionTest.txt index 2817625ed..6796230d3 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampDefinitionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampDefinitionTest.txt @@ -1,3 +1,3 @@ ->>>orders$q$2-lp-STREAM -LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] +>>>orders$2-lp-STREAM +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampExpressionTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampExpressionTest.txt index 2ef725953..e1fb74a0e 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampExpressionTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/timestampExpressionTest.txt @@ -1,4 +1,4 @@ ->>>customer$q$2-lp-STREAM +>>>customer$2-lp-STREAM LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) diff --git a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/topNTest.txt b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/topNTest.txt index 64d8b13cc..c96ccc85f 100644 --- a/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/topNTest.txt +++ b/sqrl-planner/sqrl-planner-local/src/test/resources/snapshots/com/datasqrl/plan/local/analyze/ResolveTest/topNTest.txt @@ -1,21 +1,21 @@ ->>>customer$q$13-lp-STREAM +>>>customer$3-lp-STREAM LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>customer$q$13-lp-DATABASE +>>>customer$3-lp-DATABASE LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $1 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) ->>>recentorders$q$15-lp-STREAM +>>>recentorders$1-lp-STREAM LogicalProject(__customerid$pk$1=[$6], _uuid=[$0], id=[$2], time=[$4]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) ->>>recentorders$q$15-lp-DATABASE +>>>recentorders$1-lp-DATABASE Stage [database] does not support capabilities: [TEMPORAL_JOIN] diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputSelectTablesTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputSelectTablesTest.txt index 665cfd2a7..c07a2501d 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputSelectTablesTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputSelectTablesTest.txt @@ -1,4 +1,4 @@ ->>>favorite_categories$q$31-lp-stream +>>>favorite_categories$1-lp-stream LogicalProject(__customerid$pk$4=[$2], category_name=[$1], total=[$3], month=[$0]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{1, 2, 5}], total=[SUM($3)]) hints[SlidingAggregationHint options:[1, 31536000000, 630720000]] LogicalJoin(condition=[=($5, $0)], joinType=[inner]) hints[TemporalJoinHint options:[1, 6, 0]] @@ -9,12 +9,12 @@ LogicalProject(__customerid$pk$4=[$2], category_name=[$1], total=[$3], month=[$0 LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], customerid0=[$6], _uuid0=[$7], _ingest_time0=[$8], email=[$9], name=[$10], lastUpdated=[$11], updateTime=[$12], _rownum=[$13], _idx=[$14], productid=[$15], quantity=[$16], unit_price=[$17], discount=[$18], discount0=[COALESCE($18, 0.0:DOUBLE)], total=[-(*($16, $17), COALESCE($18, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor23], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor23.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -22,14 +22,14 @@ LogicalProject(__customerid$pk$4=[$2], category_name=[$1], total=[$3], month=[$0 LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>newcustomerpromotion$debug1-lp-stream +>>>newcustomerpromotion$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name=[$4], total_spend=[$5], num_orders=[$6]) hints[TimestampHint options:[1]] LogicalStream(stream=[ADD]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[$7], __customerid$pk$5=[$8], total_spend=[$9], num_orders=[$10], time=[$11], _rownum0=[$12], __timestamp=[CASE(<($6, $11), $11, $6)]) @@ -38,29 +38,29 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name= LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalFilter(condition=[OR(>=($1, 100), >=($2, 3))]) LogicalFilter(condition=[=($4, 1)]) hints[DedupHint] LogicalProject(__customerid$pk$5=[$0], total_spend=[$1], num_orders=[$2], time=[$3], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $3 DESC NULLS LAST)]) LogicalProject(__customerid$pk$5=[$6], total_spend=[SUM($15) IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[AND(=($0, $14), =($18, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor27], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor27.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>newcustomerpromotion$q$38-lp-stream +>>>newcustomerpromotion$debug1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name=[$4], total_spend=[$5], num_orders=[$6]) hints[TimestampHint options:[1]] LogicalStream(stream=[ADD]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[$7], __customerid$pk$5=[$8], total_spend=[$9], num_orders=[$10], time=[$11], _rownum0=[$12], __timestamp=[CASE(<($6, $11), $11, $6)]) @@ -69,52 +69,52 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name= LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalFilter(condition=[OR(>=($1, 100), >=($2, 3))]) LogicalFilter(condition=[=($4, 1)]) hints[DedupHint] LogicalProject(__customerid$pk$5=[$0], total_spend=[$1], num_orders=[$2], time=[$3], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $3 DESC NULLS LAST)]) LogicalProject(__customerid$pk$5=[$6], total_spend=[SUM($15) IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[AND(=($0, $14), =($18, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor27], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor27.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>order_again$debug2-lp-stream +>>>order_again$1-lp-stream LogicalProject(__customerid$pk$2=[$6], productid=[$15], quantity=[SUM($16) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], most_recent=[MAX($4) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) hints[TimestampHint options:[4]] LogicalCorrelate(correlation=[$cor25], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor25.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>order_again$q$25-lp-stream +>>>order_again$debug2-lp-stream LogicalProject(__customerid$pk$2=[$6], productid=[$15], quantity=[SUM($16) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], most_recent=[MAX($4) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) hints[TimestampHint options:[4]] LogicalCorrelate(correlation=[$cor25], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor25.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -123,17 +123,17 @@ LogicalProject(__customerid$pk$2=[$6], productid=[$15], quantity=[SUM($16) IGNOR LogicalProject(__customerid$pk$5=[$6], total_spend=[SUM($15) IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[AND(=($0, $14), =($18, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor27], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor27.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -143,7 +143,7 @@ LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1] LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor27], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor27.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -151,17 +151,17 @@ LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1] >>>NewCustomerPromotion-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name=[$4], total_spend=[$5], num_orders=[$6]) - LogicalTableScan(table=[[newcustomerpromotion$q$38]]) + LogicalTableScan(table=[[newcustomerpromotion$1]]) >>>favorite_categories-lp-database LogicalSort(sort0=[$0], sort1=[$2], sort2=[$1], dir0=[ASC], dir1=[ASC], dir2=[ASC]) LogicalProject(__customerid$pk$4=[$0], category_name=[$1], total=[$2], month=[$3]) - LogicalTableScan(table=[[favorite_categories$q$31]]) + LogicalTableScan(table=[[favorite_categories$1]]) >>>order_again-lp-database LogicalSort(sort0=[$0], sort1=[$4], sort2=[$2], sort3=[$1], dir0=[ASC], dir1=[DESC], dir2=[DESC], dir3=[ASC]) LogicalProject(__customerid$pk$2=[$0], productid=[$1], quantity=[$2], num_orders=[$3], most_recent=[$4]) - LogicalTableScan(table=[[order_again$q$25]]) + LogicalTableScan(table=[[order_again$1]]) >>>favorite_categories-data Decoration, 120.85, 2024-05-27 21:23:59.999 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputTest.txt index ccb3e227d..017ae4189 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkDebugPhysicalIT/debugC3602OutputTest.txt @@ -1,87 +1,87 @@ >>>customer$debug1-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6], TimestampHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) >>>customer$debug2-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>order_again$debug3-lp-stream +>>>order_again$1-lp-stream LogicalProject(__customerid$pk$2=[$6], productid=[$15], quantity=[SUM($16) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], most_recent=[MAX($4) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) hints[TimestampHint options:[4]] LogicalCorrelate(correlation=[$cor21], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor21.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>order_again$q$25-lp-stream +>>>order_again$debug3-lp-stream LogicalProject(__customerid$pk$2=[$6], productid=[$15], quantity=[SUM($16) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], most_recent=[MAX($4) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) hints[TimestampHint options:[4]] LogicalCorrelate(correlation=[$cor21], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor21.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>order_stats$debug4-lp-stream +>>>order_stats$1-lp-stream LogicalProject(__customerid$pk$5=[$6], total_spend=[SUM($15) IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[AND(=($0, $14), =($18, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor23], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor23.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>order_stats$q$35-lp-stream +>>>order_stats$debug4-lp-stream LogicalProject(__customerid$pk$5=[$6], total_spend=[SUM($15) IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[AND(=($0, $14), =($18, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor23], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor23.entries]) LogicalValues(tuples=[[{ 0 }]]) >>>orders$debug5-lp-stream -LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] >>>total$debug6-lp-stream LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) hints[TimestampHint options:[4]] LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor23], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor23.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -89,12 +89,12 @@ LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1] >>>order_again-lp-database LogicalSort(sort0=[$0], sort1=[$4], sort2=[$2], sort3=[$1], dir0=[ASC], dir1=[DESC], dir2=[DESC], dir3=[ASC]) LogicalProject(__customerid$pk$2=[$0], productid=[$1], quantity=[$2], num_orders=[$3], most_recent=[$4]) - LogicalTableScan(table=[[order_again$q$25]]) + LogicalTableScan(table=[[order_again$1]]) >>>order_stats-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(__customerid$pk$5=[$0], total_spend=[$1], num_orders=[$2], time=[$3]) - LogicalTableScan(table=[[order_stats$q$35]]) + LogicalTableScan(table=[[order_stats$1]]) >>>order_stats-data 120.85, 1, 2023-05-19 01:29:39.553 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkInputErrorIT/brokenRetailDataTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkInputErrorIT/brokenRetailDataTest.txt index 63c8700b1..43a43ebed 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkInputErrorIT/brokenRetailDataTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkInputErrorIT/brokenRetailDataTest.txt @@ -1,26 +1,26 @@ ->>>customer$q$2-lp-stream -LogicalTableScan(table=[[customer$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] +>>>customer$2-lp-stream +LogicalTableScan(table=[[customer$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] ->>>orders$q$5-lp-stream -LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>product$q$11-lp-stream -LogicalTableScan(table=[[product$i$10]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] +>>>product$2-lp-stream +LogicalTableScan(table=[[product$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] >>>customer-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) >>>product-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) >>>customer-data 1000121, lalelu@hottunes.org, Michelle Dagnes, 1650493449 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv1_POSTGRES.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv1_POSTGRES.txt index db136d066..2499e01e3 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv1_POSTGRES.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv1_POSTGRES.txt @@ -1,23 +1,23 @@ >>>database -CREATE INDEX IF NOT EXISTS customer$q$13_btree_c3c4 ON customer$q$13 USING btree (email,name); -CREATE INDEX IF NOT EXISTS customer$q$13_hash_c4 ON customer$q$13 USING hash (name); -CREATE INDEX IF NOT EXISTS newcustomerpromotion$q$38_hash_c2 ON newcustomerpromotion$q$38 USING hash (customerid); -CREATE INDEX IF NOT EXISTS order_again$q$25_btree_c0c3 ON order_again$q$25 USING btree (__customerid$pk$2,num_orders); -CREATE INDEX IF NOT EXISTS orders$q$8_btree_c3c2c4 ON orders$q$8 USING btree (customerid,id,time); -CREATE INDEX IF NOT EXISTS orders$q$8_btree_c3c4 ON orders$q$8 USING btree (customerid,time); -CREATE INDEX IF NOT EXISTS orders$q$8_hash_c2 ON orders$q$8 USING hash (id); -CREATE INDEX IF NOT EXISTS product$q$17_btree_c3c5 ON product$q$17 USING btree (name,category); -CREATE INDEX IF NOT EXISTS product$q$17_hash_c5 ON product$q$17 USING hash (category); -CREATE TABLE IF NOT EXISTS category$q$15 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); -CREATE TABLE IF NOT EXISTS customer$q$13 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); -CREATE TABLE IF NOT EXISTS entries$9 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS favorite_categories$q$31 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); -CREATE TABLE IF NOT EXISTS newcustomerpromotion$q$38 (_uuid TEXT NOT NULL,_source_time TIMESTAMP WITH TIME ZONE NOT NULL,customerid BIGINT NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS order_again$q$25 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); -CREATE TABLE IF NOT EXISTS order_stats$q$35 (__customerid$pk$5 BIGINT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$5)); -CREATE TABLE IF NOT EXISTS orders$q$8 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,entries bytea[] NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS product$q$17 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); -CREATE TABLE IF NOT EXISTS total$q$19 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION NOT NULL,num BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); +CREATE INDEX IF NOT EXISTS customer$3_btree_c3c4 ON customer$3 USING btree (email,name); +CREATE INDEX IF NOT EXISTS customer$3_hash_c4 ON customer$3 USING hash (name); +CREATE INDEX IF NOT EXISTS newcustomerpromotion$1_hash_c2 ON newcustomerpromotion$1 USING hash (customerid); +CREATE INDEX IF NOT EXISTS order_again$1_btree_c0c3 ON order_again$1 USING btree (__customerid$pk$2,num_orders); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c2c4 ON orders$2 USING btree (customerid,id,time); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c4 ON orders$2 USING btree (customerid,time); +CREATE INDEX IF NOT EXISTS orders$2_hash_c2 ON orders$2 USING hash (id); +CREATE INDEX IF NOT EXISTS product$3_btree_c3c5 ON product$3 USING btree (name,category); +CREATE INDEX IF NOT EXISTS product$3_hash_c5 ON product$3 USING hash (category); +CREATE TABLE IF NOT EXISTS category$1 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); +CREATE TABLE IF NOT EXISTS customer$3 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); +CREATE TABLE IF NOT EXISTS entries$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS favorite_categories$1 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); +CREATE TABLE IF NOT EXISTS newcustomerpromotion$1 (_uuid TEXT NOT NULL,_source_time TIMESTAMP WITH TIME ZONE NOT NULL,customerid BIGINT NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS order_again$1 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); +CREATE TABLE IF NOT EXISTS order_stats$1 (__customerid$pk$5 BIGINT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$5)); +CREATE TABLE IF NOT EXISTS orders$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,entries bytea[] NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS product$3 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); +CREATE TABLE IF NOT EXISTS total$1 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION NOT NULL,num BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); >>>query-allcustomers { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv2_POSTGRES.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv2_POSTGRES.txt index b0f2a61db..21fc0a8e2 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv2_POSTGRES.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/c360-full_c360-full-graphqlv2_POSTGRES.txt @@ -1,10 +1,10 @@ >>>database -CREATE INDEX IF NOT EXISTS product$q$17_hash_c5 ON product$q$17 USING hash (category); -CREATE TABLE IF NOT EXISTS category$q$15 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); -CREATE TABLE IF NOT EXISTS customer$q$13 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); -CREATE TABLE IF NOT EXISTS favorite_categories$q$31 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); -CREATE TABLE IF NOT EXISTS order_again$q$25 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); -CREATE TABLE IF NOT EXISTS product$q$17 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); +CREATE INDEX IF NOT EXISTS product$3_hash_c5 ON product$3 USING hash (category); +CREATE TABLE IF NOT EXISTS category$1 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); +CREATE TABLE IF NOT EXISTS customer$3 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); +CREATE TABLE IF NOT EXISTS favorite_categories$1 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); +CREATE TABLE IF NOT EXISTS order_again$1 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); +CREATE TABLE IF NOT EXISTS product$3 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); >>>query-category { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/clickstream-teaser_clickstream-teaser-graphql_POSTGRES.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/clickstream-teaser_clickstream-teaser-graphql_POSTGRES.txt index 456044e3b..62edaffab 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/clickstream-teaser_clickstream-teaser-graphql_POSTGRES.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/clickstream-teaser_clickstream-teaser-graphql_POSTGRES.txt @@ -1,6 +1,6 @@ >>>database -CREATE TABLE IF NOT EXISTS recommendation$q$8 (url TEXT NOT NULL,rec TEXT NOT NULL,frequency BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url,rec)); -CREATE TABLE IF NOT EXISTS trending$q$4 (url TEXT NOT NULL,total BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url)); +CREATE TABLE IF NOT EXISTS recommendation$1 (url TEXT NOT NULL,rec TEXT NOT NULL,frequency BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url,rec)); +CREATE TABLE IF NOT EXISTS trending$1 (url TEXT NOT NULL,total BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url)); >>>query-recommendation { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/nutshopv2-small_v2graphql_POSTGRES.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/nutshopv2-small_v2graphql_POSTGRES.txt index 14f71f8c0..8330e1a84 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/nutshopv2-small_v2graphql_POSTGRES.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/nutshopv2-small_v2graphql_POSTGRES.txt @@ -1,15 +1,15 @@ >>>database -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c3c6 ON orders$q$5 USING btree (customerid,timestamp); -CREATE INDEX IF NOT EXISTS orders$q$5_hash_c2 ON orders$q$5 USING hash (id); -CREATE INDEX IF NOT EXISTS products$q$13_hash_c3 ON products$q$13 USING hash (name); -CREATE TABLE IF NOT EXISTS customers$q$16 (id BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); -CREATE TABLE IF NOT EXISTS items$6 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS orders$q$5 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time BIGINT NOT NULL,items bytea[] NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS past_purchases$q$22 (__id$pk$3 BIGINT NOT NULL,productid BIGINT NOT NULL,num_orders BIGINT NOT NULL,total_quantity BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__id$pk$3,productid)); -CREATE TABLE IF NOT EXISTS products$q$13 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,sizing TEXT NOT NULL,weight_in_gram BIGINT NOT NULL,type TEXT NOT NULL,category TEXT NOT NULL,usda_id BIGINT NOT NULL,updated TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); -CREATE TABLE IF NOT EXISTS spending_by_month$q$19 (__id$pk$2 BIGINT NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL,total_spend DOUBLE PRECISION NOT NULL,total_savings DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,month)); -CREATE TABLE IF NOT EXISTS totals$q$10 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,savings DOUBLE PRECISION NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); -CREATE TABLE IF NOT EXISTS volume_by_day$q$25 (__id$pk$4 BIGINT NOT NULL,day TIMESTAMP WITH TIME ZONE NOT NULL,quantity BIGINT NOT NULL,total DOUBLE PRECISION NOT NULL,total_weight BIGINT NOT NULL , PRIMARY KEY (__id$pk$4,day)); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c6 ON orders$2 USING btree (customerid,timestamp); +CREATE INDEX IF NOT EXISTS orders$2_hash_c2 ON orders$2 USING hash (id); +CREATE INDEX IF NOT EXISTS products$3_hash_c3 ON products$3 USING hash (name); +CREATE TABLE IF NOT EXISTS customers$1 (id BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE TABLE IF NOT EXISTS items$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS orders$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time BIGINT NOT NULL,items bytea[] NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS past_purchases$1 (__id$pk$3 BIGINT NOT NULL,productid BIGINT NOT NULL,num_orders BIGINT NOT NULL,total_quantity BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__id$pk$3,productid)); +CREATE TABLE IF NOT EXISTS products$3 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,sizing TEXT NOT NULL,weight_in_gram BIGINT NOT NULL,type TEXT NOT NULL,category TEXT NOT NULL,usda_id BIGINT NOT NULL,updated TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE TABLE IF NOT EXISTS spending_by_month$1 (__id$pk$2 BIGINT NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL,total_spend DOUBLE PRECISION NOT NULL,total_savings DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,month)); +CREATE TABLE IF NOT EXISTS totals$1 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,savings DOUBLE PRECISION NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); +CREATE TABLE IF NOT EXISTS volume_by_day$1 (__id$pk$4 BIGINT NOT NULL,day TIMESTAMP WITH TIME ZONE NOT NULL,quantity BIGINT NOT NULL,total DOUBLE PRECISION NOT NULL,total_weight BIGINT NOT NULL , PRIMARY KEY (__id$pk$4,day)); >>>query-allcustomers { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/quickstart-teaser-local_quickstart-teaser-local-graphql_POSTGRES.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/quickstart-teaser-local_quickstart-teaser-local-graphql_POSTGRES.txt index 509c7d961..9ffeda47e 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/quickstart-teaser-local_quickstart-teaser-local-graphql_POSTGRES.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/quickstart-teaser-local_quickstart-teaser-local-graphql_POSTGRES.txt @@ -1,11 +1,11 @@ >>>database -CREATE INDEX IF NOT EXISTS orders$q$2_hash_c3 ON orders$q$2 USING hash (customerid); -CREATE INDEX IF NOT EXISTS orders$q$2_hash_c4 ON orders$q$2 USING hash (time); -CREATE TABLE IF NOT EXISTS items$3 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS orders$q$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,items bytea[] NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS spending$q$13 (__id$pk$2 BIGINT NOT NULL,week TIMESTAMP WITH TIME ZONE NOT NULL,spend DOUBLE PRECISION NOT NULL,saved DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,week)); -CREATE TABLE IF NOT EXISTS totals$q$7 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,saving DOUBLE PRECISION NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); -CREATE TABLE IF NOT EXISTS users$q$10 (id BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE INDEX IF NOT EXISTS orders$2_hash_c3 ON orders$2 USING hash (customerid); +CREATE INDEX IF NOT EXISTS orders$2_hash_c4 ON orders$2 USING hash (time); +CREATE TABLE IF NOT EXISTS items$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS orders$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,items bytea[] NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS spending$1 (__id$pk$2 BIGINT NOT NULL,week TIMESTAMP WITH TIME ZONE NOT NULL,spend DOUBLE PRECISION NOT NULL,saved DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,week)); +CREATE TABLE IF NOT EXISTS totals$1 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,saving DOUBLE PRECISION NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); +CREATE TABLE IF NOT EXISTS users$1 (id BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); >>>query-orders { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/sensors-teaser_sensors-teaser-graphql_POSTGRES.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/sensors-teaser_sensors-teaser-graphql_POSTGRES.txt index fef47f5a7..6622f2c74 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/sensors-teaser_sensors-teaser-graphql_POSTGRES.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkJdbcEnginesTest/sensors-teaser_sensors-teaser-graphql_POSTGRES.txt @@ -1,12 +1,12 @@ >>>database -CREATE INDEX IF NOT EXISTS machine$q$18_btree_c1c2 ON machine$q$18 USING btree (maxTemp,avgTemp); -CREATE INDEX IF NOT EXISTS machine$q$18_hash_c2 ON machine$q$18 USING hash (avgTemp); -CREATE INDEX IF NOT EXISTS minreadings$q$13_btree_c0c2 ON minreadings$q$13 USING btree (sensorid,temp); -CREATE INDEX IF NOT EXISTS sensors$q$15_btree_c3c4 ON sensors$q$15 USING btree (machineid,placed); -CREATE INDEX IF NOT EXISTS sensors$q$15_hash_c4 ON sensors$q$15 USING hash (placed); -CREATE TABLE IF NOT EXISTS machine$q$18 (machineid BIGINT NOT NULL,maxTemp DOUBLE PRECISION NOT NULL,avgTemp DOUBLE PRECISION NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (machineid)); -CREATE TABLE IF NOT EXISTS minreadings$q$13 (sensorid BIGINT NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL,temp DOUBLE PRECISION NOT NULL , PRIMARY KEY (sensorid,timeMin)); -CREATE TABLE IF NOT EXISTS sensors$q$15 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,machineid BIGINT NOT NULL,placed TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE INDEX IF NOT EXISTS machine$1_btree_c1c2 ON machine$1 USING btree (maxTemp,avgTemp); +CREATE INDEX IF NOT EXISTS machine$1_hash_c2 ON machine$1 USING hash (avgTemp); +CREATE INDEX IF NOT EXISTS minreadings$1_btree_c0c2 ON minreadings$1 USING btree (sensorid,temp); +CREATE INDEX IF NOT EXISTS sensors$3_btree_c3c4 ON sensors$3 USING btree (machineid,placed); +CREATE INDEX IF NOT EXISTS sensors$3_hash_c4 ON sensors$3 USING hash (placed); +CREATE TABLE IF NOT EXISTS machine$1 (machineid BIGINT NOT NULL,maxTemp DOUBLE PRECISION NOT NULL,avgTemp DOUBLE PRECISION NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (machineid)); +CREATE TABLE IF NOT EXISTS minreadings$1 (sensorid BIGINT NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL,temp DOUBLE PRECISION NOT NULL , PRIMARY KEY (sensorid,timeMin)); +CREATE TABLE IF NOT EXISTS sensors$3 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,machineid BIGINT NOT NULL,placed TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); >>>query-machine { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/aggregateTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/aggregateTest.txt index 82cfd382b..99382f573 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/aggregateTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/aggregateTest.txt @@ -1,51 +1,51 @@ ->>>customer$q$2-lp-stream -LogicalTableScan(table=[[customer$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] +>>>customer$2-lp-stream +LogicalTableScan(table=[[customer$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] ->>>orderagg1$q$13-lp-stream +>>>orderagg1$1-lp-stream LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 3600000, 900000]] LogicalProject(customer=[$3], bucket=[endOfHour($4, 1:BIGINT, 15:BIGINT)], _uuid=[$0]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>orderagg2$q$15-lp-stream +>>>orderagg2$1-lp-stream LogicalProject(_pk=[1], order_count=[COUNT() IGNORE NULLS OVER (ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[2]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>orderaugment$q$25-lp-stream +>>>orderaugment$1-lp-stream LogicalProject(_uuid=[$0], id=[$2], time=[$4], order_count=[$7]) hints[TimestampHint options:[2]] LogicalJoin(condition=[=($3, $6)], joinType=[inner]) hints[TemporalJoinHint options:[4, 2, 0]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customer=[$0], order_count=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customer=[$0], order_count=[$2], time=[$1]) LogicalAggregate(group=[{3, 4}], order_count=[COUNT()]) hints[SlidingAggregationHint options:[4, 86313600000, 1726272000]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>ordernow1$q$19-lp-stream +>>>ordernow1$1-lp-stream LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 3600000, 0]] LogicalProject(customer=[$3], bucket=[endOfHour($4)], _uuid=[$0]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>ordernow2$q$21-lp-stream +>>>ordernow2$1-lp-stream LogicalProject(bucket=[$0], order_count=[$1]) hints[TimestampHint options:[0]] LogicalAggregate(group=[{0}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[0, FUNCTION, 4, 3600000, 0]] LogicalProject(bucket=[endOfHour($4)], _uuid=[$0]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>ordernow3$q$23-lp-stream +>>>ordernow3$1-lp-stream LogicalProject(customer=[$0], order_count=[$2], time=[$1]) hints[TimestampHint options:[2]] LogicalAggregate(group=[{3, 4}], order_count=[COUNT()]) hints[SlidingAggregationHint options:[4, 86313600000, 1726272000]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>orders$q$5-lp-stream -LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>ordertime1$q$17-lp-stream +>>>ordertime1$1-lp-stream LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], order_count=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 1000, 0]] LogicalProject(customer=[$3], bucket=[endOfSecond($4)], _uuid=[$0]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] >>>agg1-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) @@ -54,53 +54,53 @@ LogicalSort(sort0=[$0], dir0=[ASC]) LogicalAggregate(group=[{4}], order_count=[COUNT()], __timestamp=[MAX($5)]) LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[inner]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) >>>orderagg1-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) - LogicalTableScan(table=[[orderagg1$q$13]]) + LogicalTableScan(table=[[orderagg1$1]]) >>>orderagg2-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(_pk=[$0], order_count=[$1], time=[$2]) - LogicalTableScan(table=[[orderagg2$q$15]]) + LogicalTableScan(table=[[orderagg2$1]]) >>>orderaugment-lp-database LogicalSort(sort0=[$2], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], id=[$1], time=[$2], order_count=[$3]) - LogicalTableScan(table=[[orderaugment$q$25]]) + LogicalTableScan(table=[[orderaugment$1]]) >>>ordercustomer-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC]) LogicalProject(_uuid=[$0], _uuid0=[$1], id=[$2], name=[$3], customerid=[$4], __timestamp=[$5]) LogicalProject(_uuid=[$0], _uuid0=[$6], id=[$2], name=[$10], customerid=[$3], __timestamp=[CASE(<($4, $7), $7, $4)]) LogicalJoin(condition=[=($3, $8)], joinType=[inner]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) >>>ordernow1-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) LogicalFilter(condition=[<(NOW(), +($1, 86313600000:INTERVAL SECOND(11)))]) - LogicalTableScan(table=[[ordernow1$q$19]]) + LogicalTableScan(table=[[ordernow1$1]]) >>>ordernow2-lp-database LogicalSort(sort0=[$0], dir0=[DESC-nulls-last]) LogicalProject(bucket=[$0], order_count=[$1]) LogicalFilter(condition=[<(NOW(), +($0, 86313600000:INTERVAL SECOND(11)))]) - LogicalTableScan(table=[[ordernow2$q$21]]) + LogicalTableScan(table=[[ordernow2$1]]) >>>ordernow3-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customer=[$0], order_count=[$1], time=[$2]) - LogicalTableScan(table=[[ordernow3$q$23]]) + LogicalTableScan(table=[[ordernow3$1]]) >>>ordertime1-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(customer=[$0], bucket=[$1], order_count=[$2]) - LogicalTableScan(table=[[ordertime1$q$17]]) + LogicalTableScan(table=[[ordertime1$1]]) >>>orderagg1-data 1000101, 2023-05-19 02:14:59.999, 1 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/filterTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/filterTest.txt index 9e935efd4..f04807cb7 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/filterTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/filterTest.txt @@ -1,22 +1,22 @@ ->>>historicorders$q$13-lp-stream +>>>historicorders$1-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) hints[TimestampHint options:[4]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>recentorders$q$18-lp-stream +>>>recentorders$1-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5]) hints[TimestampHint options:[4]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] >>>historicorders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) LogicalFilter(condition=[<=(NOW(), +($4, 86313600000:INTERVAL SECOND(11)))]) - LogicalTableScan(table=[[historicorders$q$13]]) + LogicalTableScan(table=[[historicorders$1]]) >>>recentorders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) LogicalFilter(condition=[<=(NOW(), +($4, 1000:INTERVAL SECOND(4)))]) - LogicalTableScan(table=[[recentorders$q$18]]) + LogicalTableScan(table=[[recentorders$1]]) >>>historicorders-data 10007140, 1000107, 2023-05-19 02:28:39.553244 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/functionTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/functionTest.txt index c207a2fdc..c20d7e493 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/functionTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/functionTest.txt @@ -1,11 +1,11 @@ ->>>product$q$11-lp-stream +>>>product$2-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], badWords=[bannedWordsFilter($3)], searchResult=[textSearch('garden gnome', $4, $3)], format=[format('Go buy: %s in %s with id=%s', $3, $5, CAST($2):VARCHAR(2147483647) CHARACTER SET "UTF-16LE" NOT NULL)]) hints[WatermarkHint options:[1], TimestampHint options:[1]] - LogicalTableScan(table=[[product$i$10]]) + LogicalTableScan(table=[[product$1]]) >>>product-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], badWords=[$6], searchResult=[$7], format=[$8]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) >>>product-data 1332, Heavy Duty Butt Wipes, Wipes for hardiest of messes, Personal Care, false, 0, Go buy: Heavy Duty Butt Wipes in Personal Care with id=1332 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/fuzzedValuesTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/fuzzedValuesTest.txt index f11f624ae..51f4a6259 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/fuzzedValuesTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/fuzzedValuesTest.txt @@ -1,98 +1,98 @@ ->>>customerdistinct$q$13-lp-stream +>>>customerdistinct$1-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customerid$q$18-lp-stream +>>>customerid$1-lp-stream LogicalProject(customerid=[$2], updateTime=[$6]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customerorders$q$20-lp-stream +>>>customerorders$1-lp-stream LogicalProject(_uuid=[$0], id=[$2], customerid=[$6], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[=($3, $6)], joinType=[inner]) hints[TemporalJoinHint options:[4, 1, 0]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], updateTime=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) LogicalProject(customerid=[$2], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>distinctorders$q$22-lp-stream +>>>distinctorders$1-lp-stream LogicalProject(__customerid$pk$2=[$6], id=[$2], time=[$4]) hints[TimestampHint options:[2]] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>distinctorderstime$q$25-lp-stream +>>>distinctorderstime$1-lp-stream LogicalProject(__customerid$pk$3=[$6], id=[$2], time=[$4]) hints[TimestampHint options:[2]] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>entries$29-lp-stream +>>>entries$2-lp-stream LogicalProject(id=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) hints[TimestampHint options:[6]] LogicalCorrelate(correlation=[$cor0], joinType=[inner], requiredColumns=[{5}]) LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], customerid=[$3], time=[$4], entries=[$5]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $4 DESC NULLS LAST)]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor0.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$28-lp-stream +>>>orders$3-lp-stream LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], customerid=[$3], time=[$4], entries=[$5]) hints[TimestampHint options:[4]] LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $4 DESC NULLS LAST)]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] >>>customerdistinct-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) - LogicalTableScan(table=[[customerdistinct$q$13]]) + LogicalTableScan(table=[[customerdistinct$1]]) >>>customerid-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], updateTime=[$1]) - LogicalTableScan(table=[[customerid$q$18]]) + LogicalTableScan(table=[[customerid$1]]) >>>customerorders-lp-database LogicalSort(sort0=[$3], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], id=[$1], customerid=[$2], time=[$3]) - LogicalTableScan(table=[[customerorders$q$20]]) + LogicalTableScan(table=[[customerorders$1]]) >>>distinctorders-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC]) LogicalProject(__customerid$pk$2=[$0], id=[$1], time=[$2]) LogicalFilter(condition=[AND(=($3, $4), <=($5, 10))]) LogicalProject(__customerid$pk$2=[$0], id=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS FIRST)], _rank=[RANK() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS FIRST)], _denserank=[DENSE_RANK() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS FIRST)]) - LogicalTableScan(table=[[distinctorders$q$22]]) + LogicalTableScan(table=[[distinctorders$1]]) >>>distinctorderstime-lp-database LogicalSort(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ASC]) LogicalProject(__customerid$pk$3=[$0], id=[$1], time=[$2]) LogicalFilter(condition=[AND(=($3, $4), <=($5, 10))]) LogicalProject(__customerid$pk$3=[$0], id=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS FIRST, $1 NULLS LAST)], _rank=[RANK() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS FIRST, $1 NULLS LAST)], _denserank=[DENSE_RANK() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS FIRST, $1 NULLS LAST)]) - LogicalTableScan(table=[[distinctorderstime$q$25]]) + LogicalTableScan(table=[[distinctorderstime$1]]) >>>entries-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC]) LogicalProject(id=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], __timestamp=[$6]) - LogicalTableScan(table=[[entries$29]]) + LogicalTableScan(table=[[entries$2]]) >>>orders-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(id=[$0], _uuid=[$1], _ingest_time=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$28]]) + LogicalTableScan(table=[[orders$3]]) >>>customerdistinct-data 1000101, john.mekker@gmail.com, John Mekker, 1645396849, 2022-02-20 22:40:49.0 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/joinTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/joinTest.txt index 441ce700d..6f78b420b 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/joinTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/joinTest.txt @@ -1,57 +1,57 @@ ->>>customer$q$2-lp-stream +>>>customer$2-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6], TimestampHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customerdedup$q$14-lp-stream +>>>customerdedup$1-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>ordercustomerdedup$q$16-lp-stream +>>>ordercustomerdedup$1-lp-stream LogicalProject(_uuid=[$0], id=[$2], name=[$11], customerid=[$3], rowtime=[$6]) hints[TimestampHint options:[4]] LogicalJoin(condition=[=($3, $7)], joinType=[inner]) hints[TemporalJoinHint options:[6, 6, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], rowtime=[$4]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>ordercustomerinterval$q$12-lp-stream +>>>ordercustomerinterval$1-lp-stream LogicalProject(_uuid=[$0], _uuid0=[$7], id=[$2], name=[$11], customerid=[$3], rowtime=[$6]) hints[TimestampHint options:[5]] LogicalJoin(condition=[AND(=($3, $9), >=($6, $13), <=($6, +($13, 31536000000:INTERVAL DAY(3))))], joinType=[inner]) hints[IntervalJoin] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], rowtime=[$4]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5-lp-stream +>>>orders$2-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], rowtime=[$4]) hints[WatermarkHint options:[6], TimestampHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) >>>customerdedup-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) - LogicalTableScan(table=[[customerdedup$q$14]]) + LogicalTableScan(table=[[customerdedup$1]]) >>>ordercustomer-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC]) LogicalProject(_uuid=[$0], _uuid0=[$1], id=[$2], name=[$3], customerid=[$4], __timestamp=[$5]) LogicalProject(_uuid=[$0], _uuid0=[$7], id=[$2], name=[$11], customerid=[$3], __timestamp=[CASE(<($6, $13), $13, $6)]) LogicalJoin(condition=[=($3, $9)], joinType=[inner]) hints[JoinCostHint options:[STREAM, STREAM, 1, NONE]] - LogicalTableScan(table=[[orders$q$5]]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[orders$2]]) + LogicalTableScan(table=[[customer$2]]) >>>ordercustomerdedup-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], id=[$1], name=[$2], customerid=[$3], rowtime=[$4]) - LogicalTableScan(table=[[ordercustomerdedup$q$16]]) + LogicalTableScan(table=[[ordercustomerdedup$1]]) >>>ordercustomerinterval-lp-database LogicalSort(sort0=[$5], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _uuid0=[$1], id=[$2], name=[$3], customerid=[$4], rowtime=[$5]) - LogicalTableScan(table=[[ordercustomerinterval$q$12]]) + LogicalTableScan(table=[[ordercustomerinterval$1]]) >>>ordercustomer-data 10007140, Emily F. Ludies, 1000107 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/nestedAggregationandSelfJoinTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/nestedAggregationandSelfJoinTest.txt index 82a2ed895..f82e78c7e 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/nestedAggregationandSelfJoinTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/nestedAggregationandSelfJoinTest.txt @@ -1,24 +1,24 @@ ->>>customer$q$10-lp-stream +>>>customer$3-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$7]]) + LogicalTableScan(table=[[customer$1]]) ->>>orders$q$2-lp-stream -LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>orders_by_hour$q$17-lp-stream +>>>orders_by_hour$1-lp-stream LogicalProject(__customerid$pk$2=[$0], hour=[$1], total_price=[$2], total_num=[$3]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], total_price=[SUM($2)], total_num=[SUM($3)]) hints[TumbleAggregationHint options:[1, FUNCTION, 3, 3600000, 0]] LogicalProject(__customerid$pk$2=[$6], hour=[endOfHour($3)], price=[$4], num=[$5], _uuid=[$0]) LogicalJoin(condition=[=($2, $6)], joinType=[inner]) hints[TemporalJoinHint options:[3, 6, 0]] LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], time=[$4], price=[$7], num=[$8]) LogicalJoin(condition=[AND(=($0, $6), =($10, $4))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalProject(___uuid$pk$1=[$0], price=[$2], num=[$3], discount=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($1)], num=[COUNT()], discount=[SUM($2)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(___uuid$pk$1=[$0], $f1=[-(*($8, $9), $10)], discount=[$10], _idx=[$6], time=[$4]) LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor7.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -26,17 +26,17 @@ LogicalProject(__customerid$pk$2=[$0], hour=[$1], total_price=[$2], total_num=[$ LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$7]]) + LogicalTableScan(table=[[customer$1]]) ->>>ordersinline$q$15-lp-stream +>>>ordersinline$1-lp-stream LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], time=[$4], price=[$7], num=[$8]) hints[TimestampHint options:[3]] LogicalJoin(condition=[AND(=($0, $6), =($10, $4))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalProject(___uuid$pk$1=[$0], price=[$2], num=[$3], discount=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($1)], num=[COUNT()], discount=[SUM($2)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(___uuid$pk$1=[$0], $f1=[-(*($8, $9), $10)], discount=[$10], _idx=[$6], time=[$4]) LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor7.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -44,22 +44,22 @@ LogicalProject(_uuid=[$0], id=[$2], customerid=[$3], time=[$4], price=[$7], num= >>>customer-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) - LogicalTableScan(table=[[customer$q$10]]) + LogicalTableScan(table=[[customer$3]]) >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) >>>orders_by_hour-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(__customerid$pk$2=[$0], hour=[$1], total_price=[$2], total_num=[$3]) - LogicalTableScan(table=[[orders_by_hour$q$17]]) + LogicalTableScan(table=[[orders_by_hour$1]]) >>>ordersinline-lp-database LogicalSort(sort0=[$3], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], id=[$1], customerid=[$2], time=[$3], price=[$4], num=[$5]) - LogicalTableScan(table=[[ordersinline$q$15]]) + LogicalTableScan(table=[[ordersinline$1]]) >>>customer-data 1000101, john.mekker@gmail.com, John Mekker, 1645396849, 2022-02-20 22:40:49.0 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/setTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/setTest.txt index 876b9c7ad..dda8835c2 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/setTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/setTest.txt @@ -1,33 +1,33 @@ ->>>combinedstream$q$10-lp-stream +>>>combinedstream$1-lp-stream LogicalProject(_uuid=[$0], customerid=[$1], rowtime=[$2]) hints[TimestampHint options:[2]] LogicalUnion(all=[true]) LogicalProject(_uuid=[$0], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalProject(_uuid=[$0], customerid=[$2], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>streamcount$q$12-lp-stream +>>>streamcount$1-lp-stream LogicalProject(hour=[$0], num=[$1]) hints[TimestampHint options:[0]] LogicalAggregate(group=[{0}], num=[COUNT()]) hints[TumbleAggregationHint options:[0, FUNCTION, 2, 3600000, 0]] LogicalProject(hour=[endOfHour($2)], _uuid=[$0]) LogicalProject(_uuid=[$0], customerid=[$1], rowtime=[$2]) LogicalUnion(all=[true]) LogicalProject(_uuid=[$0], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalProject(_uuid=[$0], customerid=[$2], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) >>>combinedstream-lp-database LogicalSort(sort0=[$2], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], customerid=[$1], rowtime=[$2]) - LogicalTableScan(table=[[combinedstream$q$10]]) + LogicalTableScan(table=[[combinedstream$1]]) >>>streamcount-lp-database LogicalSort(sort0=[$0], dir0=[DESC-nulls-last]) LogicalProject(hour=[$0], num=[$1]) - LogicalTableScan(table=[[streamcount$q$12]]) + LogicalTableScan(table=[[streamcount$1]]) >>>combinedstream-data 1000101, 2022-02-20 22:40:49.0 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/simpleStreamTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/simpleStreamTest.txt index 15a9e74b4..2956b801f 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/simpleStreamTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/simpleStreamTest.txt @@ -1,79 +1,79 @@ ->>>countstream0$q$7-lp-stream +>>>countstream0$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], num=[$3]) hints[TimestampHint options:[1]] LogicalStream(stream=[ADD]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], num=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], num=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>countstream1$q$11-lp-stream +>>>countstream1$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], quantity=[$3]) hints[TimestampHint options:[1]] LogicalStream(stream=[ADD]) LogicalFilter(condition=[>=($1, 1)]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], quantity=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], quantity=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>countstream2$q$13-lp-stream +>>>countstream2$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], quantity=[$3]) hints[TimestampHint options:[1]] LogicalStream(stream=[ADD]) LogicalFilter(condition=[>=($1, 2)]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], quantity=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], quantity=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>customercount$q$9-lp-stream +>>>customercount$1-lp-stream LogicalProject(customerid=[$3], quantity=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[2]] - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>updatestream0$q$15-lp-stream +>>>updatestream0$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], num=[$3]) hints[TimestampHint options:[1]] LogicalStream(stream=[UPDATE]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], num=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], num=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>updatestream1$q$17-lp-stream +>>>updatestream1$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], quantity=[$3]) hints[TimestampHint options:[1]] LogicalStream(stream=[UPDATE]) LogicalFilter(condition=[>=($1, 1)]) LogicalFilter(condition=[=($3, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], quantity=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS LAST)]) LogicalProject(customerid=[$3], quantity=[COUNT() IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] >>>countstream0-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], num=[$3]) - LogicalTableScan(table=[[countstream0$q$7]]) + LogicalTableScan(table=[[countstream0$1]]) >>>countstream1-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], quantity=[$3]) - LogicalTableScan(table=[[countstream1$q$11]]) + LogicalTableScan(table=[[countstream1$1]]) >>>countstream2-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], quantity=[$3]) - LogicalTableScan(table=[[countstream2$q$13]]) + LogicalTableScan(table=[[countstream2$1]]) >>>customercount-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], quantity=[$1], time=[$2]) - LogicalTableScan(table=[[customercount$q$9]]) + LogicalTableScan(table=[[customercount$1]]) >>>updatestream0-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], num=[$3]) - LogicalTableScan(table=[[updatestream0$q$15]]) + LogicalTableScan(table=[[updatestream0$1]]) >>>updatestream1-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], quantity=[$3]) - LogicalTableScan(table=[[updatestream1$q$17]]) + LogicalTableScan(table=[[updatestream1$1]]) >>>customercount-data 1000101, 1, 2023-05-19 01:29:39.553 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/streamTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/streamTest.txt index 0d23b59e8..81838a595 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/streamTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/streamTest.txt @@ -1,4 +1,4 @@ ->>>countstream$q$17-lp-stream +>>>countstream$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) hints[TimestampHint options:[1]] LogicalStream(stream=[ADD]) LogicalFilter(condition=[>($2, 1)]) @@ -7,7 +7,7 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$11], name=[$15], quantity=[SUM($8) IGNORE NULLS OVER (PARTITION BY $11, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[=($3, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -15,9 +15,9 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>countstream$q$17$1-lp-stream +>>>countstream$1$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) LogicalStream(stream=[ADD]) @@ -27,7 +27,7 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$11], name=[$15], quantity=[SUM($8) IGNORE NULLS OVER (PARTITION BY $11, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[=($3, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -35,9 +35,9 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>countstream$q$17$2-lp-stream +>>>countstream$1$2-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) LogicalStream(stream=[ADD]) @@ -47,7 +47,7 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$11], name=[$15], quantity=[SUM($8) IGNORE NULLS OVER (PARTITION BY $11, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[=($3, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -55,13 +55,13 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customercount$q$15-lp-stream +>>>customercount$1-lp-stream LogicalProject(customerid=[$11], name=[$15], quantity=[SUM($8) IGNORE NULLS OVER (PARTITION BY $11, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[=($3, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -69,9 +69,9 @@ LogicalProject(customerid=[$11], name=[$15], quantity=[SUM($8) IGNORE NULLS OVER LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customercount2$q$21-lp-stream +>>>customercount2$1-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _source_time=[$1], name=[$3], quantity=[$4]) hints[TimestampHint options:[2]] LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) LogicalStream(stream=[ADD]) @@ -81,7 +81,7 @@ LogicalProject(customerid=[$2], _uuid=[$0], _source_time=[$1], name=[$3], quanti LogicalProject(customerid=[$11], name=[$15], quantity=[SUM($8) IGNORE NULLS OVER (PARTITION BY $11, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[=($3, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -89,9 +89,9 @@ LogicalProject(customerid=[$2], _uuid=[$0], _source_time=[$1], name=[$3], quanti LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>updatestream$q$19-lp-stream +>>>updatestream$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) hints[TimestampHint options:[1]] LogicalStream(stream=[UPDATE]) LogicalFilter(condition=[>($2, 1)]) @@ -100,7 +100,7 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$11], name=[$15], quantity=[SUM($8) IGNORE NULLS OVER (PARTITION BY $11, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[=($3, $11)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalCorrelate(correlation=[$cor6], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor6.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -108,27 +108,27 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quanti LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) >>>countstream-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) - LogicalTableScan(table=[[countstream$q$17]]) + LogicalTableScan(table=[[countstream$1]]) >>>customercount-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC]) LogicalProject(customerid=[$0], name=[$1], quantity=[$2], time=[$3]) - LogicalTableScan(table=[[customercount$q$15]]) + LogicalTableScan(table=[[customercount$1]]) >>>customercount2-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _source_time=[$2], name=[$3], quantity=[$4]) - LogicalTableScan(table=[[customercount2$q$21]]) + LogicalTableScan(table=[[customercount2$1]]) >>>updatestream-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], name=[$3], quantity=[$4]) - LogicalTableScan(table=[[updatestream$q$19]]) + LogicalTableScan(table=[[updatestream$1]]) >>>customercount-data 1000101, John Mekker, 3, 2023-05-19 01:29:39.553 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableColumnDefinitionTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableColumnDefinitionTest.txt index e064a180e..efeed8710 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableColumnDefinitionTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableColumnDefinitionTest.txt @@ -1,33 +1,33 @@ ->>>customer$q$13-lp-stream +>>>customer$3-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>entries$6-lp-stream +>>>entries$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount2=[COALESCE($11, 0.0:DOUBLE)], __timestamp=[$4]) hints[TimestampHint options:[7]] LogicalCorrelate(correlation=[$cor14], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], col1=[/(+($2, $3), 2)]) hints[WatermarkHint options:[4]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor14.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>entryprice$q$15-lp-stream +>>>entryprice$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$7], price=[-(*($9, $10), $11)], time=[$4]) hints[TimestampHint options:[3]] LogicalCorrelate(correlation=[$cor11], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], col1=[/(+($2, $3), 2)]) hints[WatermarkHint options:[4]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor11.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>ordercustomer$q$17-lp-stream +>>>ordercustomer$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$7], id=[$2], name=[$17], customerid=[$3], col1=[$6], discount2=[$12], time=[$4]) hints[TimestampHint options:[7]] LogicalJoin(condition=[=($3, $13)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], col1=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount2=[COALESCE($11, 0.0:DOUBLE)]) LogicalCorrelate(correlation=[$cor13], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], col1=[/(+($2, $3), 2)]) hints[WatermarkHint options:[4]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor13.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -35,36 +35,36 @@ LogicalProject(_uuid=[$0], _idx=[$7], id=[$2], name=[$17], customerid=[$3], col1 LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>orders$q$5-lp-stream +>>>orders$2-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], col1=[/(+($2, $3), 2)]) hints[WatermarkHint options:[4], TimestampHint options:[4]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) >>>customer-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], timestamp=[$6]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) >>>entries-lp-database LogicalSort(sort0=[$7], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], discount2=[$6], __timestamp=[$7]) - LogicalTableScan(table=[[entries$6]]) + LogicalTableScan(table=[[entries$1]]) >>>entryprice-lp-database LogicalSort(sort0=[$3], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], price=[$2], time=[$3]) - LogicalTableScan(table=[[entryprice$q$15]]) + LogicalTableScan(table=[[entryprice$1]]) >>>ordercustomer-lp-database LogicalSort(sort0=[$7], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], id=[$2], name=[$3], customerid=[$4], col1=[$5], discount2=[$6], time=[$7]) - LogicalTableScan(table=[[ordercustomer$q$17]]) + LogicalTableScan(table=[[ordercustomer$1]]) >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], col1=[$6]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) >>>entryprice-data 0, 17.35, 2023-05-19 01:29:39.553244 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableImportTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableImportTest.txt index ee9d745a9..87965cd03 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableImportTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/tableImportTest.txt @@ -1,39 +1,39 @@ ->>>customer$q$2-lp-stream -LogicalTableScan(table=[[customer$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] +>>>customer$2-lp-stream +LogicalTableScan(table=[[customer$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] ->>>entries$6-lp-stream +>>>entries$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) hints[TimestampHint options:[6]] LogicalCorrelate(correlation=[$cor0], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor0.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5-lp-stream -LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>product$q$11-lp-stream -LogicalTableScan(table=[[product$i$10]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] +>>>product$2-lp-stream +LogicalTableScan(table=[[product$1]], hints=[[[WatermarkHint inheritPath:[] options:[1]], [TimestampHint inheritPath:[] options:[1]]]]) hints[WatermarkHint options:[1], TimestampHint options:[1]] >>>customer-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5]) - LogicalTableScan(table=[[customer$q$2]]) + LogicalTableScan(table=[[customer$2]]) >>>entries-lp-database LogicalSort(sort0=[$6], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], __timestamp=[$6]) - LogicalTableScan(table=[[entries$6]]) + LogicalTableScan(table=[[entries$1]]) >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) >>>product-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5]) - LogicalTableScan(table=[[product$q$11]]) + LogicalTableScan(table=[[product$2]]) >>>customer-data 1000101, john.mekker@gmail.com, John Mekker, 1645396849 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/topNTest.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/topNTest.txt index 4649b05aa..affc6d7d2 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/topNTest.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalIT/topNTest.txt @@ -1,98 +1,98 @@ ->>>customerdistinct$q$13-lp-stream +>>>customerdistinct$1-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customerid$q$18-lp-stream +>>>customerid$1-lp-stream LogicalProject(customerid=[$2], updateTime=[$6]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>customerorders$q$20-lp-stream +>>>customerorders$1-lp-stream LogicalProject(_uuid=[$0], id=[$2], customerid=[$6], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[=($3, $6)], joinType=[inner]) hints[TemporalJoinHint options:[4, 1, 0]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], updateTime=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) LogicalProject(customerid=[$2], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>distinctorders$q$22-lp-stream +>>>distinctorders$1-lp-stream LogicalProject(__customerid$pk$2=[$6], id=[$2], time=[$4]) hints[TimestampHint options:[2]] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>distinctorderstime$q$25-lp-stream +>>>distinctorderstime$1-lp-stream LogicalProject(__customerid$pk$3=[$6], id=[$2], time=[$4]) hints[TimestampHint options:[2]] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>entries$29-lp-stream +>>>entries$2-lp-stream LogicalProject(id=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], __timestamp=[$4]) hints[TimestampHint options:[6]] LogicalCorrelate(correlation=[$cor0], joinType=[inner], requiredColumns=[{5}]) LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], customerid=[$3], time=[$4], entries=[$5]) LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $4 DESC NULLS LAST)]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor0.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$28-lp-stream +>>>orders$3-lp-stream LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], customerid=[$3], time=[$4], entries=[$5]) hints[TimestampHint options:[4]] LogicalFilter(condition=[=($6, 1)]) hints[DedupHint] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _rownum=[ROW_NUMBER() OVER (PARTITION BY $2 ORDER BY $4 DESC NULLS LAST)]) - LogicalTableScan(table=[[orders$i$4]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] >>>customerdistinct-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) - LogicalTableScan(table=[[customerdistinct$q$13]]) + LogicalTableScan(table=[[customerdistinct$1]]) >>>customerid-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], updateTime=[$1]) - LogicalTableScan(table=[[customerid$q$18]]) + LogicalTableScan(table=[[customerid$1]]) >>>customerorders-lp-database LogicalSort(sort0=[$3], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], id=[$1], customerid=[$2], time=[$3]) - LogicalTableScan(table=[[customerorders$q$20]]) + LogicalTableScan(table=[[customerorders$1]]) >>>distinctorders-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC]) LogicalProject(__customerid$pk$2=[$0], id=[$1], time=[$2]) LogicalFilter(condition=[AND(=($3, $4), <=($5, 10))]) LogicalProject(__customerid$pk$2=[$0], id=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS FIRST)], _rank=[RANK() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS FIRST)], _denserank=[DENSE_RANK() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS FIRST)]) - LogicalTableScan(table=[[distinctorders$q$22]]) + LogicalTableScan(table=[[distinctorders$1]]) >>>distinctorderstime-lp-database LogicalSort(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ASC]) LogicalProject(__customerid$pk$3=[$0], id=[$1], time=[$2]) LogicalFilter(condition=[AND(=($3, $4), <=($5, 10))]) LogicalProject(__customerid$pk$3=[$0], id=[$1], time=[$2], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS FIRST, $1 NULLS LAST)], _rank=[RANK() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS FIRST, $1 NULLS LAST)], _denserank=[DENSE_RANK() OVER (PARTITION BY $0 ORDER BY $2 DESC NULLS FIRST, $1 NULLS LAST)]) - LogicalTableScan(table=[[distinctorderstime$q$25]]) + LogicalTableScan(table=[[distinctorderstime$1]]) >>>entries-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC]) LogicalProject(id=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], __timestamp=[$6]) - LogicalTableScan(table=[[entries$29]]) + LogicalTableScan(table=[[entries$2]]) >>>orders-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(id=[$0], _uuid=[$1], _ingest_time=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$28]]) + LogicalTableScan(table=[[orders$3]]) >>>customerdistinct-data 1000101, john.mekker@gmail.com, John Mekker, 1645396849, 2022-02-20 22:40:49.0 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-full.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-full.txt index 069ccc52e..5e4647bf4 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-full.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-full.txt @@ -1,4 +1,4 @@ ->>>_spending_by_month_category$q$28-lp-stream +>>>_spending_by_month_category$1-lp-stream LogicalProject(__customerid$pk$3=[$0], month=[$1], category=[$2], total=[$3], savings=[$4]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1, 2}], total=[SUM($3)], savings=[SUM($4)]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 2629746000, 0]] LogicalProject(__customerid$pk$3=[$6], month=[endOfMonth($4)], category=[$26], total=[$20], discount0=[$19], _uuid=[$0], _idx=[$14]) @@ -6,12 +6,12 @@ LogicalProject(__customerid$pk$3=[$0], month=[$1], category=[$2], total=[$3], sa LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], customerid0=[$6], _uuid0=[$7], _ingest_time0=[$8], email=[$9], name=[$10], lastUpdated=[$11], updateTime=[$12], _rownum=[$13], _idx=[$14], productid=[$15], quantity=[$16], unit_price=[$17], discount=[$18], discount0=[COALESCE($18, 0.0:DOUBLE)], total=[-(*($16, $17), COALESCE($18, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor23], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor23.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -19,27 +19,27 @@ LogicalProject(__customerid$pk$3=[$0], month=[$1], category=[$2], total=[$3], sa LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>category$q$15-lp-stream +>>>category$1-lp-stream LogicalProject(name=[$5], updateTime=[$6]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>customer$q$13-lp-stream +>>>customer$3-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>entries$9-lp-stream +>>>entries$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))], __timestamp=[$4]) hints[TimestampHint options:[8]] LogicalCorrelate(correlation=[$cor28], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor28.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>favorite_categories$q$31-lp-stream +>>>favorite_categories$1-lp-stream LogicalProject(__customerid$pk$4=[$2], category_name=[$1], total=[$3], month=[$0]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{1, 2, 5}], total=[SUM($3)]) hints[SlidingAggregationHint options:[1, 31536000000, 630720000]] LogicalJoin(condition=[=($5, $0)], joinType=[inner]) hints[TemporalJoinHint options:[1, 6, 0]] @@ -50,12 +50,12 @@ LogicalProject(__customerid$pk$4=[$2], category_name=[$1], total=[$3], month=[$0 LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], customerid0=[$6], _uuid0=[$7], _ingest_time0=[$8], email=[$9], name=[$10], lastUpdated=[$11], updateTime=[$12], _rownum=[$13], _idx=[$14], productid=[$15], quantity=[$16], unit_price=[$17], discount=[$18], discount0=[COALESCE($18, 0.0:DOUBLE)], total=[-(*($16, $17), COALESCE($18, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor23], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor23.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -63,14 +63,14 @@ LogicalProject(__customerid$pk$4=[$2], category_name=[$1], total=[$3], month=[$0 LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>newcustomerpromotion$q$38-lp-stream +>>>newcustomerpromotion$1-lp-stream LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name=[$4], total_spend=[$5], num_orders=[$6]) hints[TimestampHint options:[1]] LogicalStream(stream=[ADD]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[$7], __customerid$pk$5=[$8], total_spend=[$9], num_orders=[$10], time=[$11], _rownum0=[$12], __timestamp=[CASE(<($6, $11), $11, $6)]) @@ -79,75 +79,75 @@ LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name= LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalFilter(condition=[OR(>=($1, 100), >=($2, 3))]) LogicalFilter(condition=[=($4, 1)]) hints[DedupHint] LogicalProject(__customerid$pk$5=[$0], total_spend=[$1], num_orders=[$2], time=[$3], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $3 DESC NULLS LAST)]) LogicalProject(__customerid$pk$5=[$6], total_spend=[SUM($15) IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) LogicalJoin(condition=[AND(=($0, $14), =($18, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor27], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor27.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>order_again$q$25-lp-stream +>>>order_again$1-lp-stream LogicalProject(__customerid$pk$2=[$6], productid=[$15], quantity=[SUM($16) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], most_recent=[MAX($4) IGNORE NULLS OVER (PARTITION BY $6, $15 ORDER BY $4 ROWS UNBOUNDED PRECEDING)]) hints[TimestampHint options:[4]] LogicalCorrelate(correlation=[$cor25], joinType=[inner], requiredColumns=[{5}]) LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) Uncollect LogicalProject($f0=[$cor25.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>order_stats$q$35-lp-stream +>>>order_stats$1-lp-stream LogicalProject(__customerid$pk$5=[$6], total_spend=[SUM($15) IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $6 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[AND(=($0, $14), =($18, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor27], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor27.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$8-lp-stream -LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>product$q$17-lp-stream +>>>product$3-lp-stream LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>total$q$19-lp-stream +>>>total$1-lp-stream LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) hints[TimestampHint options:[4]] LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor27], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor27.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -155,57 +155,57 @@ LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1] >>>_spending_by_month_category-lp-database LogicalSort(sort0=[$0], sort1=[$1], sort2=[$2], dir0=[ASC], dir1=[DESC], dir2=[ASC]) LogicalProject(__customerid$pk$3=[$0], month=[$1], category=[$2], total=[$3], savings=[$4]) - LogicalTableScan(table=[[_spending_by_month_category$q$28]]) + LogicalTableScan(table=[[_spending_by_month_category$1]]) >>>category-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(name=[$0], updateTime=[$1]) - LogicalTableScan(table=[[category$q$15]]) + LogicalTableScan(table=[[category$1]]) >>>customer-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) >>>entries-lp-database LogicalSort(sort0=[$8], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], discount0=[$6], total=[$7], __timestamp=[$8]) - LogicalTableScan(table=[[entries$9]]) + LogicalTableScan(table=[[entries$1]]) >>>favorite_categories-lp-database LogicalSort(sort0=[$0], sort1=[$2], sort2=[$1], dir0=[ASC], dir1=[ASC], dir2=[ASC]) LogicalProject(__customerid$pk$4=[$0], category_name=[$1], total=[$2], month=[$3]) - LogicalTableScan(table=[[favorite_categories$q$31]]) + LogicalTableScan(table=[[favorite_categories$1]]) >>>newcustomerpromotion-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _source_time=[$1], customerid=[$2], email=[$3], name=[$4], total_spend=[$5], num_orders=[$6]) - LogicalTableScan(table=[[newcustomerpromotion$q$38]]) + LogicalTableScan(table=[[newcustomerpromotion$1]]) >>>order_again-lp-database LogicalSort(sort0=[$0], sort1=[$4], sort2=[$2], sort3=[$1], dir0=[ASC], dir1=[DESC], dir2=[DESC], dir3=[ASC]) LogicalProject(__customerid$pk$2=[$0], productid=[$1], quantity=[$2], num_orders=[$3], most_recent=[$4]) - LogicalTableScan(table=[[order_again$q$25]]) + LogicalTableScan(table=[[order_again$1]]) >>>order_stats-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(__customerid$pk$5=[$0], total_spend=[$1], num_orders=[$2], time=[$3]) - LogicalTableScan(table=[[order_stats$q$35]]) + LogicalTableScan(table=[[order_stats$1]]) >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$8]]) + LogicalTableScan(table=[[orders$2]]) >>>product-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6]) - LogicalTableScan(table=[[product$q$17]]) + LogicalTableScan(table=[[product$3]]) >>>total-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(___uuid$pk$1=[$0], price=[$1], discount=[$2], num=[$3], time=[$4]) - LogicalTableScan(table=[[total$q$19]]) + LogicalTableScan(table=[[total$1]]) >>>orders-data 10007140, 1000107 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-orderstats.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-orderstats.txt index caf506127..119ff5fc7 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-orderstats.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-orderstats.txt @@ -1,33 +1,33 @@ ->>>customerorderstats$q$10-lp-stream +>>>customerorderstats$1-lp-stream LogicalProject(customerid=[$3], total_price=[SUM($7) IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], num_orders=[SUM($8) IGNORE NULLS OVER (PARTITION BY $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], time=[$4]) hints[TimestampHint options:[3]] LogicalJoin(condition=[AND(=($0, $6), =($10, $4))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalProject(___uuid$pk$1=[$0], price=[$2], number=[$3], savings=[$4], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($12)], number=[COUNT()], savings=[SUM($11)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], price=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor7.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>entries$3-lp-stream +>>>entries$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], price=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))], __timestamp=[$4]) hints[TimestampHint options:[8]] LogicalCorrelate(correlation=[$cor8], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor8.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$2-lp-stream -LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>totals$q$7-lp-stream +>>>totals$1-lp-stream LogicalProject(___uuid$pk$1=[$0], price=[$2], number=[$3], savings=[$4], time=[$1]) hints[TimestampHint options:[4]] LogicalAggregate(group=[{0, 4}], price=[SUM($12)], number=[COUNT()], savings=[SUM($11)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], price=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor7.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -35,22 +35,22 @@ LogicalProject(___uuid$pk$1=[$0], price=[$2], number=[$3], savings=[$4], time=[$ >>>customerorderstats-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], total_price=[$1], num_orders=[$2], time=[$3]) - LogicalTableScan(table=[[customerorderstats$q$10]]) + LogicalTableScan(table=[[customerorderstats$1]]) >>>entries-lp-database LogicalSort(sort0=[$8], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], discount0=[$6], price=[$7], __timestamp=[$8]) - LogicalTableScan(table=[[entries$3]]) + LogicalTableScan(table=[[entries$1]]) >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) >>>totals-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(___uuid$pk$1=[$0], price=[$1], number=[$2], savings=[$3], time=[$4]) - LogicalTableScan(table=[[totals$q$7]]) + LogicalTableScan(table=[[totals$1]]) >>>orders-data 10007140, 1000107 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-recommend.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-recommend.txt index ded6bb26c..e9563abbd 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-recommend.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/c360-recommend.txt @@ -1,4 +1,4 @@ ->>>_sales_24h$q$28-lp-stream +>>>_sales_24h$1-lp-stream LogicalProject(__productid$pk$3=[$1], total=[$2], num=[$3], hour=[$0]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{1, 4}], total=[SUM($2)], num=[SUM($3)]) hints[SlidingAggregationHint options:[1, 86400000, 1728000]] LogicalJoin(condition=[=($4, $0)], joinType=[inner]) hints[TemporalJoinHint options:[1, 6, 0]] @@ -8,7 +8,7 @@ LogicalProject(__productid$pk$3=[$1], total=[$2], num=[$3], hour=[$0]) hints[Tim LogicalJoin(condition=[=($7, $13)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor16], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor16.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -16,14 +16,14 @@ LogicalProject(__productid$pk$3=[$1], total=[$2], num=[$3], hour=[$0]) hints[Tim LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>_sales_72h$q$31-lp-stream +>>>_sales_72h$1-lp-stream LogicalProject(__productid$pk$4=[$1], total=[$2], num=[$3], hour=[$0]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{1, 4}], total=[SUM($2)], num=[SUM($3)]) hints[SlidingAggregationHint options:[1, 259200000, 5184000]] LogicalJoin(condition=[=($4, $0)], joinType=[inner]) hints[TemporalJoinHint options:[1, 6, 0]] @@ -33,7 +33,7 @@ LogicalProject(__productid$pk$4=[$1], total=[$2], num=[$3], hour=[$0]) hints[Tim LogicalJoin(condition=[=($7, $13)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor16], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor16.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -41,21 +41,21 @@ LogicalProject(__productid$pk$4=[$1], total=[$2], num=[$3], hour=[$0]) hints[Tim LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>_sales_by_hour$q$25-lp-stream +>>>_sales_by_hour$1-lp-stream LogicalProject(__productid$pk$2=[$0], hour=[$1], quantity=[$2], num_orders=[$3]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], quantity=[SUM($2)], num_orders=[COUNT()]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 3600000, 0]] LogicalProject(__productid$pk$2=[$13], hour=[endOfHour($4)], quantity=[$8], _uuid=[$0], _idx=[$6]) LogicalJoin(condition=[=($7, $13)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor16], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor16.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -63,40 +63,40 @@ LogicalProject(__productid$pk$2=[$0], hour=[$1], quantity=[$2], num_orders=[$3]) LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>category$q$15-lp-stream +>>>category$1-lp-stream LogicalProject(name=[$5], updateTime=[$6]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>customer$q$13-lp-stream +>>>customer$3-lp-stream LogicalProject(customerid=[$2], _uuid=[$0], _ingest_time=[$1], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], customerid=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[epochToTimestamp($5)]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[customer$i$1]]) + LogicalTableScan(table=[[customer$1]]) ->>>entries$9-lp-stream +>>>entries$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))], __timestamp=[$4]) hints[TimestampHint options:[8]] LogicalCorrelate(correlation=[$cor19], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor19.entries]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$8-lp-stream -LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>product$q$17-lp-stream +>>>product$3-lp-stream LogicalProject(productid=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], description=[$4], category=[$5], updateTime=[$6]) hints[TimestampHint options:[6]] LogicalProject(_uuid=[$0], _ingest_time=[$1], productid=[$2], name=[$3], description=[$4], category=[$5], updateTime=[-($1, 31536000000:INTERVAL DAY(3))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[product$i$4]]) + LogicalTableScan(table=[[product$1]]) ->>>total$q$19-lp-stream +>>>total$1-lp-stream LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1]) hints[TimestampHint options:[4]] LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], entries=[$5], _idx=[$6], productid=[$7], quantity=[$8], unit_price=[$9], discount=[$10], discount0=[COALESCE($10, 0.0:DOUBLE)], total=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor18], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor18.entries]) LogicalValues(tuples=[[{ 0 }]]) @@ -104,17 +104,17 @@ LogicalProject(___uuid$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time=[$1] >>>_sales_24h-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(__productid$pk$3=[$0], total=[$1], num=[$2], hour=[$3]) - LogicalTableScan(table=[[_sales_24h$q$28]]) + LogicalTableScan(table=[[_sales_24h$1]]) >>>_sales_72h-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(__productid$pk$4=[$0], total=[$1], num=[$2], hour=[$3]) - LogicalTableScan(table=[[_sales_72h$q$31]]) + LogicalTableScan(table=[[_sales_72h$1]]) >>>_sales_by_hour-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[DESC]) LogicalProject(__productid$pk$2=[$0], hour=[$1], quantity=[$2], num_orders=[$3]) - LogicalTableScan(table=[[_sales_by_hour$q$25]]) + LogicalTableScan(table=[[_sales_by_hour$1]]) >>>_sales_trend-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) @@ -125,39 +125,39 @@ LogicalSort(sort0=[$0], dir0=[ASC]) LogicalJoin(condition=[=($0, $8)], joinType=[inner]) hints[JoinCostHint options:[DEDUP_STREAM, DEDUP_STREAM, 1, RIGHT]] LogicalFilter(condition=[=($7, 1)]) hints[DedupHint] LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $6 DESC NULLS LAST)]) - LogicalTableScan(table=[[product$q$17]]) - LogicalTableScan(table=[[_sales_24h$q$28]]) - LogicalTableScan(table=[[_sales_72h$q$31]]) + LogicalTableScan(table=[[product$3]]) + LogicalTableScan(table=[[_sales_24h$1]]) + LogicalTableScan(table=[[_sales_72h$1]]) >>>category-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(name=[$0], updateTime=[$1]) - LogicalTableScan(table=[[category$q$15]]) + LogicalTableScan(table=[[category$1]]) >>>customer-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(customerid=[$0], _uuid=[$1], _ingest_time=[$2], email=[$3], name=[$4], lastUpdated=[$5], updateTime=[$6]) - LogicalTableScan(table=[[customer$q$13]]) + LogicalTableScan(table=[[customer$3]]) >>>entries-lp-database LogicalSort(sort0=[$8], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], discount0=[$6], total=[$7], __timestamp=[$8]) - LogicalTableScan(table=[[entries$9]]) + LogicalTableScan(table=[[entries$1]]) >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$8]]) + LogicalTableScan(table=[[orders$2]]) >>>product-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(productid=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], description=[$4], category=[$5], updateTime=[$6]) - LogicalTableScan(table=[[product$q$17]]) + LogicalTableScan(table=[[product$3]]) >>>total-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(___uuid$pk$1=[$0], price=[$1], discount=[$2], num=[$3], time=[$4]) - LogicalTableScan(table=[[total$q$19]]) + LogicalTableScan(table=[[total$1]]) >>>orders-data 10007140, 1000107 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/clickstream-teaser.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/clickstream-teaser.txt index d43bb3de8..eb3278923 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/clickstream-teaser.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/clickstream-teaser.txt @@ -1,33 +1,33 @@ ->>>recommendation$q$8-lp-stream +>>>recommendation$1-lp-stream LogicalProject(url=[$2], rec=[$3], frequency=[COUNT() IGNORE NULLS OVER (PARTITION BY $2, $3 ORDER BY $4 ROWS UNBOUNDED PRECEDING)], timestamp=[$4]) hints[TimestampHint options:[3]] LogicalProject(_uuid=[$0], _uuid0=[$5], beforeURL=[$2], afterURL=[$7], timestamp=[$8]) LogicalJoin(condition=[AND(=($4, $9), <($3, $8), >=($3, -($8, 600000:INTERVAL MINUTE(2))))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[click$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] - LogicalTableScan(table=[[click$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[click$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[click$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] ->>>trending$q$4-lp-stream +>>>trending$1-lp-stream LogicalProject(url=[$0], total=[$2], timestamp=[$1]) hints[TimestampHint options:[2]] LogicalAggregate(group=[{2, 3}], total=[COUNT()]) hints[SlidingAggregationHint options:[3, 86400000, 1728000]] - LogicalTableScan(table=[[click$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[click$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] ->>>visitafter$q$6-lp-stream +>>>visitafter$1-lp-stream LogicalProject(_uuid=[$0], _uuid0=[$5], beforeURL=[$2], afterURL=[$7], timestamp=[$8]) hints[TimestampHint options:[4]] LogicalJoin(condition=[AND(=($4, $9), <($3, $8), >=($3, -($8, 600000:INTERVAL MINUTE(2))))], joinType=[inner]) hints[IntervalJoin] - LogicalTableScan(table=[[click$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] - LogicalTableScan(table=[[click$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[click$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[click$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] >>>recommendation-lp-database LogicalSort(sort0=[$0], sort1=[$2], sort2=[$1], dir0=[ASC], dir1=[DESC], dir2=[ASC]) LogicalProject(url=[$0], rec=[$1], frequency=[$2], timestamp=[$3]) - LogicalTableScan(table=[[recommendation$q$8]]) + LogicalTableScan(table=[[recommendation$1]]) >>>trending-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC], dir1=[ASC]) LogicalProject(url=[$0], total=[$1], timestamp=[$2]) - LogicalTableScan(table=[[trending$q$4]]) + LogicalTableScan(table=[[trending$1]]) >>>visitafter-lp-database LogicalSort(sort0=[$4], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _uuid0=[$1], beforeURL=[$2], afterURL=[$3], timestamp=[$4]) - LogicalTableScan(table=[[visitafter$q$6]]) + LogicalTableScan(table=[[visitafter$1]]) diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/metrics-function.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/metrics-function.txt index dd314b84f..dfed38dda 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/metrics-function.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/metrics-function.txt @@ -1,24 +1,24 @@ ->>>secreading$q$13-lp-stream +>>>secreading$1-lp-stream LogicalProject(sensorid=[$0], timeSec=[$1], temp=[$2]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], temp=[AVG($2)]) hints[TumbleAggregationHint options:[1, FUNCTION, 3, 1000, 0]] LogicalProject(sensorid=[$2], timeSec=[endOfSecond($3)], temperature=[$4], _uuid=[$0]) - LogicalTableScan(table=[[sensorreading$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[sensorreading$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] ->>>sensormaxtemp$q$15-lp-stream +>>>sensormaxtemp$1-lp-stream LogicalProject(sensorid=[$0], maxTemp=[$2], timeSec=[$1]) hints[TimestampHint options:[2]] LogicalAggregate(group=[{0, 1}], maxTemp=[MAX($2)]) hints[SlidingAggregationHint options:[1, 60000, 1200]] LogicalProject(sensorid=[$0], timeSec=[$1], temp=[$2]) LogicalAggregate(group=[{0, 1}], temp=[AVG($2)]) hints[TumbleAggregationHint options:[1, FUNCTION, 3, 1000, 0]] LogicalProject(sensorid=[$2], timeSec=[endOfSecond($3)], temperature=[$4], _uuid=[$0]) - LogicalTableScan(table=[[sensorreading$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[sensorreading$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] >>>secreading-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(sensorid=[$0], timeSec=[$1], temp=[$2]) - LogicalTableScan(table=[[secreading$q$13]]) + LogicalTableScan(table=[[secreading$1]]) >>>sensormaxtemp-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(sensorid=[$0], maxTemp=[$1], timeSec=[$2]) - LogicalTableScan(table=[[sensormaxtemp$q$15]]) + LogicalTableScan(table=[[sensormaxtemp$1]]) diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv1-small.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv1-small.txt index 0df340e41..35f8d16ee 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv1-small.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv1-small.txt @@ -1,55 +1,55 @@ ->>>customers$q$10-lp-stream +>>>customers$1-lp-stream LogicalProject(id=[$3], timestamp=[$6]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) ->>>items$6-lp-stream +>>>items$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))], __timestamp=[$6]) hints[TimestampHint options:[8]] LogicalCorrelate(correlation=[$cor9], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor9.items]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5-lp-stream +>>>orders$2-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6], TimestampHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) ->>>products$q$12-lp-stream +>>>products$3-lp-stream LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], sizing=[$4], weight_in_gram=[$5], type=[$6], category=[$7], usda_id=[$8], updated=[$9]) hints[TimestampHint options:[9]] - LogicalTableScan(table=[[products$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[9]]]]) hints[WatermarkHint options:[9]] + LogicalTableScan(table=[[products$1]], hints=[[[WatermarkHint inheritPath:[] options:[9]]]]) hints[WatermarkHint options:[9]] ->>>spending_by_month$q$19-lp-stream +>>>spending_by_month$1-lp-stream LogicalProject(__id$pk$2=[$0], month=[$1], total_spend=[$2], total_savings=[$3]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], total_spend=[SUM($2)], total_savings=[SUM($3)]) hints[TumbleAggregationHint options:[1, FUNCTION, 6, 2629746000, 0]] LogicalProject(__id$pk$2=[$7], month=[endOfMonth($6)], price=[$11], savings=[$12], _uuid=[$0], time=[$4]) LogicalJoin(condition=[AND(=($0, $10), =($13, $6))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($7, $3)], joinType=[inner]) hints[TemporalJoinHint options:[6, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(id=[$0], timestamp=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) LogicalProject(id=[$3], timestamp=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], savings=[$3], timestamp=[$1]) LogicalAggregate(group=[{0, 6}], price=[SUM($13)], savings=[SUM($12)]) hints[TumbleAggregationHint options:[6, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor8], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor8.items]) LogicalValues(tuples=[[{ 0 }]]) ->>>totals$q$16-lp-stream +>>>totals$1-lp-stream LogicalProject(___uuid$pk$1=[$0], price=[$2], savings=[$3], timestamp=[$1]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{0, 6}], price=[SUM($13)], savings=[SUM($12)]) hints[TumbleAggregationHint options:[6, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor8], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor8.items]) LogicalValues(tuples=[[{ 0 }]]) @@ -57,30 +57,30 @@ LogicalProject(___uuid$pk$1=[$0], price=[$2], savings=[$3], timestamp=[$1]) hint >>>customers-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(id=[$0], timestamp=[$1]) - LogicalTableScan(table=[[customers$q$10]]) + LogicalTableScan(table=[[customers$1]]) >>>items-lp-database LogicalSort(sort0=[$8], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], discount0=[$6], total=[$7], __timestamp=[$8]) - LogicalTableScan(table=[[items$6]]) + LogicalTableScan(table=[[items$1]]) >>>orders-lp-database LogicalSort(sort0=[$5], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], timestamp=[$6]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) >>>products-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(id=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], sizing=[$4], weight_in_gram=[$5], type=[$6], category=[$7], usda_id=[$8], updated=[$9]) - LogicalTableScan(table=[[products$q$12]]) + LogicalTableScan(table=[[products$3]]) >>>spending_by_month-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[DESC]) LogicalProject(__id$pk$2=[$0], month=[$1], total_spend=[$2], total_savings=[$3]) - LogicalTableScan(table=[[spending_by_month$q$19]]) + LogicalTableScan(table=[[spending_by_month$1]]) >>>totals-lp-database LogicalSort(sort0=[$3], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(___uuid$pk$1=[$0], price=[$1], savings=[$2], timestamp=[$3]) - LogicalTableScan(table=[[totals$q$16]]) + LogicalTableScan(table=[[totals$1]]) diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv2-small.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv2-small.txt index 8455209ec..82b9eb803 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv2-small.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/nutshopv2-small.txt @@ -1,28 +1,28 @@ ->>>customers$q$16-lp-stream +>>>customers$1-lp-stream LogicalProject(id=[$3], timestamp=[$6]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) ->>>items$6-lp-stream +>>>items$1-lp-stream LogicalProject(_uuid=[$0], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))], __timestamp=[$6]) hints[TimestampHint options:[8]] LogicalCorrelate(correlation=[$cor25], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor25.items]) LogicalValues(tuples=[[{ 0 }]]) ->>>orders$q$5-lp-stream +>>>orders$2-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6], TimestampHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) ->>>past_purchases$q$22-lp-stream +>>>past_purchases$1-lp-stream LogicalProject(__id$pk$3=[$8], productid=[$14], num_orders=[COUNT() IGNORE NULLS OVER (PARTITION BY $8, $14 ORDER BY $6 ROWS UNBOUNDED PRECEDING)], total_quantity=[SUM($9) IGNORE NULLS OVER (PARTITION BY $8, $14 ORDER BY $6 ROWS UNBOUNDED PRECEDING)], timestamp=[$6]) hints[TimestampHint options:[4]] LogicalJoin(condition=[=($14, $3)], joinType=[inner]) hints[TemporalJoinHint options:[6, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor20], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor20.items]) LogicalValues(tuples=[[{ 0 }]]) @@ -30,47 +30,47 @@ LogicalProject(__id$pk$3=[$8], productid=[$14], num_orders=[COUNT() IGNORE NULLS LogicalProject(id=[$0], timestamp=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) LogicalProject(id=[$3], timestamp=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) ->>>products$q$13-lp-stream +>>>products$3-lp-stream LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], sizing=[$4], weight_in_gram=[$5], type=[$6], category=[$7], usda_id=[$8], updated=[$9]) hints[TimestampHint options:[9]] - LogicalTableScan(table=[[products$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[9]]]]) hints[WatermarkHint options:[9]] + LogicalTableScan(table=[[products$1]], hints=[[[WatermarkHint inheritPath:[] options:[9]]]]) hints[WatermarkHint options:[9]] ->>>spending_by_month$q$19-lp-stream +>>>spending_by_month$1-lp-stream LogicalProject(__id$pk$2=[$0], month=[$1], total_spend=[$2], total_savings=[$3]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], total_spend=[SUM($2)], total_savings=[SUM($3)]) hints[TumbleAggregationHint options:[1, FUNCTION, 6, 2629746000, 0]] LogicalProject(__id$pk$2=[$7], month=[endOfMonth($6)], price=[$11], savings=[$12], _uuid=[$0], time=[$4]) LogicalJoin(condition=[AND(=($0, $10), =($13, $6))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($7, $3)], joinType=[inner]) hints[TemporalJoinHint options:[6, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(id=[$0], timestamp=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) LogicalProject(id=[$3], timestamp=[$6]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) LogicalProject(___uuid$pk$1=[$0], price=[$2], savings=[$3], timestamp=[$1]) LogicalAggregate(group=[{0, 6}], price=[SUM($13)], savings=[SUM($12)]) hints[TumbleAggregationHint options:[6, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor22], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor22.items]) LogicalValues(tuples=[[{ 0 }]]) ->>>totals$q$10-lp-stream +>>>totals$1-lp-stream LogicalProject(___uuid$pk$1=[$0], price=[$2], savings=[$3], timestamp=[$1]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{0, 6}], price=[SUM($13)], savings=[SUM($12)]) hints[TumbleAggregationHint options:[6, INSTANT, -1, 1, 0]] LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor22], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor22.items]) LogicalValues(tuples=[[{ 0 }]]) ->>>volume_by_day$q$25-lp-stream +>>>volume_by_day$1-lp-stream LogicalProject(__id$pk$4=[$0], day=[$1], quantity=[$2], total=[$3], total_weight=[$4]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], quantity=[SUM($2)], total=[SUM($3)], total_weight=[SUM($4)]) hints[TumbleAggregationHint options:[1, FUNCTION, 6, 86400000, 0]] LogicalProject(__id$pk$4=[$14], day=[endOfDay($6)], quantity=[$9], total=[$13], $f4=[*($9, $19)], _uuid=[$0], _idx=[$7]) @@ -78,52 +78,52 @@ LogicalProject(__id$pk$4=[$0], day=[$1], quantity=[$2], total=[$3], total_weight LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[$6], _idx=[$7], productid=[$8], quantity=[$9], unit_price=[$10], discount=[$11], discount0=[COALESCE($11, 0.0:DOUBLE)], total=[-(*($9, $10), COALESCE($11, 0.0:DOUBLE))]) LogicalCorrelate(correlation=[$cor24], joinType=[inner], requiredColumns=[{5}]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], items=[$5], timestamp=[epochToTimestamp(/($4, 1000))]) hints[WatermarkHint options:[6]] - LogicalTableScan(table=[[orders$i$4]]) + LogicalTableScan(table=[[orders$1]]) Uncollect LogicalProject($f0=[$cor24.items]) LogicalValues(tuples=[[{ 0 }]]) LogicalFilter(condition=[=($10, 1)]) hints[DedupHint] LogicalProject(id=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], sizing=[$4], weight_in_gram=[$5], type=[$6], category=[$7], usda_id=[$8], updated=[$9], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $9 DESC NULLS LAST)]) LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], name=[$3], sizing=[$4], weight_in_gram=[$5], type=[$6], category=[$7], usda_id=[$8], updated=[$9]) - LogicalTableScan(table=[[products$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[9]]]]) hints[WatermarkHint options:[9]] + LogicalTableScan(table=[[products$1]], hints=[[[WatermarkHint inheritPath:[] options:[9]]]]) hints[WatermarkHint options:[9]] >>>customers-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(id=[$0], timestamp=[$1]) - LogicalTableScan(table=[[customers$q$16]]) + LogicalTableScan(table=[[customers$1]]) >>>items-lp-database LogicalSort(sort0=[$8], sort1=[$0], sort2=[$1], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC]) LogicalProject(_uuid=[$0], _idx=[$1], productid=[$2], quantity=[$3], unit_price=[$4], discount=[$5], discount0=[$6], total=[$7], __timestamp=[$8]) - LogicalTableScan(table=[[items$6]]) + LogicalTableScan(table=[[items$1]]) >>>orders-lp-database LogicalSort(sort0=[$5], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4], timestamp=[$6]) - LogicalTableScan(table=[[orders$q$5]]) + LogicalTableScan(table=[[orders$2]]) >>>past_purchases-lp-database LogicalSort(sort0=[$0], sort1=[$2], sort2=[$3], sort3=[$1], dir0=[ASC], dir1=[DESC], dir2=[DESC], dir3=[ASC]) LogicalProject(__id$pk$3=[$0], productid=[$1], num_orders=[$2], total_quantity=[$3], timestamp=[$4]) - LogicalTableScan(table=[[past_purchases$q$22]]) + LogicalTableScan(table=[[past_purchases$1]]) >>>products-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(id=[$0], _uuid=[$1], _ingest_time=[$2], name=[$3], sizing=[$4], weight_in_gram=[$5], type=[$6], category=[$7], usda_id=[$8], updated=[$9]) - LogicalTableScan(table=[[products$q$13]]) + LogicalTableScan(table=[[products$3]]) >>>spending_by_month-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[DESC]) LogicalProject(__id$pk$2=[$0], month=[$1], total_spend=[$2], total_savings=[$3]) - LogicalTableScan(table=[[spending_by_month$q$19]]) + LogicalTableScan(table=[[spending_by_month$1]]) >>>totals-lp-database LogicalSort(sort0=[$3], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(___uuid$pk$1=[$0], price=[$1], savings=[$2], timestamp=[$3]) - LogicalTableScan(table=[[totals$q$10]]) + LogicalTableScan(table=[[totals$1]]) >>>volume_by_day-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[DESC]) LogicalProject(__id$pk$4=[$0], day=[$1], quantity=[$2], total=[$3], total_weight=[$4]) - LogicalTableScan(table=[[volume_by_day$q$25]]) + LogicalTableScan(table=[[volume_by_day$1]]) diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/quickstart-teaser-local.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/quickstart-teaser-local.txt index f30e3f943..1ec7723b8 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/quickstart-teaser-local.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/quickstart-teaser-local.txt @@ -1,57 +1,57 @@ ->>>orders$q$2-lp-stream -LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] +>>>orders$2-lp-stream +LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]], [TimestampHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4], TimestampHint options:[4]] ->>>spending$q$13-lp-stream +>>>spending$1-lp-stream LogicalProject(__id$pk$2=[$0], week=[$1], spend=[$2], saved=[$3]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], spend=[SUM($2)], saved=[SUM($3)]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 604800000, 0]] LogicalProject(__id$pk$2=[$6], week=[endOfWeek($4)], price=[$10], saving=[$11], _uuid=[$0]) LogicalJoin(condition=[AND(=($0, $9), =($12, $4))], joinType=[inner]) hints[IntervalJoin] LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 1, 0]] - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalFilter(condition=[=($2, 1)]) hints[DedupHint] LogicalProject(id=[$0], time=[$1], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $1 DESC NULLS LAST)]) LogicalProject(id=[$3], time=[$4]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] LogicalProject(___uuid$pk$1=[$0], price=[$2], saving=[$3], time=[$1]) LogicalAggregate(group=[{0, 4}], price=[SUM($1)], saving=[SUM($2)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(___uuid$pk$1=[$0], total=[-(*($8, $9), CASE(IS NOT NULL($10), CAST($10):DOUBLE NOT NULL, 0.0:DOUBLE))], $f2=[CASE(IS NOT NULL($10), CAST($10):DOUBLE NOT NULL, 0.0:DOUBLE)], _idx=[$6], time=[$4]) LogicalCorrelate(correlation=[$cor8], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor8.items]) LogicalValues(tuples=[[{ 0 }]]) ->>>totals$q$7-lp-stream +>>>totals$1-lp-stream LogicalProject(___uuid$pk$1=[$0], price=[$2], saving=[$3], time=[$1]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{0, 4}], price=[SUM($1)], saving=[SUM($2)]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]] LogicalProject(___uuid$pk$1=[$0], total=[-(*($8, $9), CASE(IS NOT NULL($10), CAST($10):DOUBLE NOT NULL, 0.0:DOUBLE))], $f2=[CASE(IS NOT NULL($10), CAST($10):DOUBLE NOT NULL, 0.0:DOUBLE)], _idx=[$6], time=[$4]) LogicalCorrelate(correlation=[$cor8], joinType=[inner], requiredColumns=[{5}]) - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] Uncollect LogicalProject($f0=[$cor8.items]) LogicalValues(tuples=[[{ 0 }]]) ->>>users$q$10-lp-stream +>>>users$1-lp-stream LogicalProject(id=[$3], time=[$4]) hints[TimestampHint options:[1]] - LogicalTableScan(table=[[orders$i$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[orders$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] >>>orders-lp-database LogicalSort(sort0=[$4], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], id=[$2], customerid=[$3], time=[$4]) - LogicalTableScan(table=[[orders$q$2]]) + LogicalTableScan(table=[[orders$2]]) >>>spending-lp-database LogicalSort(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[DESC]) LogicalProject(__id$pk$2=[$0], week=[$1], spend=[$2], saved=[$3]) - LogicalTableScan(table=[[spending$q$13]]) + LogicalTableScan(table=[[spending$1]]) >>>totals-lp-database LogicalSort(sort0=[$3], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(___uuid$pk$1=[$0], price=[$1], saving=[$2], time=[$3]) - LogicalTableScan(table=[[totals$q$7]]) + LogicalTableScan(table=[[totals$1]]) >>>users-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(id=[$0], time=[$1]) - LogicalTableScan(table=[[users$q$10]]) + LogicalTableScan(table=[[users$1]]) diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/repo.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/repo.txt index ca135f173..df279615c 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/repo.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/repo.txt @@ -1,19 +1,19 @@ ->>>package$q$7-lp-stream +>>>package$1-lp-stream LogicalProject(name=[$2], submissionTime=[$17]) hints[TimestampHint options:[1]] LogicalProject(_uuid=[$0], _ingest_time=[$1], name=[$2], version=[$3], variant=[$4], latest=[$5], type=[$6], license=[$7], repository=[$8], homepage=[$9], documentation=[$10], readme=[$11], description=[$12], uniqueId=[$13], file=[$14], hash=[$15], authorid=[$16], submissionTime=[$17], keywords=[$18], variant0=[COALESCE($4, 'default')], repoURL=[CONCAT('https://repository.datasqrl.com/', $14)]) hints[WatermarkHint options:[17]] - LogicalTableScan(table=[[submission$i$1]]) + LogicalTableScan(table=[[submission$1]]) ->>>submission$q$2-lp-stream +>>>submission$2-lp-stream LogicalProject(_uuid=[$0], _ingest_time=[$1], name=[$2], version=[$3], variant=[$4], latest=[$5], type=[$6], license=[$7], repository=[$8], homepage=[$9], documentation=[$10], readme=[$11], description=[$12], uniqueId=[$13], file=[$14], hash=[$15], authorid=[$16], submissionTime=[$17], keywords=[$18], variant0=[COALESCE($4, 'default')], repoURL=[CONCAT('https://repository.datasqrl.com/', $14)]) hints[WatermarkHint options:[17], TimestampHint options:[17]] - LogicalTableScan(table=[[submission$i$1]]) + LogicalTableScan(table=[[submission$1]]) >>>package-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(name=[$0], submissionTime=[$1]) - LogicalTableScan(table=[[package$q$7]]) + LogicalTableScan(table=[[package$1]]) >>>submission-lp-database LogicalSort(sort0=[$17], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(_uuid=[$0], _ingest_time=[$1], name=[$2], version=[$3], variant=[$4], latest=[$5], type=[$6], license=[$7], repository=[$8], homepage=[$9], documentation=[$10], readme=[$11], description=[$12], uniqueId=[$13], file=[$14], hash=[$15], authorid=[$16], submissionTime=[$17], variant0=[$19], repoURL=[$20]) - LogicalTableScan(table=[[submission$q$2]]) + LogicalTableScan(table=[[submission$2]]) diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/sensors-teaser.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/sensors-teaser.txt index d45dc8943..44e6555d4 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/sensors-teaser.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkPhysicalUseCaseTest/sensors-teaser.txt @@ -1,29 +1,29 @@ ->>>machine$q$18-lp-stream +>>>machine$1-lp-stream LogicalProject(machineid=[$1], maxTemp=[$2], avgTemp=[$3], timeMin=[$0]) hints[TimestampHint options:[3]] LogicalAggregate(group=[{1, 6}], maxTemp=[MAX($2)], avgTemp=[AVG($2)]) hints[SlidingAggregationHint options:[1, 3600000, 72000]] LogicalJoin(condition=[=($3, $0)], joinType=[inner]) hints[TemporalJoinHint options:[1, 4, 0]] LogicalProject(sensorid=[$0], timeMin=[$1], temp=[$2]) LogicalAggregate(group=[{0, 1}], temp=[AVG($2)]) hints[TumbleAggregationHint options:[1, FUNCTION, 3, 60000, 0]] LogicalProject(sensorid=[$2], timeMin=[endOfMinute($3)], temperature=[$4], _uuid=[$0]) - LogicalTableScan(table=[[sensorreading$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[sensorreading$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] LogicalFilter(condition=[=($5, 1)]) hints[DedupHint] LogicalProject(id=[$0], _uuid=[$1], _ingest_time=[$2], machineid=[$3], placed=[$4], _rownum=[ROW_NUMBER() OVER (PARTITION BY $0 ORDER BY $4 DESC NULLS LAST)]) LogicalProject(id=[$2], _uuid=[$0], _ingest_time=[$1], machineid=[$3], placed=[$4]) - LogicalTableScan(table=[[sensors$i$10]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] + LogicalTableScan(table=[[sensors$1]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]] ->>>minreadings$q$13-lp-stream +>>>minreadings$1-lp-stream LogicalProject(sensorid=[$0], timeMin=[$1], temp=[$2]) hints[TimestampHint options:[1]] LogicalAggregate(group=[{0, 1}], temp=[AVG($2)]) hints[TumbleAggregationHint options:[1, FUNCTION, 3, 60000, 0]] LogicalProject(sensorid=[$2], timeMin=[endOfMinute($3)], temperature=[$4], _uuid=[$0]) - LogicalTableScan(table=[[sensorreading$i$7]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] + LogicalTableScan(table=[[sensorreading$1]], hints=[[[WatermarkHint inheritPath:[] options:[3]]]]) hints[WatermarkHint options:[3]] >>>machine-lp-database LogicalSort(sort0=[$0], dir0=[ASC]) LogicalProject(machineid=[$0], maxTemp=[$1], avgTemp=[$2], timeMin=[$3]) - LogicalTableScan(table=[[machine$q$18]]) + LogicalTableScan(table=[[machine$1]]) >>>minreadings-lp-database LogicalSort(sort0=[$1], sort1=[$0], dir0=[DESC-nulls-last], dir1=[ASC]) LogicalProject(sensorid=[$0], timeMin=[$1], temp=[$2]) - LogicalTableScan(table=[[minreadings$q$13]]) + LogicalTableScan(table=[[minreadings$1]]) diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv1.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv1.txt index db136d066..2499e01e3 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv1.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv1.txt @@ -1,23 +1,23 @@ >>>database -CREATE INDEX IF NOT EXISTS customer$q$13_btree_c3c4 ON customer$q$13 USING btree (email,name); -CREATE INDEX IF NOT EXISTS customer$q$13_hash_c4 ON customer$q$13 USING hash (name); -CREATE INDEX IF NOT EXISTS newcustomerpromotion$q$38_hash_c2 ON newcustomerpromotion$q$38 USING hash (customerid); -CREATE INDEX IF NOT EXISTS order_again$q$25_btree_c0c3 ON order_again$q$25 USING btree (__customerid$pk$2,num_orders); -CREATE INDEX IF NOT EXISTS orders$q$8_btree_c3c2c4 ON orders$q$8 USING btree (customerid,id,time); -CREATE INDEX IF NOT EXISTS orders$q$8_btree_c3c4 ON orders$q$8 USING btree (customerid,time); -CREATE INDEX IF NOT EXISTS orders$q$8_hash_c2 ON orders$q$8 USING hash (id); -CREATE INDEX IF NOT EXISTS product$q$17_btree_c3c5 ON product$q$17 USING btree (name,category); -CREATE INDEX IF NOT EXISTS product$q$17_hash_c5 ON product$q$17 USING hash (category); -CREATE TABLE IF NOT EXISTS category$q$15 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); -CREATE TABLE IF NOT EXISTS customer$q$13 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); -CREATE TABLE IF NOT EXISTS entries$9 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS favorite_categories$q$31 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); -CREATE TABLE IF NOT EXISTS newcustomerpromotion$q$38 (_uuid TEXT NOT NULL,_source_time TIMESTAMP WITH TIME ZONE NOT NULL,customerid BIGINT NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS order_again$q$25 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); -CREATE TABLE IF NOT EXISTS order_stats$q$35 (__customerid$pk$5 BIGINT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$5)); -CREATE TABLE IF NOT EXISTS orders$q$8 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,entries bytea[] NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS product$q$17 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); -CREATE TABLE IF NOT EXISTS total$q$19 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION NOT NULL,num BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); +CREATE INDEX IF NOT EXISTS customer$3_btree_c3c4 ON customer$3 USING btree (email,name); +CREATE INDEX IF NOT EXISTS customer$3_hash_c4 ON customer$3 USING hash (name); +CREATE INDEX IF NOT EXISTS newcustomerpromotion$1_hash_c2 ON newcustomerpromotion$1 USING hash (customerid); +CREATE INDEX IF NOT EXISTS order_again$1_btree_c0c3 ON order_again$1 USING btree (__customerid$pk$2,num_orders); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c2c4 ON orders$2 USING btree (customerid,id,time); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c4 ON orders$2 USING btree (customerid,time); +CREATE INDEX IF NOT EXISTS orders$2_hash_c2 ON orders$2 USING hash (id); +CREATE INDEX IF NOT EXISTS product$3_btree_c3c5 ON product$3 USING btree (name,category); +CREATE INDEX IF NOT EXISTS product$3_hash_c5 ON product$3 USING hash (category); +CREATE TABLE IF NOT EXISTS category$1 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); +CREATE TABLE IF NOT EXISTS customer$3 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); +CREATE TABLE IF NOT EXISTS entries$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS favorite_categories$1 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); +CREATE TABLE IF NOT EXISTS newcustomerpromotion$1 (_uuid TEXT NOT NULL,_source_time TIMESTAMP WITH TIME ZONE NOT NULL,customerid BIGINT NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS order_again$1 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); +CREATE TABLE IF NOT EXISTS order_stats$1 (__customerid$pk$5 BIGINT NOT NULL,total_spend DOUBLE PRECISION NOT NULL,num_orders BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$5)); +CREATE TABLE IF NOT EXISTS orders$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,entries bytea[] NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS product$3 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); +CREATE TABLE IF NOT EXISTS total$1 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION NOT NULL,num BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); >>>query-allcustomers { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv2.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv2.txt index b0f2a61db..21fc0a8e2 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv2.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-full_c360-full-graphqlv2.txt @@ -1,10 +1,10 @@ >>>database -CREATE INDEX IF NOT EXISTS product$q$17_hash_c5 ON product$q$17 USING hash (category); -CREATE TABLE IF NOT EXISTS category$q$15 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); -CREATE TABLE IF NOT EXISTS customer$q$13 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); -CREATE TABLE IF NOT EXISTS favorite_categories$q$31 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); -CREATE TABLE IF NOT EXISTS order_again$q$25 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); -CREATE TABLE IF NOT EXISTS product$q$17 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); +CREATE INDEX IF NOT EXISTS product$3_hash_c5 ON product$3 USING hash (category); +CREATE TABLE IF NOT EXISTS category$1 (name TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); +CREATE TABLE IF NOT EXISTS customer$3 (customerid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,email TEXT NOT NULL,name TEXT NOT NULL,lastUpdated BIGINT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (customerid)); +CREATE TABLE IF NOT EXISTS favorite_categories$1 (__customerid$pk$4 BIGINT NOT NULL,category_name TEXT NOT NULL,total DOUBLE PRECISION NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$4,category_name)); +CREATE TABLE IF NOT EXISTS order_again$1 (__customerid$pk$2 BIGINT NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,num_orders BIGINT NOT NULL,most_recent TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__customerid$pk$2,productid)); +CREATE TABLE IF NOT EXISTS product$3 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); >>>query-category { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-search_c360-search-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-search_c360-search-graphql.txt index 41c1222ca..05b2839f9 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-search_c360-search-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/c360-search_c360-search-graphql.txt @@ -1,6 +1,6 @@ >>>database -CREATE INDEX IF NOT EXISTS product$q$4_text_c3c4c5 ON product$q$4 USING GIN (to_tsvector('english', coalesce(name, '') || ' ' || coalesce(description, '') || ' ' || coalesce(category, '') )); -CREATE TABLE IF NOT EXISTS product$q$4 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); +CREATE INDEX IF NOT EXISTS product$3_text_c3c4c5 ON product$3 USING GIN (to_tsvector('english', coalesce(name, '') || ' ' || coalesce(description, '') || ' ' || coalesce(category, '') )); +CREATE TABLE IF NOT EXISTS product$3 (productid BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,description TEXT NOT NULL,category TEXT NOT NULL,updateTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (productid)); >>>query-productsearch { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/clickstream-teaser_clickstream-teaser-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/clickstream-teaser_clickstream-teaser-graphql.txt index 456044e3b..62edaffab 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/clickstream-teaser_clickstream-teaser-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/clickstream-teaser_clickstream-teaser-graphql.txt @@ -1,6 +1,6 @@ >>>database -CREATE TABLE IF NOT EXISTS recommendation$q$8 (url TEXT NOT NULL,rec TEXT NOT NULL,frequency BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url,rec)); -CREATE TABLE IF NOT EXISTS trending$q$4 (url TEXT NOT NULL,total BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url)); +CREATE TABLE IF NOT EXISTS recommendation$1 (url TEXT NOT NULL,rec TEXT NOT NULL,frequency BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url,rec)); +CREATE TABLE IF NOT EXISTS trending$1 (url TEXT NOT NULL,total BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (url)); >>>query-recommendation { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv1-small_v1graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv1-small_v1graphql.txt index cee7e8676..fbbd84628 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv1-small_v1graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv1-small_v1graphql.txt @@ -1,30 +1,30 @@ >>>database -CREATE INDEX IF NOT EXISTS items$6_btree_c0c2c3 ON items$6 USING btree (_uuid,productid,quantity); -CREATE INDEX IF NOT EXISTS items$6_btree_c0c3c7 ON items$6 USING btree (_uuid,quantity,total); -CREATE INDEX IF NOT EXISTS items$6_btree_c0c4c5 ON items$6 USING btree (_uuid,unit_price,discount); -CREATE INDEX IF NOT EXISTS items$6_btree_c0c5c2 ON items$6 USING btree (_uuid,discount,productid); -CREATE INDEX IF NOT EXISTS items$6_btree_c0c7c2 ON items$6 USING btree (_uuid,total,productid); -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c2c3c4 ON orders$q$5 USING btree (id,customerid,time); -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c2c4 ON orders$q$5 USING btree (id,time); -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c3c4c6 ON orders$q$5 USING btree (customerid,time,timestamp); -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c3c6 ON orders$q$5 USING btree (customerid,timestamp); -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c4c6c2 ON orders$q$5 USING btree (time,timestamp,id); -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c6c2c3 ON orders$q$5 USING btree (timestamp,id,customerid); -CREATE INDEX IF NOT EXISTS products$q$12_btree_c3 ON products$q$12 USING btree (name); -CREATE INDEX IF NOT EXISTS products$q$12_btree_c4 ON products$q$12 USING btree (sizing); -CREATE INDEX IF NOT EXISTS products$q$12_btree_c5 ON products$q$12 USING btree (weight_in_gram); -CREATE INDEX IF NOT EXISTS products$q$12_btree_c6 ON products$q$12 USING btree (type); -CREATE INDEX IF NOT EXISTS products$q$12_btree_c7 ON products$q$12 USING btree (category); -CREATE INDEX IF NOT EXISTS products$q$12_btree_c8 ON products$q$12 USING btree (usda_id); -CREATE INDEX IF NOT EXISTS products$q$12_btree_c9 ON products$q$12 USING btree (updated); -CREATE INDEX IF NOT EXISTS spending_by_month$q$19_btree_c0c2c3 ON spending_by_month$q$19 USING btree (__id$pk$2,total_spend,total_savings); -CREATE INDEX IF NOT EXISTS spending_by_month$q$19_btree_c0c3 ON spending_by_month$q$19 USING btree (__id$pk$2,total_savings); -CREATE TABLE IF NOT EXISTS customers$q$10 (id BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); -CREATE TABLE IF NOT EXISTS items$6 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS orders$q$5 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time BIGINT NOT NULL,items bytea[] NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS products$q$12 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,sizing TEXT NOT NULL,weight_in_gram BIGINT NOT NULL,type TEXT NOT NULL,category TEXT NOT NULL,usda_id BIGINT NOT NULL,updated TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); -CREATE TABLE IF NOT EXISTS spending_by_month$q$19 (__id$pk$2 BIGINT NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL,total_spend DOUBLE PRECISION NOT NULL,total_savings DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,month)); -CREATE TABLE IF NOT EXISTS totals$q$16 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,savings DOUBLE PRECISION NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); +CREATE INDEX IF NOT EXISTS items$1_btree_c0c2c3 ON items$1 USING btree (_uuid,productid,quantity); +CREATE INDEX IF NOT EXISTS items$1_btree_c0c3c7 ON items$1 USING btree (_uuid,quantity,total); +CREATE INDEX IF NOT EXISTS items$1_btree_c0c4c5 ON items$1 USING btree (_uuid,unit_price,discount); +CREATE INDEX IF NOT EXISTS items$1_btree_c0c5c2 ON items$1 USING btree (_uuid,discount,productid); +CREATE INDEX IF NOT EXISTS items$1_btree_c0c7c2 ON items$1 USING btree (_uuid,total,productid); +CREATE INDEX IF NOT EXISTS orders$2_btree_c2c3c4 ON orders$2 USING btree (id,customerid,time); +CREATE INDEX IF NOT EXISTS orders$2_btree_c2c4 ON orders$2 USING btree (id,time); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c4c6 ON orders$2 USING btree (customerid,time,timestamp); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c6 ON orders$2 USING btree (customerid,timestamp); +CREATE INDEX IF NOT EXISTS orders$2_btree_c4c6c2 ON orders$2 USING btree (time,timestamp,id); +CREATE INDEX IF NOT EXISTS orders$2_btree_c6c2c3 ON orders$2 USING btree (timestamp,id,customerid); +CREATE INDEX IF NOT EXISTS products$3_btree_c3 ON products$3 USING btree (name); +CREATE INDEX IF NOT EXISTS products$3_btree_c4 ON products$3 USING btree (sizing); +CREATE INDEX IF NOT EXISTS products$3_btree_c5 ON products$3 USING btree (weight_in_gram); +CREATE INDEX IF NOT EXISTS products$3_btree_c6 ON products$3 USING btree (type); +CREATE INDEX IF NOT EXISTS products$3_btree_c7 ON products$3 USING btree (category); +CREATE INDEX IF NOT EXISTS products$3_btree_c8 ON products$3 USING btree (usda_id); +CREATE INDEX IF NOT EXISTS products$3_btree_c9 ON products$3 USING btree (updated); +CREATE INDEX IF NOT EXISTS spending_by_month$1_btree_c0c2c3 ON spending_by_month$1 USING btree (__id$pk$2,total_spend,total_savings); +CREATE INDEX IF NOT EXISTS spending_by_month$1_btree_c0c3 ON spending_by_month$1 USING btree (__id$pk$2,total_savings); +CREATE TABLE IF NOT EXISTS customers$1 (id BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE TABLE IF NOT EXISTS items$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS orders$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time BIGINT NOT NULL,items bytea[] NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS products$3 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,sizing TEXT NOT NULL,weight_in_gram BIGINT NOT NULL,type TEXT NOT NULL,category TEXT NOT NULL,usda_id BIGINT NOT NULL,updated TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE TABLE IF NOT EXISTS spending_by_month$1 (__id$pk$2 BIGINT NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL,total_spend DOUBLE PRECISION NOT NULL,total_savings DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,month)); +CREATE TABLE IF NOT EXISTS totals$1 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,savings DOUBLE PRECISION NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); >>>query-product { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv2-small_v2graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv2-small_v2graphql.txt index 14f71f8c0..8330e1a84 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv2-small_v2graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/nutshopv2-small_v2graphql.txt @@ -1,15 +1,15 @@ >>>database -CREATE INDEX IF NOT EXISTS orders$q$5_btree_c3c6 ON orders$q$5 USING btree (customerid,timestamp); -CREATE INDEX IF NOT EXISTS orders$q$5_hash_c2 ON orders$q$5 USING hash (id); -CREATE INDEX IF NOT EXISTS products$q$13_hash_c3 ON products$q$13 USING hash (name); -CREATE TABLE IF NOT EXISTS customers$q$16 (id BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); -CREATE TABLE IF NOT EXISTS items$6 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS orders$q$5 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time BIGINT NOT NULL,items bytea[] NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS past_purchases$q$22 (__id$pk$3 BIGINT NOT NULL,productid BIGINT NOT NULL,num_orders BIGINT NOT NULL,total_quantity BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__id$pk$3,productid)); -CREATE TABLE IF NOT EXISTS products$q$13 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,sizing TEXT NOT NULL,weight_in_gram BIGINT NOT NULL,type TEXT NOT NULL,category TEXT NOT NULL,usda_id BIGINT NOT NULL,updated TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); -CREATE TABLE IF NOT EXISTS spending_by_month$q$19 (__id$pk$2 BIGINT NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL,total_spend DOUBLE PRECISION NOT NULL,total_savings DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,month)); -CREATE TABLE IF NOT EXISTS totals$q$10 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,savings DOUBLE PRECISION NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); -CREATE TABLE IF NOT EXISTS volume_by_day$q$25 (__id$pk$4 BIGINT NOT NULL,day TIMESTAMP WITH TIME ZONE NOT NULL,quantity BIGINT NOT NULL,total DOUBLE PRECISION NOT NULL,total_weight BIGINT NOT NULL , PRIMARY KEY (__id$pk$4,day)); +CREATE INDEX IF NOT EXISTS orders$2_btree_c3c6 ON orders$2 USING btree (customerid,timestamp); +CREATE INDEX IF NOT EXISTS orders$2_hash_c2 ON orders$2 USING hash (id); +CREATE INDEX IF NOT EXISTS products$3_hash_c3 ON products$3 USING hash (name); +CREATE TABLE IF NOT EXISTS customers$1 (id BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE TABLE IF NOT EXISTS items$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,discount0 DOUBLE PRECISION NOT NULL,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS orders$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time BIGINT NOT NULL,items bytea[] NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS past_purchases$1 (__id$pk$3 BIGINT NOT NULL,productid BIGINT NOT NULL,num_orders BIGINT NOT NULL,total_quantity BIGINT NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (__id$pk$3,productid)); +CREATE TABLE IF NOT EXISTS products$3 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,sizing TEXT NOT NULL,weight_in_gram BIGINT NOT NULL,type TEXT NOT NULL,category TEXT NOT NULL,usda_id BIGINT NOT NULL,updated TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE TABLE IF NOT EXISTS spending_by_month$1 (__id$pk$2 BIGINT NOT NULL,month TIMESTAMP WITH TIME ZONE NOT NULL,total_spend DOUBLE PRECISION NOT NULL,total_savings DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,month)); +CREATE TABLE IF NOT EXISTS totals$1 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,savings DOUBLE PRECISION NOT NULL,timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); +CREATE TABLE IF NOT EXISTS volume_by_day$1 (__id$pk$4 BIGINT NOT NULL,day TIMESTAMP WITH TIME ZONE NOT NULL,quantity BIGINT NOT NULL,total DOUBLE PRECISION NOT NULL,total_weight BIGINT NOT NULL , PRIMARY KEY (__id$pk$4,day)); >>>query-allcustomers { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt index 509c7d961..9ffeda47e 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt @@ -1,11 +1,11 @@ >>>database -CREATE INDEX IF NOT EXISTS orders$q$2_hash_c3 ON orders$q$2 USING hash (customerid); -CREATE INDEX IF NOT EXISTS orders$q$2_hash_c4 ON orders$q$2 USING hash (time); -CREATE TABLE IF NOT EXISTS items$3 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS orders$q$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,items bytea[] NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS spending$q$13 (__id$pk$2 BIGINT NOT NULL,week TIMESTAMP WITH TIME ZONE NOT NULL,spend DOUBLE PRECISION NOT NULL,saved DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,week)); -CREATE TABLE IF NOT EXISTS totals$q$7 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,saving DOUBLE PRECISION NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); -CREATE TABLE IF NOT EXISTS users$q$10 (id BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE INDEX IF NOT EXISTS orders$2_hash_c3 ON orders$2 USING hash (customerid); +CREATE INDEX IF NOT EXISTS orders$2_hash_c4 ON orders$2 USING hash (time); +CREATE TABLE IF NOT EXISTS items$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,productid BIGINT NOT NULL,quantity BIGINT NOT NULL,unit_price DOUBLE PRECISION NOT NULL,discount DOUBLE PRECISION ,total DOUBLE PRECISION NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS orders$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,id BIGINT NOT NULL,customerid BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL,items bytea[] NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS spending$1 (__id$pk$2 BIGINT NOT NULL,week TIMESTAMP WITH TIME ZONE NOT NULL,spend DOUBLE PRECISION NOT NULL,saved DOUBLE PRECISION NOT NULL , PRIMARY KEY (__id$pk$2,week)); +CREATE TABLE IF NOT EXISTS totals$1 (___uuid$pk$1 TEXT NOT NULL,price DOUBLE PRECISION NOT NULL,saving DOUBLE PRECISION NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (___uuid$pk$1)); +CREATE TABLE IF NOT EXISTS users$1 (id BIGINT NOT NULL,time TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); >>>query-orders { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/repo_repo-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/repo_repo-graphql.txt index 20897c321..947046496 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/repo_repo-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/repo_repo-graphql.txt @@ -1,12 +1,12 @@ >>>database -CREATE INDEX IF NOT EXISTS submission$q$2_btree_c2c3c4 ON submission$q$2 USING btree (name,version,variant); -CREATE INDEX IF NOT EXISTS submission$q$2_btree_c2c4 ON submission$q$2 USING btree (name,variant); -CREATE INDEX IF NOT EXISTS topicpackages$q$11_hash_c1 ON topicpackages$q$11 USING hash (topicName); -CREATE TABLE IF NOT EXISTS keywords$3 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,name TEXT NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); -CREATE TABLE IF NOT EXISTS package$q$7 (name TEXT NOT NULL,submissionTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); -CREATE TABLE IF NOT EXISTS submission$q$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,version TEXT NOT NULL,variant TEXT ,latest BOOLEAN NOT NULL,type TEXT ,license TEXT ,repository TEXT ,homepage TEXT ,documentation TEXT ,readme TEXT ,description TEXT ,uniqueId TEXT NOT NULL,file TEXT NOT NULL,hash TEXT NOT NULL,authorid TEXT NOT NULL,submissionTime TIMESTAMP WITH TIME ZONE NOT NULL,keywords bytea[] NOT NULL,variant0 TEXT NOT NULL,repoURL TEXT NOT NULL , PRIMARY KEY (_uuid)); -CREATE TABLE IF NOT EXISTS topicpackages$q$11 (pkgName TEXT NOT NULL,topicName TEXT NOT NULL,numSubmissions BIGINT NOT NULL,lastSubmission TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (pkgName,topicName)); -CREATE TABLE IF NOT EXISTS topicsearch$q$14 (topicName TEXT NOT NULL,numPackages BIGINT NOT NULL,submissionTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (topicName)); +CREATE INDEX IF NOT EXISTS submission$2_btree_c2c3c4 ON submission$2 USING btree (name,version,variant); +CREATE INDEX IF NOT EXISTS submission$2_btree_c2c4 ON submission$2 USING btree (name,variant); +CREATE INDEX IF NOT EXISTS topicpackages$1_hash_c1 ON topicpackages$1 USING hash (topicName); +CREATE TABLE IF NOT EXISTS keywords$1 (_uuid TEXT NOT NULL,_idx INTEGER NOT NULL,name TEXT NOT NULL,__timestamp TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (_uuid,_idx)); +CREATE TABLE IF NOT EXISTS package$1 (name TEXT NOT NULL,submissionTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (name)); +CREATE TABLE IF NOT EXISTS submission$2 (_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,name TEXT NOT NULL,version TEXT NOT NULL,variant TEXT ,latest BOOLEAN NOT NULL,type TEXT ,license TEXT ,repository TEXT ,homepage TEXT ,documentation TEXT ,readme TEXT ,description TEXT ,uniqueId TEXT NOT NULL,file TEXT NOT NULL,hash TEXT NOT NULL,authorid TEXT NOT NULL,submissionTime TIMESTAMP WITH TIME ZONE NOT NULL,keywords bytea[] NOT NULL,variant0 TEXT NOT NULL,repoURL TEXT NOT NULL , PRIMARY KEY (_uuid)); +CREATE TABLE IF NOT EXISTS topicpackages$1 (pkgName TEXT NOT NULL,topicName TEXT NOT NULL,numSubmissions BIGINT NOT NULL,lastSubmission TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (pkgName,topicName)); +CREATE TABLE IF NOT EXISTS topicsearch$1 (topicName TEXT NOT NULL,numPackages BIGINT NOT NULL,submissionTime TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (topicName)); >>>query-latest { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt index fef47f5a7..6622f2c74 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/flink/FlinkQueryUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt @@ -1,12 +1,12 @@ >>>database -CREATE INDEX IF NOT EXISTS machine$q$18_btree_c1c2 ON machine$q$18 USING btree (maxTemp,avgTemp); -CREATE INDEX IF NOT EXISTS machine$q$18_hash_c2 ON machine$q$18 USING hash (avgTemp); -CREATE INDEX IF NOT EXISTS minreadings$q$13_btree_c0c2 ON minreadings$q$13 USING btree (sensorid,temp); -CREATE INDEX IF NOT EXISTS sensors$q$15_btree_c3c4 ON sensors$q$15 USING btree (machineid,placed); -CREATE INDEX IF NOT EXISTS sensors$q$15_hash_c4 ON sensors$q$15 USING hash (placed); -CREATE TABLE IF NOT EXISTS machine$q$18 (machineid BIGINT NOT NULL,maxTemp DOUBLE PRECISION NOT NULL,avgTemp DOUBLE PRECISION NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (machineid)); -CREATE TABLE IF NOT EXISTS minreadings$q$13 (sensorid BIGINT NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL,temp DOUBLE PRECISION NOT NULL , PRIMARY KEY (sensorid,timeMin)); -CREATE TABLE IF NOT EXISTS sensors$q$15 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,machineid BIGINT NOT NULL,placed TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); +CREATE INDEX IF NOT EXISTS machine$1_btree_c1c2 ON machine$1 USING btree (maxTemp,avgTemp); +CREATE INDEX IF NOT EXISTS machine$1_hash_c2 ON machine$1 USING hash (avgTemp); +CREATE INDEX IF NOT EXISTS minreadings$1_btree_c0c2 ON minreadings$1 USING btree (sensorid,temp); +CREATE INDEX IF NOT EXISTS sensors$3_btree_c3c4 ON sensors$3 USING btree (machineid,placed); +CREATE INDEX IF NOT EXISTS sensors$3_hash_c4 ON sensors$3 USING hash (placed); +CREATE TABLE IF NOT EXISTS machine$1 (machineid BIGINT NOT NULL,maxTemp DOUBLE PRECISION NOT NULL,avgTemp DOUBLE PRECISION NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (machineid)); +CREATE TABLE IF NOT EXISTS minreadings$1 (sensorid BIGINT NOT NULL,timeMin TIMESTAMP WITH TIME ZONE NOT NULL,temp DOUBLE PRECISION NOT NULL , PRIMARY KEY (sensorid,timeMin)); +CREATE TABLE IF NOT EXISTS sensors$3 (id BIGINT NOT NULL,_uuid TEXT NOT NULL,_ingest_time TIMESTAMP WITH TIME ZONE NOT NULL,machineid BIGINT NOT NULL,placed TIMESTAMP WITH TIME ZONE NOT NULL , PRIMARY KEY (id)); >>>query-machine { "data" : { diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv1.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv1.txt index f06f291e8..c810c71ab 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv1.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv1.txt @@ -1,9 +1,9 @@ -customer$q$13_btree_c3c4 - 1947.500 -customer$q$13_hash_c4 - 950.000 -newcustomerpromotion$q$38_hash_c2 - 40579.102 -order_again$q$25_btree_c0c3 - 1068.750 -orders$q$8_btree_c3c2c4 - 3897.375 -orders$q$8_btree_c3c4 - 47.500 -orders$q$8_hash_c2 - 950.000 -product$q$17_btree_c3c5 - 1947.500 -product$q$17_hash_c5 - 950.000 +customer$3_btree_c3c4 - 1947.500 +customer$3_hash_c4 - 950.000 +newcustomerpromotion$1_hash_c2 - 40579.102 +order_again$1_btree_c0c3 - 1068.750 +orders$2_btree_c3c2c4 - 3897.375 +orders$2_btree_c3c4 - 47.500 +orders$2_hash_c2 - 950.000 +product$3_btree_c3c5 - 1947.500 +product$3_hash_c5 - 950.000 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv2.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv2.txt index a33369e51..fbee8c767 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv2.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-full_c360-full-graphqlv2.txt @@ -1 +1 @@ -product$q$17_hash_c5 - 950.000 +product$3_hash_c5 - 950.000 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-search_c360-search-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-search_c360-search-graphql.txt index ea966e678..7f30b7125 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-search_c360-search-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/c360-search_c360-search-graphql.txt @@ -1 +1 @@ -product$q$4_text_c3c4c5 - 1300.000 +product$3_text_c3c4c5 - 1300.000 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv1-small_v1graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv1-small_v1graphql.txt index f55f11090..e12f2024f 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv1-small_v1graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv1-small_v1graphql.txt @@ -1,20 +1,20 @@ -items$6_btree_c0c2c3 - 1558.000 -items$6_btree_c0c3c7 - 394.250 -items$6_btree_c0c4c5 - 788.500 -items$6_btree_c0c5c2 - 99.750 -items$6_btree_c0c7c2 - 204.250 -orders$q$5_btree_c2c3c4 - 7796.500 -orders$q$5_btree_c2c4 - 47.500 -orders$q$5_btree_c3c4c6 - 1950.750 -orders$q$5_btree_c3c6 - 47.500 -orders$q$5_btree_c4c6c2 - 3945.750 -orders$q$5_btree_c6c2c3 - 1000.750 -products$q$12_btree_c3 - 0.000 -products$q$12_btree_c4 - 0.000 -products$q$12_btree_c5 - 0.000 -products$q$12_btree_c6 - 0.000 -products$q$12_btree_c7 - 0.000 -products$q$12_btree_c8 - 0.000 -products$q$12_btree_c9 - 0.000 -spending_by_month$q$19_btree_c0c2c3 - 493.328 -spending_by_month$q$19_btree_c0c3 - 240.469 +items$1_btree_c0c2c3 - 1558.000 +items$1_btree_c0c3c7 - 394.250 +items$1_btree_c0c4c5 - 788.500 +items$1_btree_c0c5c2 - 99.750 +items$1_btree_c0c7c2 - 204.250 +orders$2_btree_c2c3c4 - 7796.500 +orders$2_btree_c2c4 - 47.500 +orders$2_btree_c3c4c6 - 1950.750 +orders$2_btree_c3c6 - 47.500 +orders$2_btree_c4c6c2 - 3945.750 +orders$2_btree_c6c2c3 - 1000.750 +products$3_btree_c3 - 0.000 +products$3_btree_c4 - 0.000 +products$3_btree_c5 - 0.000 +products$3_btree_c6 - 0.000 +products$3_btree_c7 - 0.000 +products$3_btree_c8 - 0.000 +products$3_btree_c9 - 0.000 +spending_by_month$1_btree_c0c2c3 - 493.328 +spending_by_month$1_btree_c0c3 - 240.469 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv2-small_v2graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv2-small_v2graphql.txt index b08578f9b..ff59f37a6 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv2-small_v2graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/nutshopv2-small_v2graphql.txt @@ -1,3 +1,3 @@ -orders$q$5_btree_c3c6 - 1947.500 -orders$q$5_hash_c2 - 950.000 -products$q$13_hash_c3 - 950.000 +orders$2_btree_c3c6 - 1947.500 +orders$2_hash_c2 - 950.000 +products$3_hash_c3 - 950.000 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt index 80bc45744..041d72582 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/quickstart-teaser-local_quickstart-teaser-local-graphql.txt @@ -1,2 +1,2 @@ -orders$q$2_hash_c3 - 950.000 -orders$q$2_hash_c4 - 950.000 +orders$2_hash_c3 - 950.000 +orders$2_hash_c4 - 950.000 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/repo_repo-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/repo_repo-graphql.txt index 2337a433a..0c331f0f4 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/repo_repo-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/repo_repo-graphql.txt @@ -1,3 +1,3 @@ -submission$q$2_btree_c2c3c4 - 3897.375 -submission$q$2_btree_c2c4 - 47.500 -topicpackages$q$11_hash_c1 - 950.000 +submission$2_btree_c2c3c4 - 3897.375 +submission$2_btree_c2c4 - 47.500 +topicpackages$1_hash_c1 - 950.000 diff --git a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt index 2b9f35827..89c55a8d0 100644 --- a/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt +++ b/sqrl-testing/sqrl-integration-tests/src/test/resources/snapshots/com/datasqrl/graphql/inference/IndexSelectionUseCaseTest/sensors-teaser_sensors-teaser-graphql.txt @@ -1,5 +1,5 @@ -machine$q$18_btree_c1c2 - 438.625 -machine$q$18_hash_c2 - 213.750 -minreadings$q$13_btree_c0c2 - 5.500 -sensors$q$15_btree_c3c4 - 1947.500 -sensors$q$15_hash_c4 - 950.000 +machine$1_btree_c1c2 - 438.625 +machine$1_hash_c2 - 213.750 +minreadings$1_btree_c0c2 - 5.500 +sensors$3_btree_c3c4 - 1947.500 +sensors$3_hash_c4 - 950.000