This adds a new namespace underneath the global namespace, which dynamically contains function definitions specific to the current dialect.
This PR does not add very many function definition, just sets the groundwork for it.
There are no name conflicts between the "global" namespace (where Malloy standard functions live) and this dialect namespace. If there were, you would always get the global version, since they are always stacked and there is no way to explicitly access one namespace or another. The intent is that in the future, you can explicitly reference dialect.function_name to access the conflicting version — e.g. dialect.starts_with(x, "prefix") would give you three-state boolean null behavior rather than the "Malloy standard" two-state boolean null behavior.
This adds a new namespace underneath the global namespace, which dynamically contains function definitions specific to the current dialect.
This PR does not add very many function definition, just sets the groundwork for it.
There are no name conflicts between the "global" namespace (where Malloy standard functions live) and this dialect namespace. If there were, you would always get the global version, since they are always stacked and there is no way to explicitly access one namespace or another. The intent is that in the future, you can explicitly reference
dialect.function_name
to access the conflicting version — e.g.dialect.starts_with(x, "prefix")
would give you three-state boolean null behavior rather than the "Malloy standard" two-state boolean null behavior.