Column Combine with Null String

I am using the Combine Column node but when exactly one of the two input columns is a null the output contains a "?" instead of a null.  I also tried using the Java Snippet node and returned $A$+$B$ but then I either get a null output cell or if "insert missing on null" is checked then the out put string looks like "nullA".  I can add another node to strip the ? or null but this seems like a lot of work for what should be a simple string concatenate that, e.g., Excel will do just fine.

I guess I could add code in the Java snippet to check for null and return only the one string but again that seems like a lot of extra work (plus I was having trouble getting that code to work when I tried it).

Thanks for any options I might have missed.


Those would be my solutions:

  • Use a missing value handling node and replace missing values in columns A and B by an empty string, then continue with the column combiner.
  • Java Snippet doesn't sound all too bad.
    if ($A$ == null && $B$ == null) {
      return null; // null will return missing, you could also write return "";
    } else if ($A$ == null) {
      return $B$;
    } else if ($B$ == null) {
      return $A$;
    } else {
      return $A$ + $B$;