Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14630

Replace {STRING|INT|REAL|DECIMAL|DATE}_ITEM to CONST_ITEM

Details

    Description

      The enumeration Item::Type has data-type specific constants for literals:

      • STRING_ITEM
      • INT_ITEM
      • REAL_ITEM
      • DECIMAL_ITEM
      • DATE_ITEM

      This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

      We'll do the following:

      • Remove the data type specific enumeration values from Item::Type
      • Add a new value CONST_ITEM
      • Fix the calling code to test for CONST_ITEM, and when it is necessary, detect the data type using other means, such as type_handler(), or by adding new virtual methods into Item or its descendants.

      Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() (when assigned to an integer value), reports itself as INT_ITEM. This makes parameter work as a position rather than an expression when used in ORDER BY:

        if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
            !from_window_spec)
      

      This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            Summary Replace {STRING|INT|REAL|DECIMAL|DATE_ITEM} to LITERAL_ITEM Replace {STRING|INT|REAL|DECIMAL|DATE}_ITEM to LITERAL_ITEM
            bar Alexander Barkov made changes -
            Description The enumeration {{Item::Type}} has data-type specific constants:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins.

            We'll do the following:
            - Remove the data type specific enumeration values
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.
            The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins.

            We'll do the following:
            - Remove the data type specific enumeration values
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.
            bar Alexander Barkov made changes -
            Description The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins.

            We'll do the following:
            - Remove the data type specific enumeration values
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.
            The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.
            bar Alexander Barkov made changes -
            Description The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.
            The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Description The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.
            The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.

            Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() assigned to an integer value, reports itself as {{INT_ITEM}}. This makes parameter work as a position rather than an expression when used in {{ORDER BY}}:
            {code:cpp}
              if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
                  !from_window_spec)
            {code}
            This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.
            bar Alexander Barkov made changes -
            Description The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}.

            Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() assigned to an integer value, reports itself as {{INT_ITEM}}. This makes parameter work as a position rather than an expression when used in {{ORDER BY}}:
            {code:cpp}
              if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
                  !from_window_spec)
            {code}
            This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.
            The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}, or by adding new virtual methods into Item or its descendants.

            Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() assigned to an integer value, reports itself as {{INT_ITEM}}. This makes parameter work as a position rather than an expression when used in {{ORDER BY}}:
            {code:cpp}
              if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
                  !from_window_spec)
            {code}
            This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.
            bar Alexander Barkov made changes -
            Description The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}, or by adding new virtual methods into Item or its descendants.

            Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() assigned to an integer value, reports itself as {{INT_ITEM}}. This makes parameter work as a position rather than an expression when used in {{ORDER BY}}:
            {code:cpp}
              if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
                  !from_window_spec)
            {code}
            This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.
            The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}, or by adding new virtual methods into Item or its descendants.

            Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() (when assigned to an integer value), reports itself as {{INT_ITEM}}. This makes parameter work as a position rather than an expression when used in {{ORDER BY}}:
            {code:cpp}
              if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
                  !from_window_spec)
            {code}
            This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.3 [ 22126 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Summary Replace {STRING|INT|REAL|DECIMAL|DATE}_ITEM to LITERAL_ITEM Replace {STRING|INT|REAL|DECIMAL|DATE}_ITEM to CONST_ITEM
            bar Alexander Barkov made changes -
            Description The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{LITERAL_ITEM}}
            - Fix the calling code to test for {{LITERAL_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}, or by adding new virtual methods into Item or its descendants.

            Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() (when assigned to an integer value), reports itself as {{INT_ITEM}}. This makes parameter work as a position rather than an expression when used in {{ORDER BY}}:
            {code:cpp}
              if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
                  !from_window_spec)
            {code}
            This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.
            The enumeration {{Item::Type}} has data-type specific constants for literals:

            - STRING_ITEM
            - INT_ITEM
            - REAL_ITEM
            - DECIMAL_ITEM
            - DATE_ITEM

            This is not friendly to upcoming data type plugins, as they'll need to create their own literals.

            We'll do the following:
            - Remove the data type specific enumeration values from {{Item::Type}}
            - Add a new value {{CONST_ITEM}}
            - Fix the calling code to test for {{CONST_ITEM}}, and when it is necessary, detect the data type using other means, such as {{type_handler()}}, or by adding new virtual methods into Item or its descendants.

            Note, under terms of this task, we'll preserve the old behavior. For example, Item_param::type() (when assigned to an integer value), reports itself as {{INT_ITEM}}. This makes parameter work as a position rather than an expression when used in {{ORDER BY}}:
            {code:cpp}
              if (order_item->type() == Item::INT_ITEM && order_item->basic_const_item() &&
                  !from_window_spec)
            {code}
            This behavior was most likely introduced as a side effect. The new implementation will preserve the old behavior, including side effects like this.
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2018-06-06 10:09:26.0 2018-06-06 10:09:26.602
            bar Alexander Barkov made changes -
            Fix Version/s 10.4.0 [ 23115 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            julien.fritsch Julien Fritsch made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 84390 ] MariaDB v4 [ 133418 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.