@quereus/quereus 4.9.0 → 4.10.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/dist/src/core/database.d.ts.map +1 -1
- package/dist/src/core/database.js +19 -4
- package/dist/src/core/database.js.map +1 -1
- package/dist/src/core/statement.d.ts.map +1 -1
- package/dist/src/core/statement.js +74 -15
- package/dist/src/core/statement.js.map +1 -1
- package/dist/src/func/builtins/aggregate.d.ts.map +1 -1
- package/dist/src/func/builtins/aggregate.js +85 -33
- package/dist/src/func/builtins/aggregate.js.map +1 -1
- package/dist/src/func/builtins/explain.d.ts.map +1 -1
- package/dist/src/func/builtins/explain.js +9 -2
- package/dist/src/func/builtins/explain.js.map +1 -1
- package/dist/src/func/builtins/scalar.d.ts.map +1 -1
- package/dist/src/func/builtins/scalar.js +4 -2
- package/dist/src/func/builtins/scalar.js.map +1 -1
- package/dist/src/func/registration.d.ts +6 -0
- package/dist/src/func/registration.d.ts.map +1 -1
- package/dist/src/func/registration.js +1 -0
- package/dist/src/func/registration.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/planner/nodes/scalar.d.ts.map +1 -1
- package/dist/src/planner/nodes/scalar.js +13 -1
- package/dist/src/planner/nodes/scalar.js.map +1 -1
- package/dist/src/runtime/emission-context.d.ts +14 -1
- package/dist/src/runtime/emission-context.d.ts.map +1 -1
- package/dist/src/runtime/emission-context.js +17 -5
- package/dist/src/runtime/emission-context.js.map +1 -1
- package/dist/src/runtime/emit/aggregate-setup.d.ts +44 -8
- package/dist/src/runtime/emit/aggregate-setup.d.ts.map +1 -1
- package/dist/src/runtime/emit/aggregate-setup.js +79 -15
- package/dist/src/runtime/emit/aggregate-setup.js.map +1 -1
- package/dist/src/runtime/emit/aggregate.d.ts.map +1 -1
- package/dist/src/runtime/emit/aggregate.js +21 -106
- package/dist/src/runtime/emit/aggregate.js.map +1 -1
- package/dist/src/runtime/emit/asof-scan.js +1 -1
- package/dist/src/runtime/emit/asof-scan.js.map +1 -1
- package/dist/src/runtime/emit/between.d.ts +2 -0
- package/dist/src/runtime/emit/between.d.ts.map +1 -1
- package/dist/src/runtime/emit/between.js +7 -8
- package/dist/src/runtime/emit/between.js.map +1 -1
- package/dist/src/runtime/emit/binary.d.ts +27 -5
- package/dist/src/runtime/emit/binary.d.ts.map +1 -1
- package/dist/src/runtime/emit/binary.js +266 -177
- package/dist/src/runtime/emit/binary.js.map +1 -1
- package/dist/src/runtime/emit/case.d.ts +34 -0
- package/dist/src/runtime/emit/case.d.ts.map +1 -1
- package/dist/src/runtime/emit/case.js +18 -11
- package/dist/src/runtime/emit/case.js.map +1 -1
- package/dist/src/runtime/emit/cast.d.ts +2 -0
- package/dist/src/runtime/emit/cast.d.ts.map +1 -1
- package/dist/src/runtime/emit/cast.js +7 -5
- package/dist/src/runtime/emit/cast.js.map +1 -1
- package/dist/src/runtime/emit/column-reference.d.ts +3 -1
- package/dist/src/runtime/emit/column-reference.d.ts.map +1 -1
- package/dist/src/runtime/emit/column-reference.js +6 -2
- package/dist/src/runtime/emit/column-reference.js.map +1 -1
- package/dist/src/runtime/emit/dml-executor.d.ts.map +1 -1
- package/dist/src/runtime/emit/dml-executor.js +21 -0
- package/dist/src/runtime/emit/dml-executor.js.map +1 -1
- package/dist/src/runtime/emit/filter.d.ts +1 -1
- package/dist/src/runtime/emit/filter.js +1 -1
- package/dist/src/runtime/emit/hash-aggregate.d.ts.map +1 -1
- package/dist/src/runtime/emit/hash-aggregate.js +18 -88
- package/dist/src/runtime/emit/hash-aggregate.js.map +1 -1
- package/dist/src/runtime/emit/literal.d.ts +14 -1
- package/dist/src/runtime/emit/literal.d.ts.map +1 -1
- package/dist/src/runtime/emit/literal.js +33 -7
- package/dist/src/runtime/emit/literal.js.map +1 -1
- package/dist/src/runtime/emit/materialized-view-helpers.d.ts +7 -1
- package/dist/src/runtime/emit/materialized-view-helpers.d.ts.map +1 -1
- package/dist/src/runtime/emit/materialized-view-helpers.js +121 -32
- package/dist/src/runtime/emit/materialized-view-helpers.js.map +1 -1
- package/dist/src/runtime/emit/parameter.d.ts +3 -1
- package/dist/src/runtime/emit/parameter.d.ts.map +1 -1
- package/dist/src/runtime/emit/parameter.js +7 -2
- package/dist/src/runtime/emit/parameter.js.map +1 -1
- package/dist/src/runtime/emit/scalar-function.d.ts +29 -1
- package/dist/src/runtime/emit/scalar-function.d.ts.map +1 -1
- package/dist/src/runtime/emit/scalar-function.js +66 -16
- package/dist/src/runtime/emit/scalar-function.js.map +1 -1
- package/dist/src/runtime/emit/scalar-op.d.ts +63 -0
- package/dist/src/runtime/emit/scalar-op.d.ts.map +1 -0
- package/dist/src/runtime/emit/scalar-op.js +37 -0
- package/dist/src/runtime/emit/scalar-op.js.map +1 -0
- package/dist/src/runtime/emit/scan.d.ts.map +1 -1
- package/dist/src/runtime/emit/scan.js +19 -1
- package/dist/src/runtime/emit/scan.js.map +1 -1
- package/dist/src/runtime/emit/temporal-arithmetic.d.ts +18 -8
- package/dist/src/runtime/emit/temporal-arithmetic.d.ts.map +1 -1
- package/dist/src/runtime/emit/temporal-arithmetic.js +29 -311
- package/dist/src/runtime/emit/temporal-arithmetic.js.map +1 -1
- package/dist/src/runtime/emit/unary.d.ts +2 -0
- package/dist/src/runtime/emit/unary.d.ts.map +1 -1
- package/dist/src/runtime/emit/unary.js +125 -53
- package/dist/src/runtime/emit/unary.js.map +1 -1
- package/dist/src/runtime/emitters.d.ts +22 -0
- package/dist/src/runtime/emitters.d.ts.map +1 -1
- package/dist/src/runtime/emitters.js +29 -0
- package/dist/src/runtime/emitters.js.map +1 -1
- package/dist/src/runtime/scalar-fusion.d.ts +47 -0
- package/dist/src/runtime/scalar-fusion.d.ts.map +1 -0
- package/dist/src/runtime/scalar-fusion.js +275 -0
- package/dist/src/runtime/scalar-fusion.js.map +1 -0
- package/dist/src/runtime/strict-flags.d.ts +9 -0
- package/dist/src/runtime/strict-flags.d.ts.map +1 -1
- package/dist/src/runtime/strict-flags.js +9 -0
- package/dist/src/runtime/strict-flags.js.map +1 -1
- package/dist/src/runtime/strict-fork.js +2 -2
- package/dist/src/runtime/strict-fork.js.map +1 -1
- package/dist/src/runtime/strict-representation.d.ts +78 -0
- package/dist/src/runtime/strict-representation.d.ts.map +1 -0
- package/dist/src/runtime/strict-representation.js +159 -0
- package/dist/src/runtime/strict-representation.js.map +1 -0
- package/dist/src/schema/function.d.ts +15 -0
- package/dist/src/schema/function.d.ts.map +1 -1
- package/dist/src/schema/function.js.map +1 -1
- package/dist/src/types/builtin-types.d.ts.map +1 -1
- package/dist/src/types/builtin-types.js +17 -8
- package/dist/src/types/builtin-types.js.map +1 -1
- package/dist/src/types/temporal-ops.d.ts +119 -0
- package/dist/src/types/temporal-ops.d.ts.map +1 -0
- package/dist/src/types/temporal-ops.js +348 -0
- package/dist/src/types/temporal-ops.js.map +1 -0
- package/dist/src/types/temporal-types.d.ts.map +1 -1
- package/dist/src/types/temporal-types.js +8 -3
- package/dist/src/types/temporal-types.js.map +1 -1
- package/dist/src/util/coercion.d.ts +22 -7
- package/dist/src/util/coercion.d.ts.map +1 -1
- package/dist/src/util/coercion.js +28 -15
- package/dist/src/util/coercion.js.map +1 -1
- package/dist/src/util/comparison.d.ts +25 -0
- package/dist/src/util/comparison.d.ts.map +1 -1
- package/dist/src/util/comparison.js +25 -0
- package/dist/src/util/comparison.js.map +1 -1
- package/dist/src/util/key-tuple-codec.d.ts +12 -3
- package/dist/src/util/key-tuple-codec.d.ts.map +1 -1
- package/dist/src/util/key-tuple-codec.js.map +1 -1
- package/dist/src/util/numeric-canonical.d.ts +26 -0
- package/dist/src/util/numeric-canonical.d.ts.map +1 -0
- package/dist/src/util/numeric-canonical.js +66 -0
- package/dist/src/util/numeric-canonical.js.map +1 -0
- package/dist/src/vtab/module.d.ts +25 -0
- package/dist/src/vtab/module.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalar-op.d.ts","sourceRoot":"","sources":["../../../../src/runtime/emit/scalar-op.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,QAAQ,CAAC;AAEjF;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAQxD;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,eAAe,GAAG,WAAW,CAOlF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StatusCode } from '../../common/types.js';
|
|
2
|
+
import { QuereusError } from '../../common/errors.js';
|
|
3
|
+
import { asRun } from '../types.js';
|
|
4
|
+
import { emitPlanNode } from '../emitters.js';
|
|
5
|
+
/**
|
|
6
|
+
* Emit-time guard that a spec's body takes exactly one parameter per declared operand,
|
|
7
|
+
* plus the leading context. A mismatch is an emitter bug, not a per-row condition, and
|
|
8
|
+
* it is otherwise silent: the scheduler spreads `params.length` args into a body that
|
|
9
|
+
* ignores the tail, and a fused call would drop the same values.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: a body with a rest signature (`(ctx, ...args)`) or a defaulted parameter reports
|
|
12
|
+
* a `Function.length` that stops short, so it trips this. No spec is variadic today —
|
|
13
|
+
* `buildScalarFunctionRun` (emit/scalar-function.ts), the one variadic scalar body,
|
|
14
|
+
* deliberately stays off `ScalarOpSpec` and is composed by the fusion compiler without
|
|
15
|
+
* this guard. A future variadic spec needs an explicit opt-out here, not a weakened
|
|
16
|
+
* check for everyone.
|
|
17
|
+
*
|
|
18
|
+
* Exported for the scalar-fusion compiler (runtime/scalar-fusion.ts), which composes
|
|
19
|
+
* spec bodies without going through {@link emitScalarOp} and needs the same guard.
|
|
20
|
+
*/
|
|
21
|
+
export function assertSpecArity(spec) {
|
|
22
|
+
const expected = spec.operands.length + 1;
|
|
23
|
+
if (spec.run.length !== expected) {
|
|
24
|
+
throw new QuereusError(`Internal error: scalar op '${spec.note}' declares ${spec.operands.length} operand(s) `
|
|
25
|
+
+ `but its body takes ${spec.run.length - 1}`, StatusCode.INTERNAL);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** Emit a spec as the `Instruction` its emitter returned before this factoring. */
|
|
29
|
+
export function emitScalarOp(spec, ctx) {
|
|
30
|
+
assertSpecArity(spec);
|
|
31
|
+
return {
|
|
32
|
+
params: spec.operands.map(operand => emitPlanNode(operand, ctx)),
|
|
33
|
+
run: asRun(spec.run),
|
|
34
|
+
note: spec.note,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=scalar-op.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalar-op.js","sourceRoot":"","sources":["../../../../src/runtime/emit/scalar-op.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,KAAK,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AAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../../../src/runtime/emit/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAItG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQ9D;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAChC,cAAc,EAAE,UAAU,EAC1B,UAAU,EAAE,cAAc,EAC1B,WAAW,EAAE,QAAQ,EAAE,KACnB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;;;;;GAMG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,WAAW,GAAG,aAAa,GAAG,aAAa,EACjD,GAAG,EAAE,eAAe,EACpB,kBAAkB,CAAC,EAAE,kBAAkB,GACrC,WAAW,CAuKb"}
|
|
@@ -6,6 +6,8 @@ import { createValidatedInstruction, emitPlanNode } from "../emitters.js";
|
|
|
6
6
|
import { disconnectVTable } from "../utils.js";
|
|
7
7
|
import { buildRowDescriptor } from "../../util/row-descriptor.js";
|
|
8
8
|
import { createRowSlot } from "../context-helpers.js";
|
|
9
|
+
import { REPR_STRICT } from "../strict-flags.js";
|
|
10
|
+
import { assertRowConforms, RepresentationError } from "../strict-representation.js";
|
|
9
11
|
/**
|
|
10
12
|
* Emits instructions for physical table access nodes (SeqScan, IndexScan, IndexSeek).
|
|
11
13
|
*
|
|
@@ -33,6 +35,16 @@ export function emitSeqScan(plan, ctx, filterInfoOverride) {
|
|
|
33
35
|
// scan site — a self-join's two scans over the same table get different keys and
|
|
34
36
|
// therefore isolated instances. Mirrors the executionMemo symbol pattern.
|
|
35
37
|
const scanConnectionKey = Symbol(`scan:${plan.nodeType}(${schema.name})`);
|
|
38
|
+
// QUEREUS_REPR_STRICT seam: rows leaving a module's `query()`, checked against the
|
|
39
|
+
// table's declared column types. Catches a non-conforming module (in-tree or
|
|
40
|
+
// third-party) at its OWN boundary rather than three layers downstream. Everything
|
|
41
|
+
// the check needs is built here only when the flag is on, so a normal emit allocates
|
|
42
|
+
// nothing on its behalf.
|
|
43
|
+
const reprColumnTypes = REPR_STRICT ? schema.columns.map(col => col.logicalType) : undefined;
|
|
44
|
+
const reprColumnNames = REPR_STRICT ? schema.columns.map(col => col.name) : undefined;
|
|
45
|
+
const reprWhere = REPR_STRICT
|
|
46
|
+
? `module '${schema.vtabModuleName}' query() row for ${schema.schemaName}.${schema.name}`
|
|
47
|
+
: '';
|
|
36
48
|
async function* run(runtimeCtx, ...dynamicArgs) {
|
|
37
49
|
// Use the captured module info instead of doing a fresh lookup
|
|
38
50
|
const capturedModuleInfo = ctx.getCapturedSchemaObject(moduleKey);
|
|
@@ -113,13 +125,19 @@ export function emitSeqScan(plan, ctx, filterInfoOverride) {
|
|
|
113
125
|
// checkpoint — the inner scan layers (safeIterate/scanLayer) went sync,
|
|
114
126
|
// so do not remove it expecting an inner checkpoint to cover the scan.
|
|
115
127
|
throwIfAborted(runtimeCtx.signal);
|
|
128
|
+
// Synchronous and inside this loop on purpose: enabling the flag must not
|
|
129
|
+
// introduce a microtask hop into the scan's fast path (docs/runtime.md).
|
|
130
|
+
if (REPR_STRICT)
|
|
131
|
+
assertRowConforms(row, reprColumnTypes, reprWhere, reprColumnNames);
|
|
116
132
|
rowSlot.set(row);
|
|
117
133
|
yield row;
|
|
118
134
|
}
|
|
119
135
|
}
|
|
120
136
|
catch (e) {
|
|
121
137
|
// Preserve cancellation identity — don't re-wrap it as a generic query error.
|
|
122
|
-
|
|
138
|
+
// A representation violation is likewise rethrown verbatim: re-wrapping it
|
|
139
|
+
// would bury the seam/column/type detail its message exists to carry.
|
|
140
|
+
if (e instanceof AbortError || e instanceof RepresentationError)
|
|
123
141
|
throw e;
|
|
124
142
|
const message = e instanceof Error ? e.message : String(e);
|
|
125
143
|
throw new QuereusError(`Error during query on table '${schema.name}': ${message}`, e instanceof QuereusError ? e.code : StatusCode.ERROR, e instanceof Error ? e : undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/runtime/emit/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA2B,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAA8B,aAAa,EAAE,MAAM,2CAA2C,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKlF,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/runtime/emit/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA2B,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAA8B,aAAa,EAAE,MAAM,2CAA2C,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKlF,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE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,CAAC;QACrC,CAAC;IACF,CAAC;IAED,OAAO,0BAA0B,CAChC,MAAM,EACN,KAAK,CAAC,GAAG,CAAC,EACV,GAAG,EACH,GAAG,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,GAAG,CAClC,CAAC;AACH,CAAC"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import type { SqlValue } from "../../common/types.js";
|
|
2
|
-
import type { Instruction } from "../types.js";
|
|
3
|
-
import type { BinaryOpNode } from "../../planner/nodes/scalar.js";
|
|
4
|
-
import type { EmissionContext } from "../emission-context.js";
|
|
5
2
|
/**
|
|
6
3
|
* Try to perform temporal arithmetic on two values.
|
|
7
4
|
* Returns the result if successful, or undefined if the values are not temporal types.
|
|
8
5
|
* Throws QuereusError if the operation is invalid.
|
|
6
|
+
*
|
|
7
|
+
* Which combinations exist, what each produces, and what each announces as its result
|
|
8
|
+
* type all live in one table (`types/temporal-ops.ts`) that the planner reads too. This
|
|
9
|
+
* function is the *value-sniffed* entry into that table: it derives both operand kinds
|
|
10
|
+
* from the runtime values, which is the defined behavior whenever the declared types
|
|
11
|
+
* cannot settle the case (a TEXT column holding a duration string, for instance).
|
|
9
12
|
*/
|
|
10
13
|
export declare function tryTemporalArithmetic(operator: string, v1: SqlValue, v2: SqlValue): SqlValue | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Emit temporal arithmetic operations
|
|
13
|
-
* Handles operations between temporal types (DATE, TIME, DATETIME, TIMESPAN)
|
|
14
|
-
*/
|
|
15
|
-
export declare function emitTemporalArithmetic(plan: BinaryOpNode, ctx: EmissionContext): Instruction;
|
|
16
14
|
/**
|
|
17
15
|
* Attempts to perform temporal comparison. Returns undefined if not a temporal comparison.
|
|
18
16
|
* This allows the caller to fall back to standard comparison logic.
|
|
@@ -24,6 +22,18 @@ export declare function emitTemporalArithmetic(plan: BinaryOpNode, ctx: Emission
|
|
|
24
22
|
* Note: DATE, TIME, and DATETIME use ISO 8601 format which compares correctly lexicographically,
|
|
25
23
|
* so they don't need special handling here.
|
|
26
24
|
*
|
|
25
|
+
* NOTE: deliberately NOT given the emit-time specialization `buildNumericOpSpec`'s temporal
|
|
26
|
+
* arm got. The shapes look alike, but the economics do not:
|
|
27
|
+
* - the per-row cost here is one `startsWith` per operand, not four regexes — TIMESPAN is
|
|
28
|
+
* the only temporal type whose text order differs from its semantic order, so it is the
|
|
29
|
+
* only one {@link tryTemporalCompare} probes for;
|
|
30
|
+
* - `buildComparisonOpSpec` already bypasses this function for the hot case: two operands
|
|
31
|
+
* of the same semantic-ordering type take the `sharedSemanticType` path
|
|
32
|
+
* (`=(compare-typed)`) and never reach the generic comparison run;
|
|
33
|
+
* - what is left is the mixed TIMESPAN-vs-TEXT/ANY shape, where runtime sniffing is the
|
|
34
|
+
* defined semantics and cannot be resolved from the declared types anyway.
|
|
35
|
+
* Revisit only if a profile shows the generic comparison run hot on temporal operands.
|
|
36
|
+
*
|
|
27
37
|
* @param operator The comparison operator (=, !=, <, <=, >, >=)
|
|
28
38
|
* @param v1 First value
|
|
29
39
|
* @param v2 Second value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal-arithmetic.d.ts","sourceRoot":"","sources":["../../../../src/runtime/emit/temporal-arithmetic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"temporal-arithmetic.d.ts","sourceRoot":"","sources":["../../../../src/runtime/emit/temporal-arithmetic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUtD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAaxG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAsBxG;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAKjF"}
|
|
@@ -1,323 +1,29 @@
|
|
|
1
|
-
import { StatusCode } from "../../common/types.js";
|
|
2
|
-
import { QuereusError } from "../../common/errors.js";
|
|
3
|
-
import { asRun } from "../types.js";
|
|
4
|
-
import { emitPlanNode } from "../emitters.js";
|
|
5
|
-
import { Temporal } from 'temporal-polyfill';
|
|
6
1
|
import { TIMESPAN_TYPE } from "../../types/temporal-types.js";
|
|
7
|
-
|
|
8
|
-
* Check if a value is a date string (YYYY-MM-DD format)
|
|
9
|
-
*/
|
|
10
|
-
function isDateValue(v) {
|
|
11
|
-
if (typeof v !== 'string')
|
|
12
|
-
return false;
|
|
13
|
-
// Simple check for ISO 8601 date format
|
|
14
|
-
return /^\d{4}-\d{2}-\d{2}$/.test(v);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Check if a value is a time string (HH:MM:SS format)
|
|
18
|
-
*/
|
|
19
|
-
function isTimeValue(v) {
|
|
20
|
-
if (typeof v !== 'string')
|
|
21
|
-
return false;
|
|
22
|
-
// Simple check for ISO 8601 time format
|
|
23
|
-
return /^\d{2}:\d{2}:\d{2}/.test(v);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Check if a value is a datetime string (ISO 8601 format)
|
|
27
|
-
*/
|
|
28
|
-
function isDateTimeValue(v) {
|
|
29
|
-
if (typeof v !== 'string')
|
|
30
|
-
return false;
|
|
31
|
-
// Check for ISO 8601 datetime format (with T separator)
|
|
32
|
-
return v.includes('T') && /^\d{4}-\d{2}-\d{2}T/.test(v);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Check if a value is a timespan/duration string (ISO 8601 duration format)
|
|
36
|
-
*/
|
|
37
|
-
function isTimespanValue(v) {
|
|
38
|
-
if (typeof v !== 'string')
|
|
39
|
-
return false;
|
|
40
|
-
// ISO 8601 duration starts with P (or -P for negative)
|
|
41
|
-
return v.startsWith('P') || v.startsWith('-P');
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Check if a Temporal.Duration contains calendar units (years, months, weeks)
|
|
45
|
-
* that cannot be converted to a single time unit without a relativeTo reference.
|
|
46
|
-
*/
|
|
47
|
-
function hasCalendarUnits(d) {
|
|
48
|
-
return d.years !== 0 || d.months !== 0 || d.weeks !== 0;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Scale each field of a duration by a factor.
|
|
52
|
-
* Works for both calendar and non-calendar durations.
|
|
53
|
-
*/
|
|
54
|
-
function scaleDuration(d, factor) {
|
|
55
|
-
return Temporal.Duration.from({
|
|
56
|
-
years: d.years * factor,
|
|
57
|
-
months: d.months * factor,
|
|
58
|
-
weeks: d.weeks * factor,
|
|
59
|
-
days: d.days * factor,
|
|
60
|
-
hours: d.hours * factor,
|
|
61
|
-
minutes: d.minutes * factor,
|
|
62
|
-
seconds: d.seconds * factor,
|
|
63
|
-
milliseconds: d.milliseconds * factor,
|
|
64
|
-
microseconds: d.microseconds * factor,
|
|
65
|
-
nanoseconds: d.nanoseconds * factor,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Divide a duration's fields by a divisor, cascading remainders to smaller units.
|
|
70
|
-
* Cascade chain: years→months(×12), weeks→days(×7), days→hours(×24),
|
|
71
|
-
* hours→minutes(×60), minutes→seconds(×60), seconds→ms(×1000),
|
|
72
|
-
* ms→μs(×1000), μs→ns(×1000).
|
|
73
|
-
* Note: months cannot cascade to days (variable month length).
|
|
74
|
-
*/
|
|
75
|
-
function divideDuration(d, divisor) {
|
|
76
|
-
// Cascade pairs: [field, next-field, conversion-factor]
|
|
77
|
-
const cascade = [
|
|
78
|
-
['years', 'months', 12],
|
|
79
|
-
// months→days gap: no fixed conversion
|
|
80
|
-
['weeks', 'days', 7],
|
|
81
|
-
['days', 'hours', 24],
|
|
82
|
-
['hours', 'minutes', 60],
|
|
83
|
-
['minutes', 'seconds', 60],
|
|
84
|
-
['seconds', 'milliseconds', 1000],
|
|
85
|
-
['milliseconds', 'microseconds', 1000],
|
|
86
|
-
['microseconds', 'nanoseconds', 1000],
|
|
87
|
-
];
|
|
88
|
-
// Build a mutable map of field values
|
|
89
|
-
const fields = {
|
|
90
|
-
years: d.years, months: d.months, weeks: d.weeks,
|
|
91
|
-
days: d.days, hours: d.hours, minutes: d.minutes,
|
|
92
|
-
seconds: d.seconds, milliseconds: d.milliseconds,
|
|
93
|
-
microseconds: d.microseconds, nanoseconds: d.nanoseconds,
|
|
94
|
-
};
|
|
95
|
-
for (const [field, nextField, factor] of cascade) {
|
|
96
|
-
const value = fields[field];
|
|
97
|
-
const quotient = Math.trunc(value / divisor);
|
|
98
|
-
const remainder = value - quotient * divisor;
|
|
99
|
-
fields[field] = quotient;
|
|
100
|
-
fields[nextField] += remainder * factor;
|
|
101
|
-
}
|
|
102
|
-
// Final field (nanoseconds) — just divide, truncate to integer
|
|
103
|
-
fields['nanoseconds'] = Math.trunc(fields['nanoseconds'] / divisor);
|
|
104
|
-
// Handle months independently (not part of cascade chain above for months→days)
|
|
105
|
-
// months was already accumulated from years cascade; now divide it
|
|
106
|
-
const monthQuotient = Math.trunc(fields['months'] / divisor);
|
|
107
|
-
const monthRemainder = fields['months'] - monthQuotient * divisor;
|
|
108
|
-
fields['months'] = monthQuotient;
|
|
109
|
-
// Fractional months can't be converted to days; truncate
|
|
110
|
-
if (monthRemainder !== 0) {
|
|
111
|
-
// Best-effort: drop sub-month remainder since we can't convert to days
|
|
112
|
-
}
|
|
113
|
-
return Temporal.Duration.from({
|
|
114
|
-
years: fields['years'],
|
|
115
|
-
months: fields['months'],
|
|
116
|
-
weeks: fields['weeks'],
|
|
117
|
-
days: fields['days'],
|
|
118
|
-
hours: fields['hours'],
|
|
119
|
-
minutes: fields['minutes'],
|
|
120
|
-
seconds: fields['seconds'],
|
|
121
|
-
milliseconds: fields['milliseconds'],
|
|
122
|
-
microseconds: fields['microseconds'],
|
|
123
|
-
nanoseconds: fields['nanoseconds'],
|
|
124
|
-
});
|
|
125
|
-
}
|
|
2
|
+
import { isTemporalKind, runTemporalCase, temporalKindOfValue, temporalOpCase, unsupportedTemporalOp, } from "../../types/temporal-ops.js";
|
|
126
3
|
/**
|
|
127
4
|
* Try to perform temporal arithmetic on two values.
|
|
128
5
|
* Returns the result if successful, or undefined if the values are not temporal types.
|
|
129
6
|
* Throws QuereusError if the operation is invalid.
|
|
7
|
+
*
|
|
8
|
+
* Which combinations exist, what each produces, and what each announces as its result
|
|
9
|
+
* type all live in one table (`types/temporal-ops.ts`) that the planner reads too. This
|
|
10
|
+
* function is the *value-sniffed* entry into that table: it derives both operand kinds
|
|
11
|
+
* from the runtime values, which is the defined behavior whenever the declared types
|
|
12
|
+
* cannot settle the case (a TEXT column holding a duration string, for instance).
|
|
130
13
|
*/
|
|
131
14
|
export function tryTemporalArithmetic(operator, v1, v2) {
|
|
132
15
|
if (v1 === null || v2 === null)
|
|
133
16
|
return null;
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const isV2Date = isDateValue(v2);
|
|
140
|
-
const isV2Time = isTimeValue(v2);
|
|
141
|
-
const isV2DateTime = isDateTimeValue(v2);
|
|
142
|
-
const isV2Timespan = isTimespanValue(v2);
|
|
143
|
-
// If neither operand is temporal, return undefined to signal non-temporal operation
|
|
144
|
-
const isV1Temporal = isV1Date || isV1Time || isV1DateTime || isV1Timespan;
|
|
145
|
-
const isV2Temporal = isV2Date || isV2Time || isV2DateTime || isV2Timespan;
|
|
146
|
-
if (!isV1Temporal && !isV2Temporal) {
|
|
17
|
+
const lk = temporalKindOfValue(v1);
|
|
18
|
+
const rk = temporalKindOfValue(v2);
|
|
19
|
+
// Neither operand looks temporal — signal "not a temporal operation" so the caller
|
|
20
|
+
// falls through to numeric arithmetic. ('number' is a kind, but not a temporal one.)
|
|
21
|
+
if (!isTemporalKind(lk) && !isTemporalKind(rk))
|
|
147
22
|
return undefined;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
(isV1Date || isV1DateTime) &&
|
|
153
|
-
(isV2Date || isV2DateTime)) {
|
|
154
|
-
// Parse both values as dates
|
|
155
|
-
const date1 = isV1DateTime
|
|
156
|
-
? Temporal.PlainDateTime.from(v1).toPlainDate()
|
|
157
|
-
: Temporal.PlainDate.from(v1);
|
|
158
|
-
const date2 = isV2DateTime
|
|
159
|
-
? Temporal.PlainDateTime.from(v2).toPlainDate()
|
|
160
|
-
: Temporal.PlainDate.from(v2);
|
|
161
|
-
const duration = date1.since(date2);
|
|
162
|
-
return duration.toString();
|
|
163
|
-
}
|
|
164
|
-
// TIME - TIME → TIMESPAN
|
|
165
|
-
if (operator === '-' && isV1Time && isV2Time) {
|
|
166
|
-
const time1 = Temporal.PlainTime.from(v1);
|
|
167
|
-
const time2 = Temporal.PlainTime.from(v2);
|
|
168
|
-
const duration = time1.since(time2);
|
|
169
|
-
return duration.toString();
|
|
170
|
-
}
|
|
171
|
-
// DATE + TIMESPAN → DATE
|
|
172
|
-
if (operator === '+' && isV1Date && isV2Timespan) {
|
|
173
|
-
const date = Temporal.PlainDate.from(v1);
|
|
174
|
-
const duration = Temporal.Duration.from(v2);
|
|
175
|
-
const result = date.add(duration);
|
|
176
|
-
return result.toString();
|
|
177
|
-
}
|
|
178
|
-
// TIMESPAN + DATE → DATE (commutative)
|
|
179
|
-
if (operator === '+' && isV1Timespan && isV2Date) {
|
|
180
|
-
const duration = Temporal.Duration.from(v1);
|
|
181
|
-
const date = Temporal.PlainDate.from(v2);
|
|
182
|
-
const result = date.add(duration);
|
|
183
|
-
return result.toString();
|
|
184
|
-
}
|
|
185
|
-
// DATE - TIMESPAN → DATE
|
|
186
|
-
if (operator === '-' && isV1Date && isV2Timespan) {
|
|
187
|
-
const date = Temporal.PlainDate.from(v1);
|
|
188
|
-
const duration = Temporal.Duration.from(v2);
|
|
189
|
-
const result = date.subtract(duration);
|
|
190
|
-
return result.toString();
|
|
191
|
-
}
|
|
192
|
-
// DATETIME + TIMESPAN → DATETIME
|
|
193
|
-
if (operator === '+' && isV1DateTime && isV2Timespan) {
|
|
194
|
-
const dt = Temporal.PlainDateTime.from(v1);
|
|
195
|
-
const duration = Temporal.Duration.from(v2);
|
|
196
|
-
const result = dt.add(duration);
|
|
197
|
-
return result.toString();
|
|
198
|
-
}
|
|
199
|
-
// TIMESPAN + DATETIME → DATETIME (commutative)
|
|
200
|
-
if (operator === '+' && isV1Timespan && isV2DateTime) {
|
|
201
|
-
const duration = Temporal.Duration.from(v1);
|
|
202
|
-
const dt = Temporal.PlainDateTime.from(v2);
|
|
203
|
-
const result = dt.add(duration);
|
|
204
|
-
return result.toString();
|
|
205
|
-
}
|
|
206
|
-
// DATETIME - TIMESPAN → DATETIME
|
|
207
|
-
if (operator === '-' && isV1DateTime && isV2Timespan) {
|
|
208
|
-
const dt = Temporal.PlainDateTime.from(v1);
|
|
209
|
-
const duration = Temporal.Duration.from(v2);
|
|
210
|
-
const result = dt.subtract(duration);
|
|
211
|
-
return result.toString();
|
|
212
|
-
}
|
|
213
|
-
// TIME + TIMESPAN → TIME
|
|
214
|
-
if (operator === '+' && isV1Time && isV2Timespan) {
|
|
215
|
-
const time = Temporal.PlainTime.from(v1);
|
|
216
|
-
const duration = Temporal.Duration.from(v2);
|
|
217
|
-
const result = time.add(duration);
|
|
218
|
-
return result.toString();
|
|
219
|
-
}
|
|
220
|
-
// TIMESPAN + TIME → TIME (commutative)
|
|
221
|
-
if (operator === '+' && isV1Timespan && isV2Time) {
|
|
222
|
-
const duration = Temporal.Duration.from(v1);
|
|
223
|
-
const time = Temporal.PlainTime.from(v2);
|
|
224
|
-
const result = time.add(duration);
|
|
225
|
-
return result.toString();
|
|
226
|
-
}
|
|
227
|
-
// TIME - TIMESPAN → TIME
|
|
228
|
-
if (operator === '-' && isV1Time && isV2Timespan) {
|
|
229
|
-
const time = Temporal.PlainTime.from(v1);
|
|
230
|
-
const duration = Temporal.Duration.from(v2);
|
|
231
|
-
const result = time.subtract(duration);
|
|
232
|
-
return result.toString();
|
|
233
|
-
}
|
|
234
|
-
// TIMESPAN + TIMESPAN → TIMESPAN
|
|
235
|
-
if (operator === '+' && isV1Timespan && isV2Timespan) {
|
|
236
|
-
const d1 = Temporal.Duration.from(v1);
|
|
237
|
-
const d2 = Temporal.Duration.from(v2);
|
|
238
|
-
const result = d1.add(d2);
|
|
239
|
-
return result.toString();
|
|
240
|
-
}
|
|
241
|
-
// TIMESPAN - TIMESPAN → TIMESPAN
|
|
242
|
-
if (operator === '-' && isV1Timespan && isV2Timespan) {
|
|
243
|
-
const d1 = Temporal.Duration.from(v1);
|
|
244
|
-
const d2 = Temporal.Duration.from(v2);
|
|
245
|
-
const result = d1.subtract(d2);
|
|
246
|
-
return result.toString();
|
|
247
|
-
}
|
|
248
|
-
// TIMESPAN * NUMBER → TIMESPAN
|
|
249
|
-
if (operator === '*' && isV1Timespan && typeof v2 === 'number') {
|
|
250
|
-
const duration = Temporal.Duration.from(v1);
|
|
251
|
-
if (hasCalendarUnits(duration)) {
|
|
252
|
-
return scaleDuration(duration, v2).toString();
|
|
253
|
-
}
|
|
254
|
-
const totalSeconds = duration.total({ unit: 'seconds' });
|
|
255
|
-
const newDuration = Temporal.Duration.from({ seconds: totalSeconds * v2 });
|
|
256
|
-
return newDuration.toString();
|
|
257
|
-
}
|
|
258
|
-
// NUMBER * TIMESPAN → TIMESPAN (commutative)
|
|
259
|
-
if (operator === '*' && typeof v1 === 'number' && isV2Timespan) {
|
|
260
|
-
const duration = Temporal.Duration.from(v2);
|
|
261
|
-
if (hasCalendarUnits(duration)) {
|
|
262
|
-
return scaleDuration(duration, v1).toString();
|
|
263
|
-
}
|
|
264
|
-
const totalSeconds = duration.total({ unit: 'seconds' });
|
|
265
|
-
const newDuration = Temporal.Duration.from({ seconds: totalSeconds * v1 });
|
|
266
|
-
return newDuration.toString();
|
|
267
|
-
}
|
|
268
|
-
// TIMESPAN / NUMBER → TIMESPAN
|
|
269
|
-
if (operator === '/' && isV1Timespan && typeof v2 === 'number') {
|
|
270
|
-
if (v2 === 0)
|
|
271
|
-
return null;
|
|
272
|
-
const duration = Temporal.Duration.from(v1);
|
|
273
|
-
if (hasCalendarUnits(duration)) {
|
|
274
|
-
return divideDuration(duration, v2).toString();
|
|
275
|
-
}
|
|
276
|
-
const totalSeconds = duration.total({ unit: 'seconds' });
|
|
277
|
-
const newDuration = Temporal.Duration.from({ seconds: totalSeconds / v2 });
|
|
278
|
-
return newDuration.toString();
|
|
279
|
-
}
|
|
280
|
-
// TIMESPAN / TIMESPAN → NUMBER (ratio)
|
|
281
|
-
if (operator === '/' && isV1Timespan && isV2Timespan) {
|
|
282
|
-
const d1 = Temporal.Duration.from(v1);
|
|
283
|
-
const d2 = Temporal.Duration.from(v2);
|
|
284
|
-
if (hasCalendarUnits(d1) || hasCalendarUnits(d2)) {
|
|
285
|
-
// Cannot compute a numeric ratio when calendar units are involved
|
|
286
|
-
// (months/years have variable lengths without a reference date)
|
|
287
|
-
return null;
|
|
288
|
-
}
|
|
289
|
-
const total1 = d1.total({ unit: 'seconds' });
|
|
290
|
-
const total2 = d2.total({ unit: 'seconds' });
|
|
291
|
-
if (total2 === 0)
|
|
292
|
-
return null;
|
|
293
|
-
return total1 / total2;
|
|
294
|
-
}
|
|
295
|
-
// If we get here, the operation is not supported
|
|
296
|
-
throw new QuereusError(`Unsupported temporal operation`, StatusCode.UNSUPPORTED);
|
|
297
|
-
}
|
|
298
|
-
catch (e) {
|
|
299
|
-
// Invalid temporal operation - return null
|
|
300
|
-
if (e instanceof QuereusError)
|
|
301
|
-
throw e;
|
|
302
|
-
return null;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Emit temporal arithmetic operations
|
|
307
|
-
* Handles operations between temporal types (DATE, TIME, DATETIME, TIMESPAN)
|
|
308
|
-
*/
|
|
309
|
-
export function emitTemporalArithmetic(plan, ctx) {
|
|
310
|
-
const operator = plan.expression.operator;
|
|
311
|
-
function run(ctx, v1, v2) {
|
|
312
|
-
return tryTemporalArithmetic(operator, v1, v2) ?? null;
|
|
313
|
-
}
|
|
314
|
-
const leftExpr = emitPlanNode(plan.left, ctx);
|
|
315
|
-
const rightExpr = emitPlanNode(plan.right, ctx);
|
|
316
|
-
return {
|
|
317
|
-
params: [leftExpr, rightExpr],
|
|
318
|
-
run: asRun(run),
|
|
319
|
-
note: `${operator}(temporal)`
|
|
320
|
-
};
|
|
23
|
+
const entry = lk && rk ? temporalOpCase(operator, lk, rk) : undefined;
|
|
24
|
+
if (!entry)
|
|
25
|
+
unsupportedTemporalOp();
|
|
26
|
+
return runTemporalCase(entry, v1, v2);
|
|
321
27
|
}
|
|
322
28
|
/**
|
|
323
29
|
* Attempts to perform temporal comparison. Returns undefined if not a temporal comparison.
|
|
@@ -330,6 +36,18 @@ export function emitTemporalArithmetic(plan, ctx) {
|
|
|
330
36
|
* Note: DATE, TIME, and DATETIME use ISO 8601 format which compares correctly lexicographically,
|
|
331
37
|
* so they don't need special handling here.
|
|
332
38
|
*
|
|
39
|
+
* NOTE: deliberately NOT given the emit-time specialization `buildNumericOpSpec`'s temporal
|
|
40
|
+
* arm got. The shapes look alike, but the economics do not:
|
|
41
|
+
* - the per-row cost here is one `startsWith` per operand, not four regexes — TIMESPAN is
|
|
42
|
+
* the only temporal type whose text order differs from its semantic order, so it is the
|
|
43
|
+
* only one {@link tryTemporalCompare} probes for;
|
|
44
|
+
* - `buildComparisonOpSpec` already bypasses this function for the hot case: two operands
|
|
45
|
+
* of the same semantic-ordering type take the `sharedSemanticType` path
|
|
46
|
+
* (`=(compare-typed)`) and never reach the generic comparison run;
|
|
47
|
+
* - what is left is the mixed TIMESPAN-vs-TEXT/ANY shape, where runtime sniffing is the
|
|
48
|
+
* defined semantics and cannot be resolved from the declared types anyway.
|
|
49
|
+
* Revisit only if a profile shows the generic comparison run hot on temporal operands.
|
|
50
|
+
*
|
|
333
51
|
* @param operator The comparison operator (=, !=, <, <=, >, >=)
|
|
334
52
|
* @param v1 First value
|
|
335
53
|
* @param v2 Second value
|
|
@@ -367,7 +85,7 @@ export function tryTemporalComparison(operator, v1, v2) {
|
|
|
367
85
|
export function tryTemporalCompare(v1, v2) {
|
|
368
86
|
// Timespans are the only temporal type that needs special comparison logic
|
|
369
87
|
// because ISO 8601 duration strings don't compare correctly lexicographically
|
|
370
|
-
if (
|
|
88
|
+
if (temporalKindOfValue(v1) !== 'timespan' || temporalKindOfValue(v2) !== 'timespan')
|
|
371
89
|
return undefined;
|
|
372
90
|
return TIMESPAN_TYPE.compare(v1, v2);
|
|
373
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temporal-arithmetic.js","sourceRoot":"","sources":["../../../../src/runtime/emit/temporal-arithmetic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;GAEG;AACH,SAAS,WAAW,CAAC,CAAW;IAC/B,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACxC,wCAAwC;IACxC,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,CAAW;IAC/B,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,O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AAE,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAgB,EAAE,EAAY,EAAE,EAAY;IACjF,MAAM,GAAG,GAAG,kBAAkB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAExC,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,GAAG,CAAC;QACT,KAAK,IAAI;YACR,OAAO,GAAG,KAAK,CAAC,CAAC;QAClB,KAAK,IAAI,CAAC;QACV,KAAK,IAAI;YACR,OAAO,GAAG,KAAK,CAAC,CAAC;QAClB,KAAK,GAAG;YACP,OAAO,GAAG,GAAG,CAAC,CAAC;QAChB,KAAK,IAAI;YACR,OAAO,GAAG,IAAI,CAAC,CAAC;QACjB,KAAK,GAAG;YACP,OAAO,GAAG,GAAG,CAAC,CAAC;QAChB,KAAK,IAAI;YACR,OAAO,GAAG,IAAI,CAAC,CAAC;QACjB;YACC,OAAO,SAAS,CAAC;IACnB,CAAC;AACF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAY,EAAE,EAAY;IAC5D,2EAA2E;IAC3E,8EAA8E;IAC9E,IAAI,mBAAmB,CAAC,EAAE,CAAC,KAAK,UAAU,IAAI,mBAAmB,CAAC,EAAE,CAAC,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IACvG,OAAO,aAAa,CAAC,OAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Instruction } from "../types.js";
|
|
2
2
|
import type { UnaryOpNode } from "../../planner/nodes/scalar.js";
|
|
3
3
|
import type { EmissionContext } from "../emission-context.js";
|
|
4
|
+
import { type ScalarOpSpec } from "./scalar-op.js";
|
|
5
|
+
export declare function buildUnaryOpSpec(plan: UnaryOpNode): ScalarOpSpec;
|
|
4
6
|
export declare function emitUnaryOp(plan: UnaryOpNode, ctx: EmissionContext): Instruction;
|
|
5
7
|
//# sourceMappingURL=unary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unary.d.ts","sourceRoot":"","sources":["../../../../src/runtime/emit/unary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"unary.d.ts","sourceRoot":"","sources":["../../../../src/runtime/emit/unary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAyBjE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,CAoKhE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,GAAG,WAAW,CAEhF"}
|