Can't find java file for ImmutableCsvProjectTableScanRule

2022-03-13 Thread xiaobo
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. */   @Value.Immutable(singleton = false)   public interface Config extends RelRule.Config {

Re: Can't find java file for ImmutableCsvProjectTableScanRule

2022-03-13 Thread Fan Liya
Hi xiaobo, It seems 'ImmutableCsvProjectTableScanRule' is a generated class. You have to build the project first? Best, Liya Fan xiaobo 于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 ImmutableCsvProjectTableScanRu

column data type mismatch problem when projecting tables

2022-03-13 Thread xiaobo
Hi, Followed the avro example at https://github.com/masayuki038/calcite-avro-sample, we make a projectable version of our JsonAdapter at https://github.com/guxiaobo/calcite-json-adapter, but the simple test2 method at https://github.com/guxiaobo/calcite-json-adapter/blob/main/src/test/jav

Re:column data type mismatch problem when projecting tables

2022-03-13 Thread xiaobo
if we change the sql to  "select c1, c2 from js.t1", then test2 passes,  and we found that the deduce method CursorFactory returns OBJECT when the resultset has only one column, public static CursorFactory deduce(Listhttps://github.com/masayuki038/calcite-avro-sample, we make a projectable ve

Re: Can't find java file for ImmutableCsvProjectTableScanRule

2022-03-13 Thread Gavin Ray
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

Re:Re:column data type mismatch problem when projecting tables

2022-03-13 Thread xiaobo
we updated our enumerator to return only the column data object for single column projects, our projectable adapter works for basic queries now, but faced with new problems which I'll send another mail. Original From:"xiaobo "< guxiaobo1...@qq.com >; Date:2022/3/13 21:59 To:"dev

applying the wrong rule for calculated columns

2022-03-13 Thread xiaobo
@Test public void test1_2()throws SQLException{ Map

re:applying the wrong rule for calculated columns

2022-03-13 Thread xiaobo
our runnable test is at https://github.com/guxiaobo/calcite-json-adapter/blob/main/src/test/java/org/apache/calcite/adapter/json/test/JsonSchemaTest.java -- original mail -- @Test public void test1_2()throws SQLException{ Map> m

re:applying the wrong rule for calculated columns

2022-03-13 Thread xiaobo
after we change the String[] fields to Integer[] fields , the problem still occurs. our runnable test is at https://github.com/guxiaobo/calcite-json-adapter/blob/main/src/test/java/org/apache/calcite/adapter/json/test/JsonSchemaTest.java --- @Test public void t

Re:re:applying the wrong rule for calculated columns

2022-03-13 Thread xiaobo
@Override   public void onMatch(RelOptRuleCall call) {     LogicalProject project = call.rel(0);     JsonTableScan scan = call.rel(1);     Integer[] fields = getProjectFields(project.getProjects());     if(fields == null || fields.length == 0)

[jira] [Created] (CALCITE-5039) View:Timestamp cannot query Data:Long in GMT+8 TimeZone Env

2022-03-13 Thread itxiangkui (Jira)
itxiangkui created CALCITE-5039: --- Summary: View:Timestamp cannot query Data:Long in GMT+8 TimeZone Env Key: CALCITE-5039 URL: https://issues.apache.org/jira/browse/CALCITE-5039 Project: Calcite