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

Consolidate LockType naming

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Transactions
    • Labels:
      None

      Description

      Extend enum with string literal to remove unnecessary `id` to `char` casting for the LockType:

      switch (lockType) {
                  case EXCLUSIVE:
                    lockChar = LOCK_EXCLUSIVE;
                    break;
                  case SHARED_READ:
                    lockChar = LOCK_SHARED;
                    break;
                  case SHARED_WRITE:
                    lockChar = LOCK_SEMI_SHARED;
                    break;
                }
      

      Consolidate LockType naming in code and schema upgrade scripts:

      CASE WHEN HL.`HL_LOCK_TYPE` = 'e' THEN 'exclusive' WHEN HL.`HL_LOCK_TYPE` = 'r' THEN 'shared' WHEN HL.`HL_LOCK_TYPE` = 'w' THEN *'semi-shared'* END AS LOCK_TYPE,
      
      

      Lock types:

      EXCLUSIVE
      EXCL_WRITE
      SHARED_WRITE
      SHARED_READ

        Attachments

        1. HIVE-22750.9.patch
          28 kB
          Marton Bod
        2. HIVE-22750.9.patch
          28 kB
          Marton Bod
        3. HIVE-22750.9.patch
          28 kB
          Marton Bod
        4. HIVE-22750.9.patch
          28 kB
          Marton Bod
        5. HIVE-22750.8.patch
          28 kB
          Marton Bod
        6. HIVE-22750.7.patch
          29 kB
          Marton Bod
        7. HIVE-22750.6.patch
          32 kB
          Marton Bod
        8. HIVE-22750.5.patch
          20 kB
          Marton Bod
        9. HIVE-22750.5.patch
          20 kB
          Marton Bod
        10. HIVE-22750.4.patch
          48 kB
          Marton Bod
        11. HIVE-22750.3.patch
          20 kB
          Marton Bod
        12. HIVE-22750.2.patch
          20 kB
          Marton Bod
        13. HIVE-22750.13.patch
          31 kB
          Marton Bod
        14. HIVE-22750.12.patch
          31 kB
          Marton Bod
        15. HIVE-22750.12.patch
          31 kB
          Marton Bod
        16. HIVE-22750.11.patch
          31 kB
          Marton Bod
        17. HIVE-22750.10.patch
          31 kB
          Marton Bod
        18. HIVE-22750.1.patch
          18 kB
          Marton Bod

          Issue Links

            Activity

              People

              • Assignee:
                Marton Bod Marton Bod
                Reporter:
                zchovan Zoltan Chovan
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: