Pranav Chintareddy created SPARK-57190:
------------------------------------------

             Summary: Resolve API inconsistency for 4-argument regexp_replace
                 Key: SPARK-57190
                 URL: https://issues.apache.org/jira/browse/SPARK-57190
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 4.1.2, 4.1.1, 4.2.0, 4.1.3
            Reporter: Pranav Chintareddy


Spark SQL supports the 4-argument form of `regexp_replace`:

```
regexp_replace(str, regexp, replacement, position)
```

However, the corresponding Scala, PySpark, and Spark Connect APIs currently 
expose only the 3-argument variants.

As a result, functionality available through SQL cannot be accessed through the 
public APIs, creating an inconsistency between SQL and programmatic interfaces.

This improvement adds support for the optional `position` argument in:

* Scala API
* PySpark API
* Spark Connect API

and adds corresponding Scala, PySpark, and Connect test coverage.

The underlying SQL functionality already exists; this change aligns the public 
APIs with existing SQL capabilities.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to