Re: some doubt on code understanding

2018-10-17 Thread Sandeep Katta
:) thanks I am wondering how did I miss that :) :) On Wed, 17 Oct 2018 at 21:58, Sean Owen wrote: > "/" is integer division, so "x / y * y" is not x, but more like the > biggest multiple of y that's <= x. > On Wed, Oct 17, 2018 at 11:25 AM Sandeep Katta > wrote: > > > > Hi Guys, > > > > I am tr

Re: some doubt on code understanding

2018-10-17 Thread Sean Owen
"/" is integer division, so "x / y * y" is not x, but more like the biggest multiple of y that's <= x. On Wed, Oct 17, 2018 at 11:25 AM Sandeep Katta wrote: > > Hi Guys, > > I am trying to understand structured streaming code flow by doing so I came > across below code flow > > def nextBatchTime(

Re: some doubt on code understanding

2018-10-17 Thread Reynold Xin
Rounding. On Wed, Oct 17, 2018 at 6:25 PM Sandeep Katta < sandeep0102.opensou...@gmail.com> wrote: > Hi Guys, > > I am trying to understand structured streaming code flow by doing so I > came across below code flow > > def nextBatchTime(now: Long): Long = { > if (intervalMs == 0) now else now /

some doubt on code understanding

2018-10-17 Thread Sandeep Katta
Hi Guys, I am trying to understand structured streaming code flow by doing so I came across below code flow def nextBatchTime(now: Long): Long = { if (intervalMs == 0) now else now / intervalMs * intervalMs + intervalMs } else part could also have been written as now + intervalMs is there a