Based in the current code, when sorting on a column of String and if there are null values in the column, then an exception is thrown and an empty list of keys is returned. And on UI we see no data.
This only happens with String because when calling asInstanceOf, only null String is converted to null. For example a null Double is converted to 0.0
See screenshot and unit test in
#1683
Expected result:
we should handle the null values and see data on UI
Current code:
Scala doc: asInstanceOf[T ] returns the default value of type T
This means when we have a null value in String column, we then try to do null.compareToIgnoreCase which throws NPE
Based in the current code, when sorting on a column of String and if there are null values in the column, then an exception is thrown and an empty list of keys is returned. And on UI we see no data.
This only happens with String because when calling asInstanceOf, only null String is converted to null. For example a null Double is converted to 0.0
See screenshot and unit test in
#1683
Expected result:
we should handle the null values and see data on UI
Current code:
Scala doc: asInstanceOf[T ] returns the default value of type T
This means when we have a null value in String column, we then try to do null.compareToIgnoreCase which throws NPE