lens-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajat Khandelwal <pro...@apache.org>
Subject [DISCUSS] Time Ranges in Lens
Date Wed, 05 Aug 2015 09:20:20 GMT
Currently the time_range_in clause is inclusive of the start date and
exclusive of the end date. i.e. time_range_in(time_dimension, date1, date2)
translates to date1<=time_dimension<date2

Recently there have been multiple discussions regarding this approach in
our internal forums at InMobi. There have been arguments that as an
analytics system, it should accept end date inclusive. Starting this thread
to know opinions of other people regarding both approaches. I'm defining
and briefly discussing both approaches below:

Approach 1: End date exclusive.
Disclaimer: I personally prefer this approach and would shamelessly argue
in its favor. I'll give links to some of the articles that I very much
agree with (no need to reinvent the wheel of argument)

   1. Views of Anders Kaseorg, MIT PhD student in CS; Cofounder of Ksplice,
   Inc
   <https://www.quora.com/Why-are-Python-ranges-half-open-exclusive-instead-of-closed-inclusive/answer/Anders-Kaseorg>
   2. Views of Edgar Dijkstra, Creator of Dijkstra's algorithm
   <http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF>
   3. Both arguments are for generic ranges. I believe time range is also a
   range and don't see why we need to handle that as a special case.


Approach 2: End date inclusive.

   1. Lens query language is a bit like sql and the BETWEEN clause in sql
   is inclusive of both start and end date.
   2. Most analytic systems --- including google analytics --- follow this
   convention


I'm posting the question on a bigger forum
<https://www.quora.com/Should-Time-ranges-in-an-analytical-system-be-half-open-or-closed>
as well in hopes of getting more opinions. I request everyone to post their
views here regarding both approaches.

Regards

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message