Details
-
Improvement
-
Status: Accepted
-
Not specified
-
Resolution: Unresolved
-
None
-
None
-
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
- is cloned by
-
HPCC-13435 Refactor ecl/hqlcpp to make it easier to add new nodes
-
- Accepted
-