Details

    • New name resolution

    Description

      To unlock some impossible now features like dependent subqueries in a FROM clause name (but probably not only this) resolution should be redone to separate it from other info collecting.

      • First pass should create array of name of fields (Item_type_holder) for SELECTs and TABLE_LISTs, including unfolding "*" in SELECTs (inner -> out, Post-order tree traversal) (actually it would be better to have just iterators fr fields, so it is not needed)
      • Second pass (or two) only create connection between place of name usage (Item_ident) and a field descriptor in the table above (possible in any order now) (can be done by pre-made on parser list of names which need to be resolved)
      • Third pass collect type information for all Items, calculate type compatibility (Post-order tree traversal).
      • Fourth pass "normalize" tree:
        • add correct Item in place of resolved names
        • constant calculation/conversion
        • ...

      All changes made once and on statement mem_root memory.

      Attachments

        Issue Links

          Activity

            Where we resolve names:

            • tables
              • usual tables
                • hash
                • array
              • views
              • nornal joins
            • select list
            • SP variables

            Other objects to resolve (probably out of this MDEV context):

            • order/group elements
            • aggregate functions
            sanja Oleksandr Byelkin added a comment - Where we resolve names: tables usual tables hash array views nornal joins select list SP variables Other objects to resolve (probably out of this MDEV context): order/group elements aggregate functions

            Problem of flag of select list resolving during processing should be addressed.

            sanja Oleksandr Byelkin added a comment - Problem of flag of select list resolving during processing should be addressed.
            Roel Roel Van de Paar added a comment - - edited

            Would it be possible while implementing this to fix the open name resolution bugs please? Thank you!

            sanja If that may be an option, I would be happy to review all bugs with the tag name_resolution and update them with the current state, create an MTR testcase where they are not present yet, etc. – let me know if that would help!

            Roel Roel Van de Paar added a comment - - edited Would it be possible while implementing this to fix the open name resolution bugs please? Thank you! sanja If that may be an option, I would be happy to review all bugs with the tag name_resolution and update them with the current state, create an MTR testcase where they are not present yet, etc. – let me know if that would help!

            People

              sanja Oleksandr Byelkin
              sanja Oleksandr Byelkin
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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