wankunde commented on PR #42376:
URL: https://github.com/apache/spark/pull/42376#issuecomment-1674441218

   I think we can reuse the result of the same regexp_replace functions, for 
example, we can reuse the result of `regexp_replace(s, 'a', 'x')` :
   
   ```sql
   SELECT from_json(regexp_replace(s, 'a', 'x'), 'x INT, b DOUBLE').x,
          from_json(regexp_replace(s, 'a', 'x'), 'x INT, b DOUBLE').b
   FROM values('{"a":1, "b":0.8}') t(s)
   ```
   
   Filed another PR for this purpose: https://github.com/apache/spark/pull/42450
   
   cc @cloud-fan @wangyum 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to