Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13685

Vectorization: Date*ColScalar parses the scalar in every loop

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.1.0
    • None
    • Vectorization
    • None

    Description

      @Override
        public void evaluate(VectorizedRowBatch batch) {
      ...
      switch (inputTypes[0]) {
      ...
            case STRING:
            case CHAR:
            case VARCHAR:
              try {
                baseDate = formatter.parse(new String(stringValue, "UTF-8"));
                break;
      

      This is parsing the constant scalar for every evaluate() call.

      Parsing the constant in the initialize op will save thousands of expensive calls into Calendar operations.

      Attachments

        1. HIVE-13685.1.patch
          10 kB
          Gopal Vijayaraghavan
        2. HIVE-13685.2.patch
          15 kB
          Gopal Vijayaraghavan
        3. HIVE-13685.WIP.patch
          5 kB
          Gopal Vijayaraghavan

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gopalv Gopal Vijayaraghavan Assign to me
            gopalv Gopal Vijayaraghavan

            Dates

              Created:
              Updated:

              Slack

                Issue deployment