Skip to content

Conversation

@zabetak
Copy link
Member

@zabetak zabetak commented Nov 25, 2025

What changes were proposed in this pull request?

  1. Drop CanAggregateDistinct and refactor dependent code accordingly.
  2. Remove isDistinct indicator from all classes extending SqlAggFunction.
  3. Move the part handling window functions from SqlFunctionConverter#buildAST to ASTConverter
  4. Generalize the generation of TOK_FUNCTIONSTAR for aggregate functions by exploiting SqlOperator#getSqlSyntax
  5. Replace CalciteUDAF with SqlBasicAggFunction.create since the former does not bring any additional info (operandTypeInference is removed but it is not used anyways from Hive).

Why are the changes needed?

  1. Simpler and more generic code
  2. Better code coverage
  3. Easier maintenance (calcite upgrades, new rules, extensions, etc.)

For full motivation check HIVE-29339

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests and in particular those around aggregate and window functions.

 mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile_regex=".*ptf.*
 mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile_regex=".*window.*

1. Drop CanAggregateDistinct and refactor dependent code accordingly.
2. Remove isDistinct indicator from all classes extending SqlAggFunction.
3. Move the part handling window functions from SqlFunctionConverter#buildAST to ASTConverter
4. Generalize the generation of TOK_FUNCTIONSTAR for aggregate functions by exploiting SqlOperator#getSqlSyntax
5. Replace CalciteUDAF with SqlBasicAggFunction.create since the former does not bring any additional info (operandTypeInference is removed but it is not used anyways from Hive).
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants