What would you expect the following to yield? VALUES CAST(INTERVAL '3' HOUR AS INTEGER)
Like all intervals (except year-month intervals) the interval is internally represented in milliseconds, in this case 10,800,000, but when converted to a string or a numeric it is measured in hours, i.e. 3. Julian On Wed, Dec 9, 2015 at 2:05 PM, Pengcheng Xiong <[email protected]> wrote: > Hi all, > > While I was trying to debug something in Hive, I found some code in > RexBuilder which makes me confused. > > L527 it says > > {code} > > final long multiplier = > > literal.getType().getIntervalQualifier().getStartUnit() > > .multiplier; > {code} > > I saw it was committed > > commit 45b58ab07223cbb94c7cbbb9a1434a2b01a9497f > Author: julianhyde <[email protected]> > Date: Tue Jan 7 14:57:17 2014 -0800 > > Reformat org.eigenbase code. > > Could Julian or someone explain how this multiplier is used? It looks > to me that it is redundant. I do not need that multiplier and "value" > itself is enough. Thanks! > > Best > Pengcheng
