Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16818#discussion_r100539109
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/window/BoundOrdering.scala
 ---
    @@ -25,18 +25,22 @@ import 
org.apache.spark.sql.catalyst.expressions.Projection
      * Function for comparing boundary values.
      */
     private[window] abstract class BoundOrdering {
    -  def compare(inputRow: InternalRow, inputIndex: Int, outputRow: 
InternalRow, outputIndex: Int): Int
    +  def compare(
    +      inputRow: InternalRow,
    +      inputIndex: Long,
    +      outputRow: InternalRow,
    +      outputIndex: Long): Long
     }
     
     /**
      * Compare the input index to the bound of the output index.
      */
    -private[window] final case class RowBoundOrdering(offset: Int) extends 
BoundOrdering {
    +private[window] final case class RowBoundOrdering(offset: Long) extends 
BoundOrdering {
    --- End diff --
    
    It does not make any sense to make the offsets longs. This is an execution 
detail, buffer indexes (which are integer bound), and you really should not be 
messing with those.
    
    Try to keep your change more local, and only modify 
`WindowExec.createBoundOrdering` and the code generating the 
`WindowExec.windowFrameExpressionFactoryPairs`. That should be enough.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to