duckdb 0.8.1-dev276.0 → 0.8.1-dev287.0
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.
package/package.json
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
#include "duckdb/execution/operator/aggregate/physical_window.hpp"
|
2
2
|
|
3
|
+
#include "duckdb/common/operator/add.hpp"
|
3
4
|
#include "duckdb/common/operator/cast_operators.hpp"
|
4
5
|
#include "duckdb/common/operator/comparison_operators.hpp"
|
6
|
+
#include "duckdb/common/operator/subtract.hpp"
|
5
7
|
#include "duckdb/common/optional_ptr.hpp"
|
6
8
|
#include "duckdb/common/radix_partitioning.hpp"
|
7
9
|
#include "duckdb/common/row_operations/row_operations.hpp"
|
@@ -529,11 +531,17 @@ void WindowBoundariesState::Update(const idx_t row_idx, WindowInputColumn &range
|
|
529
531
|
bounds.window_start = bounds.peer_start;
|
530
532
|
break;
|
531
533
|
case WindowBoundary::EXPR_PRECEDING_ROWS: {
|
532
|
-
|
534
|
+
if (!TrySubtractOperator::Operation(int64_t(row_idx), boundary_start.GetCell<int64_t>(expr_idx),
|
535
|
+
bounds.window_start)) {
|
536
|
+
throw OutOfRangeException("Overflow computing ROWS PRECEDING start");
|
537
|
+
}
|
533
538
|
break;
|
534
539
|
}
|
535
540
|
case WindowBoundary::EXPR_FOLLOWING_ROWS: {
|
536
|
-
|
541
|
+
if (!TryAddOperator::Operation(int64_t(row_idx), boundary_start.GetCell<int64_t>(expr_idx),
|
542
|
+
bounds.window_start)) {
|
543
|
+
throw OutOfRangeException("Overflow computing ROWS FOLLOWING start");
|
544
|
+
}
|
537
545
|
break;
|
538
546
|
}
|
539
547
|
case WindowBoundary::EXPR_PRECEDING_RANGE: {
|
@@ -569,10 +577,16 @@ void WindowBoundariesState::Update(const idx_t row_idx, WindowInputColumn &range
|
|
569
577
|
bounds.window_end = bounds.partition_end;
|
570
578
|
break;
|
571
579
|
case WindowBoundary::EXPR_PRECEDING_ROWS:
|
572
|
-
|
580
|
+
if (!TrySubtractOperator::Operation(int64_t(row_idx + 1), boundary_end.GetCell<int64_t>(expr_idx),
|
581
|
+
bounds.window_end)) {
|
582
|
+
throw OutOfRangeException("Overflow computing ROWS PRECEDING end");
|
583
|
+
}
|
573
584
|
break;
|
574
585
|
case WindowBoundary::EXPR_FOLLOWING_ROWS:
|
575
|
-
|
586
|
+
if (!TryAddOperator::Operation(int64_t(row_idx + 1), boundary_end.GetCell<int64_t>(expr_idx),
|
587
|
+
bounds.window_end)) {
|
588
|
+
throw OutOfRangeException("Overflow computing ROWS FOLLOWING end");
|
589
|
+
}
|
576
590
|
break;
|
577
591
|
case WindowBoundary::EXPR_PRECEDING_RANGE: {
|
578
592
|
if (boundary_end.CellIsNull(expr_idx)) {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
2
|
-
#define DUCKDB_VERSION "0.8.1-
|
2
|
+
#define DUCKDB_VERSION "0.8.1-dev287"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
5
|
+
#define DUCKDB_SOURCE_ID "8c32403411"
|
6
6
|
#endif
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
8
8
|
#include "duckdb/main/database.hpp"
|
@@ -42,13 +42,10 @@ duckdb_state duckdb_set_config(duckdb_config config, const char *name, const cha
|
|
42
42
|
if (!config || !name || !option) {
|
43
43
|
return DuckDBError;
|
44
44
|
}
|
45
|
-
|
46
|
-
if (!config_option) {
|
47
|
-
return DuckDBError;
|
48
|
-
}
|
45
|
+
|
49
46
|
try {
|
50
47
|
auto db_config = (DBConfig *)config;
|
51
|
-
db_config->
|
48
|
+
db_config->SetOptionByName(name, Value(option));
|
52
49
|
} catch (...) {
|
53
50
|
return DuckDBError;
|
54
51
|
}
|