EvitaQL parser support for classifier varargs next to value varargs
We are missing support for multiple reference names in hierarchyOfReference constraint, because there is varargs for these reference names followed by OPTIONAL enum value parameter. Problem occurs when we use positional or even named parameters from which we don't know beforehand if it will be classifier or value when parsing like so:
hierarchyOfReference(?, ?, ?, fromRoot())
which can be either
hierarchyOfReference('brand', 'category', LEAVE_EMPTY, fromRoot())
or
hierarchyOfReference('brand', 'category', 'parameter', fromRoot())
which currently I don't know how to solve.
If we add another branch into parser with only value varargs and parse it manually, we would have to remove current branches so that the parser is not confused or maybe use directly STRING literal instead of classifier. This would mean to duplicate all logic for classifiers to this one constraint, which IMO is a lot of custom manual DUPLICATE work for such edge case scenario.
We could add arrays into EvitaQL parser, this would solve cases where user uses EvitaQL directly, but wouldn't solve our Java Driver because the pretty printer on the backend will always print all arguments as varargs, it doesn't know about the inner arrays because Java constraint don't work with them either.
Originally posted by @lukashornych in https://github.com/FgForrest/evitaDB/issues/7#issuecomment-1557148544