Motivation
Follow-up to #3881. The time-series SQL functions are recently added and still malleable. Each has positional optional parameters today, with obvious growth ahead:
ts.movingAvg(value, window) - foreseeable: weighted, alignment (left/center/right), minPeriods.
ts.timeBucket(interval, timestamp) - foreseeable: origin, timezone, alignment.
ts.interpolate(value, method [, timestamp]) - foreseeable: maxGap, fillLeading, extrapolate.
ts.promql(expr [, evalTimeMs]) - foreseeable: step, start, end, timeout, lookbackDelta.
Proposal
Accept a trailing options map validated by com.arcadedb.function.sql.FunctionOptions on each of the four. Positional forms remain supported. Unknown keys are rejected with a descriptive error.
Non-goals
- No grammar changes.
- No new knobs in this pass unless already wired up. The point is to install the hook and make future knob additions zero-cost at the call site.
Deliverables
- Code: route trailing options through
FunctionOptions.
- Tests: options-map path + unknown-key rejection.
- Docs: show the options-map syntax alongside the positional form.
Motivation
Follow-up to #3881. The time-series SQL functions are recently added and still malleable. Each has positional optional parameters today, with obvious growth ahead:
ts.movingAvg(value, window)- foreseeable:weighted,alignment(left/center/right),minPeriods.ts.timeBucket(interval, timestamp)- foreseeable:origin,timezone,alignment.ts.interpolate(value, method [, timestamp])- foreseeable:maxGap,fillLeading,extrapolate.ts.promql(expr [, evalTimeMs])- foreseeable:step,start,end,timeout,lookbackDelta.Proposal
Accept a trailing options map validated by
com.arcadedb.function.sql.FunctionOptionson each of the four. Positional forms remain supported. Unknown keys are rejected with a descriptive error.Non-goals
Deliverables
FunctionOptions.