@malloydata/render 0.0.123-dev240207164302 → 0.0.123-dev240207191052
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2539,6 +2539,32 @@
|
|
|
2539
2539
|
}
|
|
2540
2540
|
});
|
|
2541
2541
|
|
|
2542
|
+
// ../malloy/dist/dialect/functions/sum_moving.js
|
|
2543
|
+
var require_sum_moving = __commonJS({
|
|
2544
|
+
"../malloy/dist/dialect/functions/sum_moving.js"(exports) {
|
|
2545
|
+
"use strict";
|
|
2546
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2547
|
+
exports.fnSumMoving = void 0;
|
|
2548
|
+
var util_1 = require_util();
|
|
2549
|
+
function fnSumMoving() {
|
|
2550
|
+
const value3 = (0, util_1.makeParam)("value", (0, util_1.output)((0, util_1.maxAggregate)("number")));
|
|
2551
|
+
const preceding = (0, util_1.makeParam)("preceding", (0, util_1.literal)((0, util_1.maxScalar)("number")));
|
|
2552
|
+
const following = (0, util_1.makeParam)("following", (0, util_1.literal)((0, util_1.maxScalar)("number")));
|
|
2553
|
+
return [
|
|
2554
|
+
(0, util_1.overload)((0, util_1.minAnalytic)("number"), [value3.param, preceding.param], (0, util_1.sql)`SUM(${value3.arg})`, {
|
|
2555
|
+
needsWindowOrderBy: true,
|
|
2556
|
+
between: { preceding: "preceding", following: 0 }
|
|
2557
|
+
}),
|
|
2558
|
+
(0, util_1.overload)((0, util_1.minAnalytic)("number"), [value3.param, preceding.param, following.param], (0, util_1.sql)`SUM(${value3.arg})`, {
|
|
2559
|
+
needsWindowOrderBy: true,
|
|
2560
|
+
between: { preceding: "preceding", following: "following" }
|
|
2561
|
+
})
|
|
2562
|
+
];
|
|
2563
|
+
}
|
|
2564
|
+
exports.fnSumMoving = fnSumMoving;
|
|
2565
|
+
}
|
|
2566
|
+
});
|
|
2567
|
+
|
|
2542
2568
|
// ../malloy/dist/dialect/functions/all_functions.js
|
|
2543
2569
|
var require_all_functions = __commonJS({
|
|
2544
2570
|
"../malloy/dist/dialect/functions/all_functions.js"(exports) {
|
|
@@ -2584,6 +2610,7 @@
|
|
|
2584
2610
|
var coalesce_1 = require_coalesce();
|
|
2585
2611
|
var string_agg_1 = require_string_agg();
|
|
2586
2612
|
var sql_1 = require_sql();
|
|
2613
|
+
var sum_moving_1 = require_sum_moving();
|
|
2587
2614
|
exports.FUNCTIONS = new function_map_1.FunctionMap();
|
|
2588
2615
|
exports.FUNCTIONS.add("concat", concat_1.fnConcat);
|
|
2589
2616
|
exports.FUNCTIONS.add("round", round_1.fnRound);
|
|
@@ -2648,6 +2675,7 @@
|
|
|
2648
2675
|
exports.FUNCTIONS.add("max_window", sum_min_max_window_1.fnMaxWindow);
|
|
2649
2676
|
exports.FUNCTIONS.add("sum_window", sum_min_max_window_1.fnSumWindow);
|
|
2650
2677
|
exports.FUNCTIONS.add("avg_moving", avg_moving_1.fnAvgRolling);
|
|
2678
|
+
exports.FUNCTIONS.add("sum_moving", sum_moving_1.fnSumMoving);
|
|
2651
2679
|
exports.FUNCTIONS.add("sql_number", sql_1.fnSqlNumber);
|
|
2652
2680
|
exports.FUNCTIONS.add("sql_string", sql_1.fnSqlString);
|
|
2653
2681
|
exports.FUNCTIONS.add("sql_date", sql_1.fnSqlDate);
|