himanshug opened a new pull request #10277:
URL: https://github.com/apache/druid/pull/10277
`WIP` tag is added because I am still in the process of testing it more
thoroughly, However code in current patch is working in preliminary testing. I
will also try and some UTs for the changes. That said, code is totally
reviewable.
### Description
This patch adds support for adding COMPLEX type Dimension column via
Extensions, similar support for Metric columns exist.
Main changes are to add `String getTypeName()` in `ColumnCapabilities`
interface and to add
`DimensionHandlerUtils.registerDimensionHandlerProvider(String typeName,
DimensionHandlerProvider)` to enable extensions to register custom type
specific `DimensionHandler`, very similar to existing
`ComplexMetrics.registerSerde(..)`
After this patch, Users can have extensions with custom implementations of
`DimensionHandler`, `ComplexMetricSerde`
and related interfaces to add COMPLEX type Dimension Column.
In addition to above, extension would also make
`ComplexMetrics.registerSerde(typeName,..)` and
`DimensionHandlerUtils.registerDimensionHandlerProvider(typeName,..)` to
register custom type specific implementations.
Side-note: I am using this extensibility to add a `Map<String, String>` type
Dimension column for various reasons which will later be added in a separate PR
as contrib extension.
<hr>
This PR has:
- [x] been self-reviewed.
- [ ] using the [concurrency
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
(Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [x] added Javadocs for most classes and all non-trivial methods. Linked
related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in
[licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml)
- [x] added comments explaining the "why" and the intent of the code
wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for [code
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
<hr>
##### Key changed/added classes in this PR
* `ColumnCapabilities`
* `DimensionHandlerUtils`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]