support alphanumeric sorting for dimensional columns in groupby#2393
Merged
navis merged 1 commit intoapache:masterfrom Feb 16, 2016
jaehc:support-alphanumeric-dimensional-sort-in-gropu-by
Merged
support alphanumeric sorting for dimensional columns in groupby#2393navis merged 1 commit intoapache:masterfrom jaehc:support-alphanumeric-dimensional-sort-in-gropu-by
navis merged 1 commit intoapache:masterfrom
jaehc:support-alphanumeric-dimensional-sort-in-gropu-by
Conversation
Contributor
There was a problem hiding this comment.
there is an alphanumeric comparator we use for topNs
can we reuse that?
Contributor
There was a problem hiding this comment.
AlphaNumericTopNMetricSpec.java has the comparator
Contributor
There was a problem hiding this comment.
nevermind,this is a copy of that, my bad
Contributor
|
👍 |
Contributor
Author
There was a problem hiding this comment.
do you mean like the below?
public static final String LEXICOGRAPHIC_NAME = "lexicographic";
public static final String ALPHANUMERIC_NAME = "alphanumeric";
public static final LexicographicComparator LEXICOGRAPHIC = new LexicographicComparator();
public static final AlphanumericComparator ALPHANUMERIC = new AlphanumericComparator();
Contributor
|
👍 with minor comments. |
Contributor
Author
|
squashed all commits. |
navis
added a commit
that referenced
this pull request
Feb 16, 2016
…sional-sort-in-gropu-by support alphanumeric sorting for dimensional columns in groupby (#2393)
| String json = jsonMapper.writeValueAsString(query); | ||
| Query serdeQuery = jsonMapper.readValue(json, Query.class); | ||
|
|
||
| System.out.println(json); |
Contributor
|
It would be great to add this to the docs should I file a separate docs issue? |
Contributor
|
@CHOIJAEHONG1, @vogievetsky makes a good point. We should have some docs for this |
seoeun25
pushed a commit
to seoeun25/incubator-druid
that referenced
this pull request
Jan 10, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, an orderby clause in a groupby query only supports the lexicographical ordering for dimensional columns. I think it would be useful to provide the alphanumeric ordering as well.
StringComparatoris a newly introduced class to abstract two types of ordering in characters. The main routines for them have been pulled fromAlphaNemericTopNMetircSpecandLexicographicalTopNMetricSpec.The below is a piece of grouby query which sorts the
pagedimension in descending alphanumeric order to give an example.It would be grateful if you post any comment here. Thanks.