Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-13434

Refactor ecl/hql to make it easier to add new nodes

    XMLWordPrintable

Details

    • Improvement
    • Status: Accepted
    • Not specified
    • Resolution: Unresolved
    • None
    • None
    • Code Generator
    • None

    Description

      Currently adding a new node involves making changes in many different parts of ecl/hql. It would be much simpler if they were all gathered into a single place.

      Probably the easiest/best implementation would be to have a class instance per node type, which was accessed via a static array. All information could then be accessed via

      nodeInfo[expr->getOperator()].queryInterestingInformation().

      Many of the information objects could share the same class implementation, but instantiated with different parameters. Other more complex variations could be supported by specialised class instances.

      Efficiency wise you would be trading switch statements for indexes into a global table. There is unlikely to be a significant penalty (especially if the common functions can be implemented inline), and it may provide significant scope for cleaning up the calling code.

      Attachments

        Issue Links

          Activity

            People

              ghalliday Gavin Halliday
              ghalliday Gavin Halliday
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: