Raghav,

Thanks for considering making a contribution. We should be able to resolve most 
questions on this list (if you haven’t already, please subscribe, so that your 
emails don’t need to go through moderation).

Yes, we require a JIRA case for contributions except for cosmetic changes (e.g. 
fixing typos). Create a PR and reference it in the JIRA case.

By a ‘dialect’, I assume you mean a plugin so that Calcite’s JDBC adapter can 
generate SQL that Firebolt is able to parse. If so, the best path is to follow 
the template for other recently added dialects, e.g. Exasol [1], Clickhouse 
[2]. Take a look at the JIRA case and also the files changed in the attached PR.

You should add test cases to RelToSqlConverterTest for any area of syntax where 
Firebolt’s SQL differs significantly from existing dialects. But for most 
dialects there aren’t many of those areas.

We don’t require that the tests run against a live instance of Firebolt. It 
would be a good idea for you to try to run Calcite’s test suite against 
Firebolt. I would add a value “FIREBOLT” to TEST_DB in 
CalciteSystemProperty.java, run something like ‘./gradlew 
-Dcalcite.test.db=FIREBOLT test’, and then fix whatever is broken.

Julian

[1] https://issues.apache.org/jira/browse/CALCITE-4614 
<https://issues.apache.org/jira/browse/CALCITE-4614> 

[2]  https://issues.apache.org/jira/browse/CALCITE-2157 
<https://issues.apache.org/jira/browse/CALCITE-2157> 

> On Mar 24, 2022, at 3:17 AM, Raghav Sharma <ragh...@sigmoidanalytics.com> 
> wrote:
> 
> Greetings from Sigmoid and Firebolt!
> 
> 
> This mail is in reference towards contributing a custom sql dialect to
> Calcite.
> 
> 
> PFB some queries that we have regarding testing the dialect and further for
> contributing:
> 
> 
> 1. We have developed a SQL dialect for Firebolt. Need to test it against
> the database using calcite. How can we do so? Is this something that can be
> pulled off using the JDBC driver(if so, how?) or is there another way?
> 
> 
> 2. There are some test files that contain tests for specific dialects.
> Before contributing, should we alter those for Firebolt(if required) or is
> it something that will be taken care of by the Calcite team?
> 
> 
> 3. Is opening a JIRA case mandatory? Can we raise a PR directly to add
> Firebolt to the master branch of Calcite? Please guide us if there’s an
> alternate option.
> 
> 
> We are willing to connect over a call as well if that works for you.
> 
> 
> 
> Thanks & Regards,
> Raghav Sharma | SDE 1 | Data Engineering
> M: +91 7087637086 I Mail: ragh...@sigmoidanalytics.com
> <https://www.sigmoid.com/>
> 
> -- 
> 
> 

Reply via email to