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

Rule OptimizeCsvJsonExprs should not be applied to expression like from_json(regexp_replace)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.1.1
    • 3.3.0
    • SQL
    • None

    Description

      SQL like below:

      select tmp.* 
       from
       (select
              device_id, ads_id, 
              from_json(regexp_replace(device_personas, '(?<=(\\\\\\{|,))"device_', '"user_device_'), ${device_schema}) as tmp
              from input )

      ${device_schema} includes more than 100 fields.

      if Rule: OptimizeCsvJsonExprs  been applied, the expression, regexp_replace, will be invoked many times, that costs so much time.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            lijiahong jiahong.li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: