Kernel Force created SPARK-37127:
------------------------------------

             Summary: Support non-literal frame bound value for window functions
                 Key: SPARK-37127
                 URL: https://issues.apache.org/jira/browse/SPARK-37127
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.0.3
         Environment: Spark-3.0.3
            Reporter: Kernel Force



{code:sql}
sql("""
with va as (
select 15 a, 100 b
 union all
select 15, 120
 union all
select 15, 130
 union all
select 15, 150
)
select t.*, 
       min(t.b) over(partition by t.a order by t.b range between 0.15*t.b 
preceding and current row) c 
  from va t 
""").show
{code}

throws 


{code:java}
org.apache.spark.sql.catalyst.parser.ParseException:
Frame bound value must be a literal.(line 12, pos 65)
{code}

The non-literal expression *0.15*t.b* might leads this exception.

But the non-literal frame bound value has already been support by oracle which 
is very useful.



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

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

Reply via email to