Hi, All: I'm new to calcite, have some doubts about the SqlNode design:
I'm working on a mysql middleware which needs parsing and query optimization. Unfortunately, I'm using C++, so it's not trivial to use Calcite directly. Instead, I'm trying to mimic what Calcite does to see if I can come up with an MVP. Right now, I got the CST from Antlr4, and I'm about to visit the CST to generate AST. When I look at SqlNode in Calcite, I found that a common segment like table from select statement is also the type of SqlNode. In other implementations, it's normally the concrete type like `TableSegment`. I was wondering what's the purpose behind the structure design? Thanks in advance.