Skip to content

Commit b1c04e1

Browse files
committed
Support offset syntax.
1 parent 104ee60 commit b1c04e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/SizeInBytesOnlyStatsPlanVisitor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ object SizeInBytesOnlyStatsPlanVisitor extends LogicalPlanVisitor[Statistics] {
8080
override def visitGenerate(p: Generate): Statistics = default(p)
8181

8282
override def visitOffset(p: Offset): Statistics = {
83-
val offset = p.offsetExpr.eval().asInstanceOf[BigInt]
83+
val offset = BigInt(p.offsetExpr.eval().asInstanceOf[Int])
8484
val childStats = p.child.stats
8585
val rowCount: BigInt = childStats.rowCount.map { x => (x - offset).max(0) }.get
8686
Statistics(

0 commit comments

Comments
 (0)