List报错空指针:
mybatis查询返回List<String>结果为[null],size是1的原因分析
方案:
Result= list_minDate.parallelStream().filter(Objects::nonNull).collect(Collectors.toList());
原因:
1.select xx from ( select xx from table a union all select xx from table b) c where c.xx= xx
尽管未查询出结果,但仍然会往list里插入一条null记录
2.SQL统计时,使用了聚合函数SUM