While developing yesterday, I noticed a bug in my code where the Range function didn’t actually limit the tuples in my set to my desired range. All members of the set were being returned:
A)
q.Range(
q.Join(
propertiesSetRef,
q.Lambda(
'propertyRef',
q.Match(
q.Index('property_entries_by_date_seconds'),
q.Var('propertyRef')
)
),
q.Var('startTimeSeconds'),
q.Var('endTimeSeconds')
)
)
After a while of debugging, I moved the Range function inside the Join, and things worked as expected.
B)
q.Join(
propertiesSetRef,
q.Lambda(
'propertyRef',
q.Range(
q.Match(
q.Index('property_entries_by_date_seconds'),
q.Var('propertyRef')
),
q.Var('startTimeSeconds'),
q.Var('endTimeSeconds')
)
)
)
These two snippets seem functionally identical to me. But for some reason snippet A doesn’t work as expected.