KYLIN-2069, fix NPE in LookupStringTable
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7ec0aacc Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7ec0aacc Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7ec0aacc Branch: refs/heads/yang21-hbase1.x Commit: 7ec0aacc2a00a8b7e21c8d5e13b17baff10d7584 Parents: ebc0848 Author: Li Yang <liy...@apache.org> Authored: Sat Oct 8 14:43:42 2016 +0800 Committer: Li Yang <liy...@apache.org> Committed: Sat Oct 8 14:43:52 2016 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/kylin/dict/lookup/LookupStringTable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/7ec0aacc/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupStringTable.java ---------------------------------------------------------------------- diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupStringTable.java b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupStringTable.java index f13275c..963a21e 100644 --- a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupStringTable.java +++ b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/LookupStringTable.java @@ -83,7 +83,8 @@ public class LookupStringTable extends LookupTable<String> { protected String[] convertRow(String[] cols) { for (int i = 0; i < cols.length; i++) { if (colIsDateTime[i]) { - cols[i] = String.valueOf(DateFormat.stringToMillis(cols[i])); + if (cols[i] != null) + cols[i] = String.valueOf(DateFormat.stringToMillis(cols[i])); } } return cols;