public static String getCoalesceColumnNames ( String columnOrColumnList ) { if ( Strings . isNullOrEmpty ( columnOrColumnList ) ) { return null ; } if ( columnOrColumnList . contains ( "," ) ) { return "COALESCE(" + columnOrColumnList + ")" ; } return columnOrColumnList ; }
Get coalesce of columns if there are multiple comma - separated columns