calcite icon indicating copy to clipboard operation
calcite copied to clipboard

[CALCITE-3438] Validator should disallow use of the GROUPING function inside a FILTER clause

Open DonnyZone opened this issue 5 years ago • 2 comments

AggVisitor ignores to find grouping functions in default. However, for some cases we need to consider these functions. This PR adds an interface to control its beheavior, and tries for fix the issue described in CALCITE-3438.

DonnyZone avatar Nov 01 '19 09:11 DonnyZone

Grouping function is a special agg function. +1 to find it in AggFinder. Rather than switching the config of boolean grouping in validator, do we consider to add another interface for AggFinder, something like findGrouping ?

jinxing64 avatar Nov 03 '19 09:11 jinxing64

@jinxing64 I ever consider to do in that way. However, I found there are already 5 AggFinders in SqlValidatorImp. I'm not sure whether it is a good choice. So I propose this fix first, and waiting for reviewers' advices.

DonnyZone avatar Nov 04 '19 02:11 DonnyZone