Hi,
   we have an udf called minf which can change current time to one point .
  for example   20120510:00:00:00   -->  minf  20120510000,
                       20120510:00:06:00   ->   minf  20120510001
                       20120510:10:51:38   ->   minf  20120510130


we test the minf  function using main function ,it is normal.
but  when using in hive,the sql :
select minf(createtime) as minf  from table limit 500;
the results are normally sometime:
20120510195
20120510195
20120510195
20120510195
20120510198
20120510198
20120510198
20120510198
20120510196
20120510197
20120510198
20120510197
20120510195
20120510196
20120510196
20120510196
20120510195
20120510196
20120510195
20120510195
20120510195
20120510195
20120510195
20120510195
20120510197
20120510196
20120510197
20120510196
20120510196
20120510196
20120510196
20120510196
20120510196
20120510197
20120510197
20120510197
20120510198
20120510197
20120510198
20120510197
20120510198
20120510198
20120510198
20120510198
but sometime the results are unnormally:
20120510195
20120510198
20120510198
20120510198
20120510198
20120510195
20120510195
20120510195
2012[10198 
2012[10198 
2012[10198 
2012[10198 
20120510196
2012[10196 
20120510195
20120510197
2012[10198 
2012[10197 
2012[10197 
20120510197
20120510195
20120510195
20120510198
20120510196
2012[10196 
20120510195
2012[10196 
2012[10198 
2012[10198 
20120510196
2012[10196 
2012[10196 
2012[10196 
20120510196
2012[10196 
20120510196
2012[10196 
20120510196
2012[10196 
20120510196
20120510196
20120510196
2012[10196 
20120510195
20120510196
2012[10198 
20120510195
20120510198
20120510197
20120510197
20120510197
2012[10197 
2012[10197 
2012[10197 
2012[10197 
2012[10197 
2012[10197 
20120510198
20120510198
20120510198
20120510198
2012[10198 
2012[10198 
20120510195
20120510197
20120510197
2012[10198 
20120510198
20120510198
20120510198


when data of the table is small, Probability of normal  results was high. And 
error was disappeared in month field.
wrong:2012[10198---->right:20120510198  
some issue or cause?


  

Reply via email to