-
Notifications
You must be signed in to change notification settings - Fork 272
Estimated size information lost when .map() result is chained #900
Copy link
Copy link
Closed
Description
Estimated size information lost with .map() when .filter() is called on the result (presumably applies to other chaining operations).
To Reproduce
Check which components this affects:
- parser
- checker
- interpreter
Sample expression and input that reproduces the issue:
[1,2,3,4,5].map(x, x).filter(x, x % 2 == 0)
Test setup:
checker/cost_test.go:
{
name: ".map.filter size",
expr: `[1,2,3,4,5].map(x, x).filter(x, x % 2 == 0)`,
wanted: CostEstimate{Min: 97, Max: 97},
},Expected behavior
Expected a bounded cost estimate. got: [97, 18446744073709551615]
Additional context
Both these test cases pass when added:
{
name: ".filter size",
expr: `[1,2,3,4,5].filter(x, x % 2 == 0)`,
wanted: CostEstimate{Min: 41, Max: 101},
},
{
name: ".map size",
expr: `[1,2,3,4,5].map(x, x)`,
wanted: CostEstimate{Min: 86, Max: 86},
},Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels