Hi, Trafodion developers,
I am trying to figure out the code path of building the default value of column
definition.
In the parser yacc file, the default value is treated as type
ElemDDLColDefault, for example:
| builtin_function_user
{
$$ = new (PARSERHEAP())
ElemDDLColDefault(
ElemDDLColDefault::COL_DEFAULT,
$1 /*builtin_function_user*/);
}
And later in the code CmpSeabaseDDL::buildColInfoArray, it all uses
ElemDDLColDef for a given column. I cannot find where the population of
ElemDDLColDef is done.
I need to transfer some information from parser to later phases for semantic
checking. Reading the code for a while, but no good progress, anyone know this
will help me a lot.
I modified the ElemDDLColDefault with an error code which can easily detected
at parse time. Later, in semantic checking can properly report this error,
since in the parser production, it is very hard to know the column name, have
to postpone the error report in later phases. But DDL is not DML, there is no
clear Bind phase, so I am lost here.
Thanks,
Ming