Skip to content

Commit

Permalink
Fix HyperLogLog type registration in registerApproxDistinctAggregates (
Browse files Browse the repository at this point in the history
…facebookincubator#10664)

Summary:
Prefix is not needed to register custom type `HyperLogLog` in `ApproxDistinctAggregates`.
`registerHyperLogLogType` is used instead to make registration of customType `HyperLogLog`
uniform across velox.

Use of prefix in `registerCustomType` here resulted in the following error while running tests
in [presto PR](prestodb/presto#22332):
```
Reason: Type doesn't exist: 'HYPERLOGLOG'
Retriable: False
Function: validateBaseTypeAndCollectTypeParams
File: /Users/pramod/Desktop/velox/velox/expression/FunctionSignature.cpp
Line: 125
```

Pull Request resolved: facebookincubator#10664

Reviewed By: bikramSingh91

Differential Revision: D61163251

Pulled By: xiaoxmeng

fbshipit-source-id: 8d316a9bc863a779ab81a50fb06b5d3761d8316b
  • Loading branch information
pramodsatya authored and facebook-github-bot committed Aug 12, 2024
1 parent ab01520 commit f340734
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,7 @@ void registerApproxDistinctAggregates(
const std::string& prefix,
bool withCompanionFunctions,
bool overwrite) {
registerCustomType(
prefix + "hyperloglog",
std::make_unique<const HyperLogLogTypeFactories>());
registerHyperLogLogType();
registerApproxDistinct(
prefix + kApproxDistinct,
false,
Expand Down

0 comments on commit f340734

Please sign in to comment.