Open jacques-n opened 3 months ago
There are also two in substrait-cpp.
Type parsers? Can you provide pointers to them?
This has support for types and parameterized types: https://github.com/substrait-io/substrait-cpp/tree/main/src/substrait/type
There's a wrapper with slight improvements for text parsing here: https://github.com/substrait-io/substrait-cpp/blob/1dbf98b548de3ef11cac2a42075b87f57e7004b9/src/substrait/textplan/parser/SubstraitPlanTypeVisitor.cpp#L24
create a single parser
Shouldn't we add the grammar definition to the core repo and keep the implementations in the language repos?
Shouldn't we add the grammar definition to the core repo and keep the implementations in the language repos?
Yes, this was what this ticket is trying to suggest. I'll update description make clearer.
There are several grammars for the same thing in Substrait subprojects.
We need to rationalize these two parsers (and any others that exist) and create a single parser in the core substrait repository.
I have no idea if they agree in behavior. I believe the java one also supports parsing to the other proto type definitions that aren't used in plans today (were intended for consumers informing producers of UDF behavior).
It's reasonably for each language binding to have their own specific implementations using a common grammar but we should avoid having distinct grammars across subprojects.