message: Fix back compatibility problem.
diff: @@ -21,8 +21,8 @@ from __future__ import print_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  -from tensorflow.python.ops import gen_string_ops
  from tensorflow.python.ops import gen_array_ops
  +from tensorflow.python.ops import gen_string_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.ops.ragged import ragged_array_ops
  from tensorflow.python.ops.ragged import ragged_math_ops
  @@ -631,11 +631,14 @@ def strings_split_v1(input=None, sep=None, maxsplit=-1, # pylint: disable=redef
  if input.shape.rank == 0:
  input = gen_array_ops.expand_dims(input, 0)
  - ragged_result = string_split_v2(input, sep=sep, maxsplit=maxsplit)
  +
  if result_type == "SparseTensor":
  - return ragged_result.to_sparse()
  + if input.shape.rank == 1:
  + return string_ops.string_split_v2(input, sep=sep, maxsplit=maxsplit)
  + else:
  + return string_split_v2(input, sep=sep, maxsplit=maxsplit).to_sparse()
  elif result_type == "RaggedTensor":
  - return ragged_result
  + return string_split_v2(input, sep=sep, maxsplit=maxsplit)
  else:
  raise ValueError("result_type must be 'RaggedTensor' or 'SparseTensor'.")
  