[ 
https://issues.apache.org/jira/browse/SPARK-31367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17077228#comment-17077228
 ] 

Bill Schneider commented on SPARK-31367:
----------------------------------------

[~hyukjin.kwon] Why does DBMS support matter?  octet_length looks like ANSI SQL 
supported by PostgreSQL and MySQL. 

But my case is the opposite problem.  The function is already supported in 
Spark SQL ("select octet_length(col) as foo from table") but NOT easily via 
Scala code.  What I want to do but can't is `withColumn("foo", 
octet_length($"col"))`

> add octet_length to functions
> -----------------------------
>
>                 Key: SPARK-31367
>                 URL: https://issues.apache.org/jira/browse/SPARK-31367
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 2.4.5, 3.0.0
>            Reporter: Bill Schneider
>            Priority: Major
>
> Many functions are available in statically-typed Scala code via 
> org.apache.spark.sql.functions, for example `length`: 
> [https://github.com/apache/spark/blob/f5250a581b765ef8c9044438b5d27461f843b7fd/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L2407]
> I'm requesting `octet_length` to be included similarly. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to