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

direct SQL perf optimization cannot be tested well



    • Type: Test
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.0
    • Component/s: None
    • Labels:


      HIVE-4051 introduced perf optimization that involves getting partitions directly via SQL in metastore. Given that SQL queries might not work on all datastores (and will not work on non-SQL ones), JDO fallback is in place.
      Given that perf improvement is very large for short queries, it's on by default.

      However, there's a problem with tests with regard to that. If SQL code is broken, tests may fall back to JDO and pass. If JDO code is broken, SQL might allow tests to pass.

      We are going to disable SQL by default before the testing problem is resolved.
      There are several possible solultions:
      1) Separate build for this setting. Seems like an overkill...
      2) Enable by default; disable by default in tests, create a clone of TestCliDriver with a subset of queries that will exercise the SQL path.
      3) Have some sort of test hook inside metastore that will run both ORM and SQL and compare.
      3') Or make a subclass of ObjectStore that will do that. ObjectStore is already pluggable.
      4) Write unit tests for one of the modes (JDO, as non-default?) and declare that they are sufficient; disable fallback in tests.

      3' seems like the easiest. For now we will disable SQL by default.


        1. HIVE-5029.patch
          0.7 kB
          Sergey Shelukhin
        2. HIVE-5029.patch
          0.7 kB
          Sergey Shelukhin
        3. HIVE-5029.D12483.1.patch
          10 kB
        4. HIVE-5029.D12483.2.patch
          11 kB

          Issue Links



              • Assignee:
                sershe Sergey Shelukhin
                sershe Sergey Shelukhin
              • Votes:
                0 Vote for this issue
                5 Start watching this issue


                • Created: