Question: is there a way to fetch last three year data from the hive table
my column has a data in this format (2018-07-01 00:00:00.0)
I have to fetch out last three years data

Answer: 
You can do this without boxing `long` and `double` values using [Eclipse Collections](https://github.com/eclipse/eclipse-collections):

```
LongList longs = LongLists.mutable.with(4L, 92L, 100L);
DoubleList doubles = longs.collectDouble(l -> l, DoubleLists.mutable.empty());

Assert.assertEquals(DoubleLists.mutable.with(4.0, 92.0, 100.0), doubles);

```

You can also do this with Java Streams and Eclipse Collections converting from a `List<Long>` to a `DoubleList`:

```
List<Long> list = Arrays.asList(4L, 92L, 100L);
DoubleList doubles = DoubleLists.mutable.withAll(
        list.stream().mapToDouble(Long::doubleValue));

Assert.assertEquals(DoubleLists.mutable.with(4.0, 92.0, 100.0), doubles);

```

Note: I am a committer for Eclipse Collections
You have to use the mapToDoubleoperator to convert Long into a Double and then use the toList collector.

```
List<Long> longs = new ArrayList<>();
    longs.add(2316354L);
    longs.add(2456354L);
    longs.add(888354L);

    List<Double> doubles = longs.stream().mapToDouble(e->e).boxed().collect(Collectors.toList());

```