Yes, more comments would be nice, especially considering this is an example.

I have rather a terse programming style. Spurious comments go out of
date. The scan method implements FilterableTable.scan so comments on
that method pertain.

On Fri, Jul 28, 2017 at 3:11 PM, Nirav Patel <[email protected]> wrote:
> I got some idea understanding basic pieces. Csv tutorial and Csv adapter
> helped a bit as well.
> https://calcite.apache.org/docs/tutorial.html
>
> However it would be nice if there was at least some code comments on
> methods explaining what it is doing. e.g. It's not easy to understand what
> scan and addFilter does here. It seems like its checking for unary and
> binary expression but wouldn't it be nice to have some comments there.
> https://github.com/apache/calcite/blob/master/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvFilterableTable.java
>
> Thanks,
> Nirav
>
> On Thu, Jul 27, 2017 at 9:22 AM, Julian Hyde <[email protected]> wrote:
>
>> Totally agree with Michael's advice to start from an existing adapter.
>>
>> There is example/csv, an example adapter intentionally kept simple.
>> But if your adapter is more complex, and involves for instance
>> generating a query for a back-end DB, then use a more complex adapter
>> as your template.
>>
>> Did you look in https://calcite.apache.org/docs/adapter.html? I know
>> it feels that we are woefully lacking in documentation, but people
>> don't read the documentation we have, there's not much incentive to
>> write more.
>>
>> There's also https://www.slideshare.net/julianhyde/a-smarter-pig-
>> building-a-sql-interface-to-apache-pig-using-apache-calcite.
>>
>> On Thu, Jul 27, 2017 at 8:55 AM, Michael Mior <[email protected]> wrote:
>> > That's still basically correct. You may find it easiest to model things
>> > after one of the existing adapters. When I was writing the Cassandra
>> > adapter, I found the MongoDB adapter to be helpful. It is also a question
>> > of what the data source you're hoping to add looks like. You'll probably
>> > have the most success starting with a similar adapter.
>> >
>> > --
>> > Michael Mior
>> > [email protected]
>> >
>> > 2017-07-26 20:16 GMT-04:00 Nirav Patel <[email protected]>:
>> >
>> >> https://datapsyche.wordpress.com/2014/07/18/sql-over-
>> >> anything-with-an-optiq-adaptor/
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On Wed, Jul 26, 2017 at 5:13 PM, Julian Hyde <[email protected]> wrote:
>> >>
>> >> > Where did you look? What did you find?
>> >> >
>> >> > > On Jul 26, 2017, at 5:06 PM, Nirav Patel <[email protected]>
>> >> wrote:
>> >> > >
>> >> > > Hi,
>> >> > >
>> >> > > Is there any guide/tutorial on how to write adapter for new
>> datasource?
>> >> > >
>> >> > > Thanks
>> >> > >
>> >> > > --
>> >> > >
>> >> > >
>> >> > > [image: What's New with Xactly] <http://www.xactlycorp.com/
>> >> email-click/>
>> >> > >
>> >> > > <https://www.nyse.com/quote/XNYS:XTLY>  [image: LinkedIn]
>> >> > > <https://www.linkedin.com/company/xactly-corporation>  [image:
>> >> Twitter]
>> >> > > <https://twitter.com/Xactly>  [image: Facebook]
>> >> > > <https://www.facebook.com/XactlyCorp>  [image: YouTube]
>> >> > > <http://www.youtube.com/xactlycorporation>
>> >> >
>> >> >
>> >>
>> >> --
>> >>
>> >>
>> >> [image: What's New with Xactly] <http://www.xactlycorp.com/email-click/
>> >
>> >>
>> >> <https://www.nyse.com/quote/XNYS:XTLY>  [image: LinkedIn]
>> >> <https://www.linkedin.com/company/xactly-corporation>  [image: Twitter]
>> >> <https://twitter.com/Xactly>  [image: Facebook]
>> >> <https://www.facebook.com/XactlyCorp>  [image: YouTube]
>> >> <http://www.youtube.com/xactlycorporation>
>> >>
>>
>
> --
>
>
> [image: What's New with Xactly] <http://www.xactlycorp.com/email-click/>
>
> <https://www.nyse.com/quote/XNYS:XTLY>  [image: LinkedIn]
> <https://www.linkedin.com/company/xactly-corporation>  [image: Twitter]
> <https://twitter.com/Xactly>  [image: Facebook]
> <https://www.facebook.com/XactlyCorp>  [image: YouTube]
> <http://www.youtube.com/xactlycorporation>

Reply via email to