([, namespacedRow]: [
string,
NamespacedRow,
])
| 530 | |
| 531 | // Create a value extractor function for min/max that preserves comparable types |
| 532 | const valueExtractorForMinMax = ([, namespacedRow]: [ |
| 533 | string, |
| 534 | NamespacedRow, |
| 535 | ]) => { |
| 536 | const value = compiledExpr(namespacedRow) |
| 537 | // Preserve strings, numbers, Dates, and bigints for comparison |
| 538 | if ( |
| 539 | typeof value === `number` || |
| 540 | typeof value === `string` || |
| 541 | typeof value === `bigint` || |
| 542 | value instanceof Date |
| 543 | ) { |
| 544 | return value |
| 545 | } |
| 546 | return value != null ? Number(value) : 0 |
| 547 | } |
| 548 | |
| 549 | // Create a raw value extractor function for the expression to aggregate |
| 550 | const rawValueExtractor = ([, namespacedRow]: [string, NamespacedRow]) => { |
nothing calls this directly
no outgoing calls
no test coverage detected