Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-14965

StructType throws exception for missing field

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.0, 1.6.1
    • Fix Version/s: 1.6.2, 2.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      The ScalaDoc for StructType.apply(String) indicates the method should return null if it does not contain a field with the given name. The method implementation throws an exception in this case instead.

      I suggest that either the implementation should be corrected to return null if the field is not found, or the ScalaDoc be corrected to indicate an exception is thrown.

        Attachments

          Activity

            People

            • Assignee:
              freastro Gregory Hart
              Reporter:
              freastro Gregory Hart
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: