Can we rewrite this as

    val partValues = if (partSpec == null) {
      Arrays.fill[partColumns.size](new String)
    } else {
      ...
    }