Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4056

toSql() of DistributeParam doesn't work as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Kudu_Impala, Impala 2.7.0
    • Impala 2.8.0
    • Frontend
    • CentOS 6.7

    Description

      Originally toSql() of DistributeParam wouldn't print any split rows for type range. As code below shows:

      public String toSql() {
          if (num_buckets_ == NO_BUCKETS) {
            StringBuilder builder = new StringBuilder();
            for (ArrayList<LiteralExpr> splitRow : splitRows_) {
              splitRowToString(splitRow);
            }
            return String.format("RANGE(%s) INTO RANGES(%s)", Joiner.on(", ").join(columns_),
                builder.toString());
          } else {
            return String.format("HASH(%s) INTO %d BUCKETS", Joiner.on(", ").join(columns_),
                num_buckets_);
          }
        }
      

      We didn't append the return string of splitRowToString() to builder, so builder.toString() wouldn't print anything.

      Attachments

        Activity

          People

            yhluo_impala_39a4 Yuanhao Luo
            yhluo_impala_39a4 Yuanhao Luo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: