[jira] [Created] (CALCITE-5464) Implement BigQuery DATE_ADD/DATE_DIFF

2022-12-28 Thread Tanner Clary (Jira)
Tanner Clary created CALCITE-5464:
-

 Summary: Implement BigQuery DATE_ADD/DATE_DIFF
 Key: CALCITE-5464
 URL: https://issues.apache.org/jira/browse/CALCITE-5464
 Project: Calcite
  Issue Type: Sub-task
Reporter: Tanner Clary


Add support for BigQuery DATE_ADD/DATE_DIFF functions. 

{{DATE_ADD(date_expression, interval)}} adds the interval to the date 
expression.
Example: {{DATE_ADD(DATE '2008-12-25', INTERVAL 3 DAY)}} would return 
'2008-12-28'.
[BigQuery 
docs|https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_add]

{{DATE_DIFF(date_expression, date_expression2, time_unit)}} returns the whole 
number of time_unit between the first and second date expressions, with the 
result being negative if the first date is earlier than the second.
Example: {{DATE_DIFF(DATE '2008-12-25', DATE '2008-12-28', DAY)}} would return 
-3.
[BigQuery 
docs|https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_diff]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [DISCUSS] Code quality/coverage with SonarCloud & JaCoCo

2022-12-28 Thread Michael Mior
Thanks Stamatis! I haven't used SonarCloud before, but in general I think
such tools can be quite useful.

--
Michael Mior
mm...@apache.org


On Sat, Dec 24, 2022 at 4:01 PM Stamatis Zampetakis 
wrote:

> Since there were no objections, I just logged INFRA-24038 [1] and plan to
> move this forward.
>
> Let me know if you have questions or concerns regarding the adoption of
> SonarCloud.
>
> Best,
> Stamatis
>
> [1] https://issues.apache.org/jira/browse/INFRA-24038
>
> On Sat, Dec 10, 2022 at 11:32 AM Benchao Li  wrote:
>
> > Thanks Stamatis for bringing this up.
> >
> > I haven't used Sonar yet, but thanks for the demo[1] you provided, it
> looks
> > really interesting. I think it's worth a try for Calcite.
> >
> > [1] https://github.com/zabetak/calcite/pull/9
> >
> > Alessandro Solimando  于2022年12月10日周六
> > 02:54写道:
> >
> > > Hi all,
> > > thanks Stamatis for the proposal and the work, I am a huge fan of Sonar
> > and
> > > I really miss it on Calcite, so a big +1 from me on this.
> > >
> > > In Hive so far we have received good feedback, so I hope it will be
> > > welcomed here too.
> > >
> > > Best regards,
> > > Alessandro
> > >
> > > On Fri, 9 Dec 2022 at 19:02, Stamatis Zampetakis 
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I just logged CALCITE-5427 [1] for introducing code quality &
> coverage
> > > > metrics in Calcite CI.
> > > >
> > > > I added some motivation and examples under the ticket so please have
> a
> > > look
> > > > and let me know what you think.
> > > >
> > > > If there are no objections, I will follow-up with INFRA to set things
> > up
> > > > for the official Calcite repo.
> > > >
> > > > The integration with SonarCloud has been inspired by HIVE-26196 [2]
> > that
> > > > Alessandro put in place for Hive and has been very helpful so far.
> > > >
> > > > Best,
> > > > Stamatis
> > > >
> > > > [1] https://issues.apache.org/jira/browse/CALCITE-5427
> > > > [2] https://issues.apache.org/jira/browse/HIVE-26196
> > > >
> > >
> >
> >
> > --
> >
> > Best,
> > Benchao Li
> >
>


[jira] [Created] (CALCITE-5463) Revert removing usage of SqlValidator.deriveAlias

2022-12-28 Thread Vova Vysotskyi (Jira)
Vova Vysotskyi created CALCITE-5463:
---

 Summary: Revert removing usage of SqlValidator.deriveAlias
 Key: CALCITE-5463
 URL: https://issues.apache.org/jira/browse/CALCITE-5463
 Project: Calcite
  Issue Type: Bug
Reporter: Vova Vysotskyi
Assignee: Vova Vysotskyi


{{{SqlValidator.deriveAlias}}} method provides the ability to customize 
deriving aliases for the expression. In one of the recent changes, the method 
calls were replaced with static methods, which makes such customizations 
impossible to use.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)