I thought it was possible to create sub-classes or alternative implementations. 
You shouldn’t need to copy a lot of code.

Can you share the code you’re trying to write?

Or maybe extend the code in 
core/src/test/java/org/apache/calcite/sql/parser/parserextensiontesting/ to 
include validator extensions as well?

> On May 8, 2017, at 9:01 PM, 黄大仙 <ha...@qq.com> wrote:
> 
> Hi everybody:
> 
> 
> I want implement some custom features which shouldn't place in calcite-core 
> ,for example, add a special TableOverOpt grammar. I must modify the following 
> files:
>  1. copy and modify core/src/main/codegen/templates/parser.jj
>  2. add my own config.fmpp
>  3. add SqlTableOverOpt.java/LogicalTableOverOpt.java to the calcite-core
>  4. modify SqlToRelConverter.java SqlValidatorImpl in the calcite-core
>  5. implement a PhysicalPlan like other adapters.
> 
> 
> I found there is a way to implement CalcitePrepareImpl to avoid modify 
> calcite-core in step 3,4. but it looks I should copy a lot of codes in 
> org.apache.calcite.jdbc.* and org.apache.calcite.prepare.*
> 
> 
> In the step 1,2 I can inject the parserFactory class in configs.
> Is there any easy way to custom SqlToRelConverter SqlValidatorImpl and other 
> calcite components?
> 
> 
> 
> Thanks in advance, hamsn

Reply via email to