Closed Bug 1270257 Opened 8 years ago Closed 8 years ago

Add range function in presto

Categories

(Cloud Services Graveyard :: Metrics: Pipeline, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Unassigned)

References

Details

It would be nice to have a range function in presto so that I can search for missing data efficiently:

SELECT date_add('day', -N, today()) FROM range(0, date_diff('day', '2015-12-01'::date, today())

Bonus, range that handles datetimes directly and not just integers.

Exploding an array would be reasonable too, if a range() function that returns a rowset is not easy.
Assignee: nobody → rvitillo
Points: --- → 1
Priority: -- → P3
There is now a `sequence` function in presto which I think does exactly what I want. It was added two weeks ago so I don't know whether it's in a release yet, and probably not on EMR.
Depends on: 1277829
No longer depends on: 1259547
Assignee: rvitillo → nobody
this will addressed by the upgrade
The Presto cluster has now been upgraded and the SEQUENCE function appears to be working.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.