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

Refactor QueryProperties using enumeration for readability and performance

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Query Planning

    Description

      The QueryProperties class contains many boolean attributes to indicate if a query has a certain feature or not. This implementation is wasteful in terms of memory since queries usually have only a few of these features and the majority will remain at their default values. Moreover, the class is unnecessarily verbose since each feature requires a dedicated getter/setter.

      The readability and efficiency of the class and its callers can be improved by using an enumeration to hold each available query feature and a Set (EnumSet?) inside QueryProperties to hold all the features that appear in the query.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zabetak Stamatis Zampetakis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: