himanshug opened a new pull request #10628:
URL: https://github.com/apache/druid/pull/10628
### Description
Introduces a "mapStringString" complex type dimension column. All the code
lives in an isolated contrib extension and implements relevant extensible Druid
core interfaces e.g. ComplexColumn, ComplexMetricSerde, DimensionHandler,
DimensionIndexer, DimensionMerger etc etc.
It allows ingestion of `Map<String,String>` column in users input data as a
single `dimension` column . At query time, user can access individual keys in
the map as if they were simple `string` dimension columns (see
`MapStringStringKeyVirtualColumn.java` ) or column can be accessed as records
of `Map<String,String>` type but that does not have much use in Druid query
layer for now aside from `select` query.
User would have to implement their own `InputRowParser` to supply
`Map<String,String>` records for ingestion , we used one that was very specific
to our needs.
This extension also serves as an example of how users can create their own
dimension columns for the specific needs and also [indirectly] tests the
dimension extensibility support introduced in #10277
Future: Now that `VirtualColumn` interface has been enhanced to support
vectorization, maybe the virtual column implementation code in this extension
could also be improved to support that for [potentially] better performance.
<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.
- [x] 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.
- [x] been tested in a test Druid cluster.
<!-- Check the items by putting "x" in the brackets for the done things. Not
all of these items apply to every PR. Remove the items which are not done or
not relevant to the PR. None of the items from the checklist above are strictly
necessary, but it would be very helpful if you at least self-review the PR. -->
<hr>
----------------------------------------------------------------
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]