-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datalog lineage TPC-H test queries #93
Labels
Comments
Q2
|
Q7Q(SUPP_NATION,CUST_NATION,L_YEAR,sum(VOLUME)) :- QSUB(SUPP_NATION,CUST_NATION,L_YEAR,VOLUME).
RP(X1,X2,X3,X4) :- RTPCQ07(X1,X2,X3,X4).
QSUB(SUPP_NATION,CUST_NATION,year(L_SD),(L_EXTENDEDPRICE * (1 - L_DISCOUNT))) :- SUPPLIER(L_SK,S2,S3,S_NATIONKEY,S4,S5,S6),LINEITEM(L_OK,L1,L_SK,L2,L3,L_EXTENDEDPRICE,L_DISCOUNT,L6,L7,L8,L_SD,L9,L10,L11,L12,L13),ORDERS(L_OK,L_CK,O1,O2,O3,O4,O5,O6,O7),CUSTOMER(L_CK,C1,C2,C_NATIONKEY,C3,C4,C5,C6),NATION(S_NATIONKEY,SUPP_NATION,N1,N2),NATION(C_NATIONKEY,CUST_NATION,N3,N4),((L_SD >= '1995-01-01')),((L_SD <= '1996-12-31')),((SUPP_NATION = 'FRANCE')),((CUST_NATION = 'GERMANY')).
QSUB(SUPP_NATION,CUST_NATION,year(L_SD),(L_EXTENDEDPRICE * (1 - L_DISCOUNT))) :- SUPPLIER(L_SK,S2,S3,S_NATIONKEY,S4,S5,S6),LINEITEM(L
_OK,L1,L_SK,L2,L3,L_EXTENDEDPRICE,L_DISCOUNT,L6,L7,L8,L_SD,L9,L10,L11,L12,L13),ORDERS(L_OK,L_CK,O1,O2,O3,O4,O5,O6,O7),CUSTOMER(L_CK,C1,C2,C_NATIONKEY,C3,C4,C5,C6),NATION(S_NATIONKEY,SUPP_NATION,N1,N2),NATION(C_NATIONKEY,CUST_NATION,N3,N4),((L_SD >= '1995-01-01')),((L_SD <= '1996-12-31')),((SUPP_NATION = 'GERMANY')),((CUST_NATION = 'FRANCE')).
PROV_QSUB(SUPP_NATION,CUST_NATION,L_YEAR,VOLUME) :- QSUB(SUPP_NATION,CUST_NATION,L_YEAR,VOLUME),RP(SUPP_NATION,CUST_NATION,L_YEAR,V1).
PROV_LINEITEM(L_OK,L1,L_SK,L2,L3,L_EXTENDEDPRICE,L_DISCOUNT,L6,L7,L8,L_SD,L9,L10,L11,L12,L13) :- LINEITEM(L_OK,L1,L_SK,L2,L3,L_EXTENDEDPRICE,L_DISCOUNT,L6,L7,L8,L_SD,L9,L10,L11,L12,L13),ORDERS(L_OK,L_CK,O1,O2,O3,O4,O5,O6,O7),SUPPLIER(L_SK,S2,S3,S_NATIONKEY,S4,S5,S6),CUSTOMER(L_CK,C1,C2,C_NATIONKEY,C3,C4,C5,C6),NATION(S_NATIONKEY,SUPP_NATION,N1,N2),NATION(C_NATIONKEY,CUST_NATION,N3,N4),((L_SD >= '1995-01-01')),((L_SD <= '1996-12-31')),((SUPP_NATION = 'FRANCE')),((CUST_NATION = 'GERMANY')),PROV_QSUB(SUPP_NATION,CUST_NATION,V0,V1).
PROV_LINEITEM(L_OK,L1,L_SK,L2,L3,L_EXTENDEDPRICE,L_DISCOUNT,L6,L7,L8,L_SD,L9,L10,L11,L12,L13) :- LINEITEM(L_OK,L1,L_SK,L2,L3,L_EXTENDEDPRICE,L_DISCOUNT,L6,L7,L8,L_SD,L9,L10,L11,L12,L13),ORDERS(L_OK,L_CK,O1,O2,O3,O4,O5,O6,O7),SUPPLIER(L_SK,S2,S3,S_NATIONKEY,S4,S5,S6),CUSTOMER(L_CK,C1,C2,C_NATIONKEY,C3,C4,C5,C6),NATION(S_NATIONKEY,SUPP_NATION,N1,N2),NATION(C_NATIONKEY,CUST_NATION,N3,N4),((L_SD >= '1995-01-01')),((L_SD <= '1996-12-31')),((SUPP_NATION = 'GERMANY')),((CUST_NATION = 'FRANCE')),PROV_QSUB(SUPP_NATION,CUST_NATION,V0,V1).
|
Q11 + Q12 + Q15 + Q19Endless loop
|
Q17 + Q18
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Queries that work without optimization
Queries that work with optimization
The text was updated successfully, but these errors were encountered: