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

Add get_json_scalar function

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 2.3.0
    • None
    • SQL
    • None

    Description

      Besides get_json_object which returns a JSON string in a return type, we should add a function "get_json_scalar" that returns a scalar type assuming the path maps to a scalar (boolean, number, string or null). It returns null when the path points to a object or array structure

      This is also in Presto (https://prestodb.io/docs/current/functions/json.html).

      Attachments

        Activity

          People

            Unassigned Unassigned
            tnachen Timothy Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: