Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QueryContext] Use QueryContext in functions #5613

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

Jackie-Jiang
Copy link
Contributor

Description

Replace BrokerRequest classes (AggregationInfo, TransformExpressionTree) with QueryContext classes (FunctionContext, ExpressionContext) for aggregation and transform functions
This is the last PR of removing BrokerRequest classes from the query execution path. After this PR, the query engine will be independent of BrokerRequest and only access QueryContext classes, and all the redundant expression parsing will be saved.

Besides replacing BrokerRequest classes, also refactored DistinctCountThetaSketchAggregationFunction to use the QueryContext classes, which solves the TODO of standardizing the predicate strings and simplifies the predicate handling.

Minor bug-fixes:

  • Fix HLL log2m override for SQL query and make it case insensitive (In BaseBrokerRequestHandler)
  • Add special argument handling for DistinctCountRawThetaSketch (In BrokerRequestToQueryContextConverter)
  • Always use single argument * for COUNT when converting FunctionCallAstNode to FunctionContext (In QueryContextConverterUtils)

Upgrade Notes

Because of the standardization of the DistinctCountThetaSketch predicate strings, please upgrade Broker before Server. The new Broker can handle both standard and non-standard predicate strings for backward-compatibility.

@Jackie-Jiang
Copy link
Contributor Author

@mayankshriv Can you please review the change in DistinctCountThetaSketchAggregationFunction?

Replace BrokerRequest classes (AggregationInfo, TransformExpressionTree) with QueryContext classes (FunctionContext, ExpressionContext) for aggregation and transform functions
@Jackie-Jiang Jackie-Jiang merged commit 1d9135b into apache:master Jun 29, 2020
@Jackie-Jiang Jackie-Jiang deleted the query_context_function branch June 29, 2020 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants