[jira] [Updated] (SPARK-45275) replace function fails to handle null replace param

2023-09-22 Thread Diogo Marques (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-45275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Diogo Marques updated SPARK-45275:
--
Attachment: replace_bug.png

> replace function fails to handle null replace param
> ---
>
> Key: SPARK-45275
> URL: https://issues.apache.org/jira/browse/SPARK-45275
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.4.0
>Reporter: Diogo Marques
>Priority: Major
> Attachments: replace_bug.png
>
>
> [replace |https://spark.apache.org/docs/latest/api/sql/#replace]function 
> fails to handle null replace param, example below:
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|person1|
> ||1|person1|2.0|person1|
> ||2|person1|3.0|person1|
> ||3|person2|1.0|person2|
> ||4|None|2.0|None|
> ||5|nUll|None|1|
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|None|
> ||1|person1|2.0|None|
> ||2|person1|3.0|None|
> ||3|person2|1.0|None|
> ||4|None|2.0|None|
> ||5|nUll|None|None|
>  
>  
> This function has been ported over to 3.5.0 but I've not been able to test it 
> on that yet



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-45275) replace function fails to handle null replace param

2023-09-22 Thread Diogo Marques (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-45275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Diogo Marques updated SPARK-45275:
--
Description: 
[replace |https://spark.apache.org/docs/latest/api/sql/#replace]function fails 
to handle null replace param, example below:

 
df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
|| ||col1||col2||test||
||0|person1|0.0|person1|
||1|person1|2.0|person1|
||2|person1|3.0|person1|
||3|person2|1.0|person2|
||4|None|2.0|None|
||5|nUll|None|1|

 
df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
|| ||col1||col2||test||
||0|person1|0.0|None|
||1|person1|2.0|None|
||2|person1|3.0|None|
||3|person2|1.0|None|
||4|None|2.0|None|
||5|nUll|None|None|

 

 

This function has been ported over to 3.5.0 but I've not been able to test it 
on that yet

  was:
[replace |https://spark.apache.org/docs/latest/api/sql/#replace]function fails 
to handle null replace param, example below:

 
df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
|| ||col1||col2||test||
||0|person1|0.0|person1|
||1|person1|2.0|person1|
||2|person1|3.0|person1|
||3|person2|1.0|person2|
||4|None|2.0|None|
||5|nUll|None|1|
 
df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
|| ||col1||col2||test||
||0|person1|0.0|None|
||1|person1|2.0|None|
||2|person1|3.0|None|
||3|person2|1.0|None|
||4|None|2.0|None|
||5|nUll|None|None|


> replace function fails to handle null replace param
> ---
>
> Key: SPARK-45275
> URL: https://issues.apache.org/jira/browse/SPARK-45275
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.4.0
>Reporter: Diogo Marques
>Priority: Major
>
> [replace |https://spark.apache.org/docs/latest/api/sql/#replace]function 
> fails to handle null replace param, example below:
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|person1|
> ||1|person1|2.0|person1|
> ||2|person1|3.0|person1|
> ||3|person2|1.0|person2|
> ||4|None|2.0|None|
> ||5|nUll|None|1|
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|None|
> ||1|person1|2.0|None|
> ||2|person1|3.0|None|
> ||3|person2|1.0|None|
> ||4|None|2.0|None|
> ||5|nUll|None|None|
>  
>  
> This function has been ported over to 3.5.0 but I've not been able to test it 
> on that yet



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-45275) replace function fails to handle null replace param

2023-09-22 Thread Diogo Marques (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-45275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Diogo Marques updated SPARK-45275:
--
Priority: Trivial  (was: Major)

> replace function fails to handle null replace param
> ---
>
> Key: SPARK-45275
> URL: https://issues.apache.org/jira/browse/SPARK-45275
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.4.0
>Reporter: Diogo Marques
>Priority: Trivial
>
> [replace |https://spark.apache.org/docs/latest/api/sql/#replace]function 
> fails to handle null replace param, example below:
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|person1|
> ||1|person1|2.0|person1|
> ||2|person1|3.0|person1|
> ||3|person2|1.0|person2|
> ||4|None|2.0|None|
> ||5|nUll|None|1|
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|None|
> ||1|person1|2.0|None|
> ||2|person1|3.0|None|
> ||3|person2|1.0|None|
> ||4|None|2.0|None|
> ||5|nUll|None|None|



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-45275) replace function fails to handle null replace param

2023-09-22 Thread Diogo Marques (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-45275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Diogo Marques updated SPARK-45275:
--
Priority: Major  (was: Trivial)

> replace function fails to handle null replace param
> ---
>
> Key: SPARK-45275
> URL: https://issues.apache.org/jira/browse/SPARK-45275
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.4.0
>Reporter: Diogo Marques
>Priority: Major
>
> [replace |https://spark.apache.org/docs/latest/api/sql/#replace]function 
> fails to handle null replace param, example below:
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|person1|
> ||1|person1|2.0|person1|
> ||2|person1|3.0|person1|
> ||3|person2|1.0|person2|
> ||4|None|2.0|None|
> ||5|nUll|None|1|
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|None|
> ||1|person1|2.0|None|
> ||2|person1|3.0|None|
> ||3|person2|1.0|None|
> ||4|None|2.0|None|
> ||5|nUll|None|None|



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-45275) replace function fails to handle null replace param

2023-09-22 Thread Diogo Marques (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-45275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Diogo Marques updated SPARK-45275:
--
Description: 
[replace |https://spark.apache.org/docs/latest/api/sql/#replace]function fails 
to handle null replace param, example below:

 
df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
|| ||col1||col2||test||
||0|person1|0.0|person1|
||1|person1|2.0|person1|
||2|person1|3.0|person1|
||3|person2|1.0|person2|
||4|None|2.0|None|
||5|nUll|None|1|
 
df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
|| ||col1||col2||test||
||0|person1|0.0|None|
||1|person1|2.0|None|
||2|person1|3.0|None|
||3|person2|1.0|None|
||4|None|2.0|None|
||5|nUll|None|None|

  was:
[replace |https://spark.apache.org/docs/latest/api/sql/#replace]function fails 
to handle null replace param, example in the attached screenshot

 

 


> replace function fails to handle null replace param
> ---
>
> Key: SPARK-45275
> URL: https://issues.apache.org/jira/browse/SPARK-45275
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.4.0
>Reporter: Diogo Marques
>Priority: Major
>
> [replace |https://spark.apache.org/docs/latest/api/sql/#replace]function 
> fails to handle null replace param, example below:
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", 1)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|person1|
> ||1|person1|2.0|person1|
> ||2|person1|3.0|person1|
> ||3|person2|1.0|person2|
> ||4|None|2.0|None|
> ||5|nUll|None|1|
>  
> df.withColumn('test',F.expr('replace(col1, "nUll", null)')).show()
> || ||col1||col2||test||
> ||0|person1|0.0|None|
> ||1|person1|2.0|None|
> ||2|person1|3.0|None|
> ||3|person2|1.0|None|
> ||4|None|2.0|None|
> ||5|nUll|None|None|



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Updated] (SPARK-45275) replace function fails to handle null replace param

2023-09-22 Thread Diogo Marques (Jira)


 [ 
https://issues.apache.org/jira/browse/SPARK-45275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Diogo Marques updated SPARK-45275:
--

!image-2023-09-22-08-19-36-300.png!

> replace function fails to handle null replace param
> ---
>
> Key: SPARK-45275
> URL: https://issues.apache.org/jira/browse/SPARK-45275
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 3.4.0
>Reporter: Diogo Marques
>Priority: Major
>
> [replace |https://spark.apache.org/docs/latest/api/sql/#replace]function 
> fails to handle null replace param, example in the attached screenshot
>  
>  



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org