Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0
Description
Vectorized row number implementation resets the row number when constant expression is passed in partition clause.
Repro Query
select row_number() over(partition by 1) r1, t from over10k_n8; Or select row_number() over() r1, t from over10k_n8;
where table over10k_n8 contains more than 1024 records.
This happens because currently in VectorPTFOperator, we reset evaluators if only partition clause is there.
// If we are only processing a PARTITION BY, reset our evaluators. if (!isPartitionOrderBy) { groupBatches.resetEvaluators(); }
To resolve, we should also check if the entire partition clause is a constant expression, if it is so then we should not do groupBatches.resetEvaluators()
Attachments
Attachments
Issue Links
- links to