You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by xiaobo <gu...@qq.com.INVALID> on 2022/03/13 10:47:22 UTC

Can't find java file for ImmutableCsvProjectTableScanRule

Hi,

we are trying to make our adapter projectable now,  but we can't find the Java file for the ImmutableCsvProjectTableScanRule class in the CSV example, can you help with this.


/** Rule configuration. */
&nbsp; @Value.Immutable(singleton = false)
&nbsp; public interface Config extends RelRule.Config {
&nbsp;&nbsp;&nbsp; Config DEFAULT = ImmutableCsvProjectTableScanRule.Config.builder()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .withOperandSupplier(b0 -&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b0.operand(LogicalProject.class).oneInput(b1 -&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b1.operand(CsvTableScan.class).noInputs()))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .build();

&nbsp;&nbsp;&nbsp; @Override default CsvProjectTableScanRule toRule() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new CsvProjectTableScanRule(this);
&nbsp;&nbsp;&nbsp; }
&nbsp; }

Re: Can't find java file for ImmutableCsvProjectTableScanRule

Posted by Gavin Ray <ra...@gmail.com>.
I believe you need to make sure that the "Immutables" annotations processor
is set up correctly
Like Fan Liya mentioned, that class is generated by the annotations, so you
need to configure Gradle/Maven to process them:

If you haven't already, make sure to enable Annotation Processors in your
IDE settings (I assume IntelliJ?)
https://immutables.github.io/apt.html#intellij-idea

Hope this helps

On Sun, Mar 13, 2022 at 6:24 AM Fan Liya <li...@gmail.com> wrote:

> Hi xiaobo,
>
> It seems 'ImmutableCsvProjectTableScanRule' is a generated class.
> You have to build the project first?
>
> Best,
> Liya Fan
>
>
> xiaobo <gu...@qq.com.invalid> 于2022年3月13日周日 18:47写道:
>
> > Hi,
> >
> > we are trying to make our adapter projectable now,  but we can't find the
> > Java file for the ImmutableCsvProjectTableScanRule class in the CSV
> > example, can you help with this.
> >
> >
> > /** Rule configuration. */
> > &nbsp; @Value.Immutable(singleton = false)
> > &nbsp; public interface Config extends RelRule.Config {
> > &nbsp;&nbsp;&nbsp; Config DEFAULT =
> > ImmutableCsvProjectTableScanRule.Config.builder()
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .withOperandSupplier(b0 -&gt;
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > b0.operand(LogicalProject.class).oneInput(b1 -&gt;
> >
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> > b1.operand(CsvTableScan.class).noInputs()))
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .build();
> >
> > &nbsp;&nbsp;&nbsp; @Override default CsvProjectTableScanRule toRule() {
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new CsvProjectTableScanRule(this);
> > &nbsp;&nbsp;&nbsp; }
> > &nbsp; }
>

Re: Can't find java file for ImmutableCsvProjectTableScanRule

Posted by Fan Liya <li...@gmail.com>.
Hi xiaobo,

It seems 'ImmutableCsvProjectTableScanRule' is a generated class.
You have to build the project first?

Best,
Liya Fan


xiaobo <gu...@qq.com.invalid> 于2022年3月13日周日 18:47写道:

> Hi,
>
> we are trying to make our adapter projectable now,  but we can't find the
> Java file for the ImmutableCsvProjectTableScanRule class in the CSV
> example, can you help with this.
>
>
> /** Rule configuration. */
> &nbsp; @Value.Immutable(singleton = false)
> &nbsp; public interface Config extends RelRule.Config {
> &nbsp;&nbsp;&nbsp; Config DEFAULT =
> ImmutableCsvProjectTableScanRule.Config.builder()
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .withOperandSupplier(b0 -&gt;
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> b0.operand(LogicalProject.class).oneInput(b1 -&gt;
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> b1.operand(CsvTableScan.class).noInputs()))
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .build();
>
> &nbsp;&nbsp;&nbsp; @Override default CsvProjectTableScanRule toRule() {
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return new CsvProjectTableScanRule(this);
> &nbsp;&nbsp;&nbsp; }
> &nbsp; }