libaquery: optimizations that reduces vector copy.

This commit is contained in:
2022-09-09 20:42:04 +08:00
parent bea97a909a
commit 9caee2819f
9 changed files with 52 additions and 39 deletions
+1 -1
View File
@@ -22,4 +22,4 @@ FIELDS TERMINATED BY ","
SELECT pairCorr(c, b) * d, sum(a), b
FROM test1
group by c,b,d
order by b ASC
order by b ASC
+3 -3
View File
@@ -24,11 +24,11 @@ LOAD DATA INFILE "data/test.csv"
INTO TABLE tt
FIELDS TERMINATED BY ","
CREATE TABLE sale(Mont INT, sales INT)
CREATE TABLE sale1(Mont INT, sales INT)
LOAD DATA INFILE "data/moving_avg.csv"
INTO TABLE sale
INTO TABLE sale1
FIELDS TERMINATED BY ","
select sd(a) + sales from tt, sale where tt.a = sale.Mont
select sd(a) + sales from tt, sale1 where tt.a = sale1.Mont
+2 -1
View File
@@ -1,6 +1,6 @@
AGGREGATION FUNCTION covariances2(x, y, w){
AGGREGATION FUNCTION covariances2(x, y, win){
xmeans := 0.;
ymeans := 0.;
l := _builtin_len;
@@ -11,6 +11,7 @@ AGGREGATION FUNCTION covariances2(x, y, w){
ymeans := y[0];
_builtin_ret[0] := 0.;
}
w := win;
if (w > l)
w := l;
for (i := 1, j:= 0; i < w; i := i+1) {