hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myui <...@git.apache.org>
Subject [GitHub] incubator-hivemall pull request #124: [HIVEMALL-157] Return empty list when ...
Date Tue, 31 Oct 2017 05:55:07 GMT
Github user myui commented on a diff in the pull request:

    https://github.com/apache/incubator-hivemall/pull/124#discussion_r147900558
  
    --- Diff: core/src/main/java/hivemall/tools/list/UDAFToOrderedList.java ---
    @@ -406,6 +406,11 @@ void merge(@Nonnull List<Object> o_keyList, @Nonnull List<Object>
o_valueList) {
     
                 @Nonnull
                 Pair<List<Object>, List<Object>> drainQueue() {
    +                if (queueHandler == null) {
    +                    return Pair.of((List<Object>) new ArrayList<Object>(),
    +                        (List<Object>) new ArrayList<Object>());
    --- End diff --
    
    better to return `null` following the way in other SQL standard functions.
    
    `terminate()`, `terminatePartial()`, and `@Nonnull` annotation in `drainQueue` also need
to be changed.


---

Mime
View raw message