[
https://issues.apache.org/jira/browse/TAJO-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234654#comment-15234654
]
ASF GitHub Bot commented on TAJO-2109:
--------------------------------------
Github user jinossy commented on a diff in the pull request:
https://github.com/apache/tajo/pull/992#discussion_r59166686
--- Diff:
tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/ExternalSortExec.java
---
@@ -133,6 +140,22 @@ private ExternalSortExec(final TaskAttemptContext
context, final SortNode plan)
this.localFS = new RawLocalFileSystem();
this.intermediateMeta = CatalogUtil.newTableMeta(BuiltinStorages.DRAW);
this.inputStats = new TableStats();
+ this.sortAlgorithm = getSortAlgorithm(context.getQueryContext(),
sortSpecs);
+ }
+
+ private static SortAlgorithm getSortAlgorithm(QueryContext context,
SortSpec[] sortSpecs) {
+ if (Arrays.stream(sortSpecs)
+ .filter(sortSpec -> !RadixSort.isApplicableType(sortSpec)).count()
> 0) {
+ return SortAlgorithm.TIM_SORT;
+ }
+ String sortAlgorithm = context.get(SessionVars.SORT_ALGORITHM, "TIM");
+ if (sortAlgorithm.equalsIgnoreCase("TIM")) {
--- End diff --
remove hardcode constants
> Implement Radix sort
> --------------------
>
> Key: TAJO-2109
> URL: https://issues.apache.org/jira/browse/TAJO-2109
> Project: Tajo
> Issue Type: New Feature
> Components: Sort algorithm
> Reporter: Jihoon Son
> Assignee: Jihoon Son
> Fix For: 0.12.0
>
>
> Radix sort is known for very fast sort algorithm when the length of the sort
> key is not long. We can benefit from Radix sort if it is used when it is
> faster than Tim sort.
> In this issue, I will implement Radix sort for Tajo, and conduct some
> benchmark tests to compare its performance with Tim sort.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)