This is an automated email from the ASF dual-hosted git repository.
arnabp20 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/master by this push:
new 846d1e2 [MINOR] Fix null value check in EncoderMVImpute
846d1e2 is described below
commit 846d1e25156ddec7187be040fb8eb92f6ad7d8e1
Author: Lukas Erlbacher <[email protected]>
AuthorDate: Tue Feb 23 19:10:53 2021 +0100
[MINOR] Fix null value check in EncoderMVImpute
Closes #1187.
---
.../java/org/apache/sysds/runtime/transform/encode/EncoderMVImpute.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/sysds/runtime/transform/encode/EncoderMVImpute.java
b/src/main/java/org/apache/sysds/runtime/transform/encode/EncoderMVImpute.java
index 2391733..16377ba 100644
---
a/src/main/java/org/apache/sysds/runtime/transform/encode/EncoderMVImpute.java
+++
b/src/main/java/org/apache/sysds/runtime/transform/encode/EncoderMVImpute.java
@@ -178,7 +178,7 @@ public class EncoderMVImpute extends Encoder
_hist.get(colID) : new
HashMap<>();
for( int i=0; i<in.getNumRows(); i++ ) {
String key =
String.valueOf(in.get(i, colID-1));
- if( key != null &&
!key.isEmpty() ) {
+ if(!key.equals("null") &&
!key.isEmpty() ) {
Long val =
hist.get(key);
hist.put(key,
(val!=null) ? val+1 : 1);
}