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

Vectorization: Date*ColScalar parses the scalar in every loop

    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.WIP.patch
          5 kB
          Gopal Vijayaraghavan
        2. HIVE-13685.1.patch
          10 kB
          Gopal Vijayaraghavan
        3. HIVE-13685.2.patch
          15 kB
          Gopal Vijayaraghavan

        Activity

          People

            gopalv Gopal Vijayaraghavan
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: