Hi all,

I've just started having a look at how to add scalar functions like
SUBSTRING, CONCAT, UPPER... to MetaModel.

I started by adding these functions to the MetaModel parser. There is
already a FunctionType enum that takes care of all the aggregate functions
(SUM, COUNT, AVG...) This FunctionType is used in the SelectItemParser to
find out the function type and parse it accordingly.

Not sure if I should add a new "ScalarFunctionType" enum or modify somehow
the existing one to take into account the new scalar functions. I do not
like the idea of having quite different "semantic" elements within the same
enum type but neither like the idea of having to ask everywhere whether the
function is scalar or not.

I'm thinking of creating kinda enum hierarchical data structure, but still
not sure how to do it because the FunctionType has several methods that are
very coupled to the aggregate functions (abstract AggregateBuilder,
evaluate...)

Any ideas?

Kind regards,

Alberto

Reply via email to