Skip to content

Commit 70e825c

Browse files
committed
fix(core): fallback to SQLite default stop value if omitted
1 parent c2f35ba commit 70e825c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/series.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ impl VTabCursor for GenerateSeriesCursor {
170170
let mut start = -1;
171171
let mut stop = -1;
172172
let mut step = 1;
173+
// SQLite default for stop when it is omitted
174+
const DEFAULT_STOP_OMITTED: i64 = u32::MAX as i64;
173175

174176
if let Some((_, idx_num)) = idx_info {
175177
let mut arg_idx = 0;
@@ -181,6 +183,8 @@ impl VTabCursor for GenerateSeriesCursor {
181183
if idx_num & 2 != 0 {
182184
stop = extract_arg_integer!(args, arg_idx, i64::MAX);
183185
arg_idx += 1;
186+
} else {
187+
stop = DEFAULT_STOP_OMITTED;
184188
}
185189
if idx_num & 4 != 0 {
186190
step = args

0 commit comments

Comments
 (0)