Skip to content

Commit

Permalink
Remove shadowed columns in use cases (#355)
Browse files Browse the repository at this point in the history
* Remove shadowed columns in use cases

Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>

* Add build on develop branch

Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>

---------

Signed-off-by: Daniel Henneberger <git@danielhenneberger.com>
  • Loading branch information
henneberger authored Oct 2, 2023
1 parent a25c232 commit e635ab5
Show file tree
Hide file tree
Showing 27 changed files with 78 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and test SQRL with Maven
on:
pull_request:
branches: [ "main" ]
branches: [ "main", "develop" ]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion sqrl-examples/repository/repo.sqrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
IMPORT datasqrl-central.Submission TIMESTAMP submissionTime;
IMPORT string.concat;

Submission.variant := COALESCE(variant, 'default');
Submission.variant0 := COALESCE(variant, 'default');
Submission.repoURL := concat('https://repository.datasqrl.com/',file);

Package := SELECT DISTINCT name FROM Submission;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orders (id : 10007140) {
productid
quantity
unit_price
discount
discount: discount0
total
product {
name
Expand Down
1 change: 1 addition & 0 deletions sqrl-examples/retail/c360-full-graphqlv1/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type entries {
unit_price: Float
parent: orders!
discount: Float
discount0: Float
total: Float
product: [Product]
}
Expand Down
8 changes: 4 additions & 4 deletions sqrl-examples/retail/c360-full.sqrl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Category := SELECT DISTINCT category AS name FROM Product;
Product := DISTINCT Product ON productid ORDER BY updateTime DESC;

-- Compute useful statistics on orders
Orders.entries.discount := coalesce(discount, 0.0);
Orders.entries.total := quantity * unit_price - discount;
Orders.total := SELECT sum(e.total) AS price, sum(e.discount) AS discount, count(1) AS num FROM @.entries e;
Orders.entries.discount0 := coalesce(discount, 0.0);
Orders.entries.total := quantity * unit_price - discount0;
Orders.total := SELECT sum(e.total) AS price, sum(e.discount0) AS discount, count(1) AS num FROM @.entries e;

-- Relate Customer to Orders and categories to products
Customer.orders := JOIN Orders ON Orders.customerid = @.customerid;
Expand All @@ -31,7 +31,7 @@ Customer._spending_by_month_category :=
SELECT endOfMonth(o.time) AS month,
p.category AS category,
sum(e.total) AS total,
sum(e.discount) AS savings
sum(e.discount0) AS savings
FROM @.orders o JOIN o.entries e JOIN e.product p
GROUP BY month, category ORDER BY month DESC;

Expand Down
6 changes: 3 additions & 3 deletions sqrl-examples/retail/c360-orderstats.sqrl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
IMPORT ecommerce-data.Orders;

-- Compute useful statistics on orders
Orders.entries.discount := coalesce(discount, 0.0);
Orders.entries.price := quantity * unit_price - discount;
Orders.entries.discount0 := coalesce(discount, 0.0);
Orders.entries.price := quantity * unit_price - discount0;

Orders.totals := SELECT sum(e.price) AS price, COUNT(1) as number, sum(e.discount) AS savings FROM @.entries e;
Orders.totals := SELECT sum(e.price) AS price, COUNT(1) as number, sum(e.discount0) AS savings FROM @.entries e;

CustomerOrderStats := SELECT o.customerid, sum(t.price) as total_price, sum(t.number) as num_orders FROM Orders o JOIN o.totals t
GROUP BY o.customerid;
6 changes: 3 additions & 3 deletions sqrl-examples/retail/c360-recommend.sqrl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Category := SELECT DISTINCT category AS name FROM Product;
Product := DISTINCT Product ON productid ORDER BY updateTime DESC;

-- Compute useful statistics on orders
Orders.entries.discount := coalesce(discount, 0.0);
Orders.entries.total := quantity * unit_price - discount;
Orders.total := SELECT sum(e.total) AS price, sum(e.discount) AS discount, count(1) AS num FROM @.entries e;
Orders.entries.discount0 := coalesce(discount, 0.0);
Orders.entries.total := quantity * unit_price - discount0;
Orders.total := SELECT sum(e.total) AS price, sum(e.discount0) AS discount, count(1) AS num FROM @.entries e;

-- Relate Customer to Orders and categories to products
Customer.orders := JOIN Orders ON Orders.customerid = @.customerid;
Expand Down
8 changes: 4 additions & 4 deletions sqrl-examples/retail/c360/c360.sqrl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Category := SELECT DISTINCT category AS name FROM Product;
Product := DISTINCT Product ON productid ORDER BY _ingest_time DESC;

-- Compute useful statistics on orders
Orders.entries.discount := coalesce(discount, 0.0);
Orders.entries.total := quantity * unit_price - discount;
Orders.total := SELECT sum(e.total) AS price, sum(e.discount) AS discount, count(1) AS num FROM @.entries e;
Orders.entries.discount0 := coalesce(discount, 0.0);
Orders.entries.total := quantity * unit_price - discount0;
Orders.total := SELECT sum(e.total) AS price, sum(e.discount0) AS discount, count(1) AS num FROM @.entries e;

-- Relate Customer to Orders and compute a customer's total order spent
Customer.orders := JOIN Orders ON Orders.customerid = @.customerid;
Expand All @@ -37,7 +37,7 @@ Customer._spending_by_month_category :=
SELECT endOfMonth(o.time) AS month,
e.product.category AS category,
sum(e.total) AS total,
sum(e.discount) AS savings
sum(e.discount0) AS savings
FROM @.orders o JOIN o.entries e
GROUP BY month, category ORDER BY month DESC;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void customerDistinctTest() {
@Test
public void orderCoalesceTest() {
ScriptBuilder builder = example.getImports();
builder.add("Orders.entries.discount := SELECT coalesce(x.discount, 0.0) AS discount FROM @ AS x");
builder.add("Orders.entries.discount0 := SELECT coalesce(x.discount, 0.0) AS discount FROM @ AS x");
validateScript(builder.getScript());
}

Expand Down Expand Up @@ -310,8 +310,8 @@ public void ordersEntriesTest() {
@Test
public void ordersEntriesDiscountTest() {
ScriptBuilder builder = example.getImports();
builder.add("Orders.entries.discount := COALESCE(discount, 0.0);\n"
+ "Orders.entries.total := quantity * unit_price - discount;");
builder.add("Orders.entries.discount0 := COALESCE(discount, 0.0);\n"
+ "Orders.entries.total := quantity * unit_price - discount0;");
validateScript(builder.getScript());
}

Expand Down Expand Up @@ -529,14 +529,6 @@ public void expressionTest() {
+ "Product.descriptionLength := CHAR_LENGTH(description);");
}

@Test
public void shadowExpressionTest() {
validateScript("IMPORT ecommerce-data.Product;\n"
+ "Product.descriptionLength := CHAR_LENGTH(description);"
+ "Product.descriptionLength := CHAR_LENGTH(description);"
+ "X := SELECT descriptionLength FROM Product;");
}

@Test
public void selectStarQueryTest() {
validateScript("IMPORT ecommerce-data.Product;\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
>>>customer$q$2
LogicalTableScan(table=[[customer$i$1]])

>>>discount$q$18
>>>discount0$q$18
LogicalProject(___uuid$0$pk$1=[$0], ___idx$0$pk$2=[$6], discount=[COALESCE($10, 0.0:DOUBLE)], time$0=[$4])
LogicalCorrelate(correlation=[$cor1], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$q$6]])
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ LogicalProject(__customerid$0=[$0], category_name$0=[$1], total$0=[$2], month$0=
LogicalJoin(condition=[=($5, $0)], joinType=[inner]) hints[TemporalJoinHint options:[1, 6, 0]]
LogicalProject(__customerid$0$pk$1=[$0], month=[$1], category=[$2], total=[$3], savings=[$4])
LogicalAggregate(group=[{0, 1, 2}], total=[SUM($3)], savings=[SUM($4)]) hints[TumbleAggregationHint options:[1, FUNCTION, 4, 2629746000, 0]]
LogicalProject(__customerid$0$pk$1=[$6], month=[endOfMonth($4)], category$0=[$26], total$0=[$20], discount$1=[$19], _uuid$0=[$0], _idx$0=[$14])
LogicalProject(__customerid$0$pk$1=[$6], month=[endOfMonth($4)], category$0=[$26], total$0=[$20], discount0$0=[$19], _uuid$0=[$0], _idx$0=[$14])
LogicalJoin(condition=[=($15, $21)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], customerid$00=[$6], _uuid$00=[$7], _ingest_time$00=[$8], email$0=[$9], name$0=[$10], lastupdated$0=[$11], updatetime$0=[$12], _rownum=[$13], _idx$0=[$14], productid$0=[$15], quantity$0=[$16], unit_price$0=[$17], discount$0=[$18], discount$1=[COALESCE($18, 0.0:DOUBLE)], total$0=[-(*($16, $17), COALESCE($18, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], customerid$00=[$6], _uuid$00=[$7], _ingest_time$00=[$8], email$0=[$9], name$0=[$10], lastupdated$0=[$11], updatetime$0=[$12], _rownum=[$13], _idx$0=[$14], productid$0=[$15], quantity$0=[$16], unit_price$0=[$17], discount$0=[$18], discount0$0=[COALESCE($18, 0.0:DOUBLE)], total$0=[-(*($16, $17), COALESCE($18, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}])
LogicalJoin(condition=[=($6, $3)], joinType=[inner]) hints[TemporalJoinHint options:[4, 6, 0]]
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Expand Down Expand Up @@ -55,7 +55,7 @@ LogicalProject(_uuid$0=[$0], _source_time$0=[$1], customerid$0=[$2], email$0=[$3
LogicalTableScan(table=[[customer$i$1]])
LogicalProject(___uuid$0$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time$0=[$1])
LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount$1=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount0$0=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor11], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Uncollect
Expand Down Expand Up @@ -86,7 +86,7 @@ LogicalProject(_uuid$0=[$0], _source_time$0=[$1], customerid=[$2], email=[$3], n
LogicalTableScan(table=[[customer$i$1]])
LogicalProject(___uuid$0$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time$0=[$1])
LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount$1=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount0$0=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor11], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Uncollect
Expand Down Expand Up @@ -134,7 +134,7 @@ LogicalProject(__customerid$0$pk$1=[$6], total_spend=[SUM($15) IGNORE NULLS OVER
LogicalTableScan(table=[[customer$i$1]])
LogicalProject(___uuid$0$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time$0=[$1])
LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount$1=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount0$0=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor11], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Uncollect
Expand All @@ -144,7 +144,7 @@ LogicalProject(__customerid$0$pk$1=[$6], total_spend=[SUM($15) IGNORE NULLS OVER
>>>total$debug4-lp-stream
LogicalProject(___uuid$0$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time$0=[$1])
LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount$1=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount0$0=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor11], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Uncollect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ LogicalProject(__customerid$0=[$0], total_spend$0=[$1], num_orders$0=[$2], time$
LogicalTableScan(table=[[customer$i$1]])
LogicalProject(___uuid$0$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time$0=[$1])
LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount$1=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount0$0=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Uncollect
Expand All @@ -68,7 +68,7 @@ LogicalProject(__customerid$0$pk$1=[$6], total_spend=[SUM($15) IGNORE NULLS OVER
LogicalTableScan(table=[[customer$i$1]])
LogicalProject(___uuid$0$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time$0=[$1])
LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount$1=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount0$0=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Uncollect
Expand All @@ -81,7 +81,7 @@ LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] opt
>>>total$debug6-lp-stream
LogicalProject(___uuid$0$pk$1=[$0], price=[$2], discount=[$3], num=[$4], time$0=[$1])
LogicalAggregate(group=[{0, 4}], price=[SUM($12)], discount=[SUM($11)], num=[COUNT()]) hints[TumbleAggregationHint options:[4, INSTANT, -1, 1, 0]]
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount$1=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalProject(_uuid$0=[$0], _ingest_time$0=[$1], id$0=[$2], customerid$0=[$3], time$0=[$4], entries$0=[$5], _idx$0=[$6], productid$0=[$7], quantity$0=[$8], unit_price$0=[$9], discount$0=[$10], discount0$0=[COALESCE($10, 0.0:DOUBLE)], total$0=[-(*($8, $9), COALESCE($10, 0.0:DOUBLE))])
LogicalCorrelate(correlation=[$cor7], joinType=[inner], requiredColumns=[{5}])
LogicalTableScan(table=[[orders$i$9]], hints=[[[WatermarkHint inheritPath:[] options:[4]]]]) hints[WatermarkHint options:[4]]
Uncollect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CREATE INDEX IF NOT EXISTS "product$25_btree_c3c5" ON "product$25" USING btree (
CREATE INDEX IF NOT EXISTS "product$25_hash_c5" ON "product$25" USING hash ("category$0");
CREATE TABLE IF NOT EXISTS "category$22" ("name$0" CHARACTER VARYING NOT NULL,"updatetime$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL , PRIMARY KEY ("name$0"));
CREATE TABLE IF NOT EXISTS "customer$19" ("customerid$0" BIGINT NOT NULL,"_uuid$0" CHARACTER VARYING NOT NULL,"_ingest_time$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL,"email$0" CHARACTER VARYING NOT NULL,"name$0" CHARACTER VARYING NOT NULL,"lastupdated$0" BIGINT NOT NULL,"updatetime$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL , PRIMARY KEY ("customerid$0"));
CREATE TABLE IF NOT EXISTS "entries$13" ("_uuid$0" CHARACTER VARYING NOT NULL,"_idx$0" INTEGER NOT NULL,"productid$0" BIGINT NOT NULL,"quantity$0" BIGINT NOT NULL,"unit_price$0" DOUBLE PRECISION NOT NULL,"discount$0" DOUBLE PRECISION ,"discount$1" DOUBLE PRECISION NOT NULL,"total$0" DOUBLE PRECISION NOT NULL,"time$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL , PRIMARY KEY ("_uuid$0","_idx$0"));
CREATE TABLE IF NOT EXISTS "entries$13" ("_uuid$0" CHARACTER VARYING NOT NULL,"_idx$0" INTEGER NOT NULL,"productid$0" BIGINT NOT NULL,"quantity$0" BIGINT NOT NULL,"unit_price$0" DOUBLE PRECISION NOT NULL,"discount$0" DOUBLE PRECISION ,"discount0$0" DOUBLE PRECISION NOT NULL,"total$0" DOUBLE PRECISION NOT NULL,"time$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL , PRIMARY KEY ("_uuid$0","_idx$0"));
CREATE TABLE IF NOT EXISTS "favorite_categories$46" ("__customerid$0" BIGINT NOT NULL,"category_name$0" CHARACTER VARYING NOT NULL,"total$0" DOUBLE PRECISION NOT NULL,"month$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL , PRIMARY KEY ("__customerid$0","category_name$0"));
CREATE TABLE IF NOT EXISTS "newcustomerpromotion$57" ("_uuid$0" CHARACTER VARYING NOT NULL,"_source_time$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL,"customerid$0" BIGINT NOT NULL,"email$0" CHARACTER VARYING NOT NULL,"name$0" CHARACTER VARYING NOT NULL,"total_spend$0" DOUBLE PRECISION NOT NULL,"num_orders$0" BIGINT NOT NULL , PRIMARY KEY ("_uuid$0"));
CREATE TABLE IF NOT EXISTS "order_again$36" ("__customerid$0" BIGINT NOT NULL,"productid$0" BIGINT NOT NULL,"quantity$0" BIGINT NOT NULL,"num_orders$0" BIGINT NOT NULL,"most_recent$0" TIMESTAMP(9) WITH TIME ZONE NOT NULL , PRIMARY KEY ("__customerid$0","productid$0"));
Expand Down
Loading

0 comments on commit e635ab5

Please sign in to comment.