Thank you Shuyi, I will investigate these issues. 2018-05-31 17:42 GMT+03:00 Shuyi Chen <suez1...@gmail.com>:
> I think you might find some context in these 2 PRs in Flink & Calcite > respectively: > > https://issues.apache.org/jira/browse/CALCITE-1987 > https://issues.apache.org/jira/browse/FLINK-7934 > > We have different EXTRACT implementation paths in Calcite and Flink. Hope > it helps. > > On Thu, May 31, 2018 at 7:13 AM, Viktor Vlasov < > viktorvlasovsiber...@gmail.com> wrote: > > > Thank you for quick response, ok, I'll do it > > > > > > 2018-05-31 17:01 GMT+03:00 Fabian Hueske <fhue...@gmail.com>: > > > > > Hi Viktor, > > > > > > Welcome to the Flink dev mailing list! > > > You are certainly right, this is an unexpected behavior and IMO we > should > > > fix this. > > > > > > It would be great if you could open a JIRA issue for that and maybe > also > > > dig a bit into the issue to figure out why this happens. > > > > > > Thank you, > > > Fabian > > > > > > 2018-05-31 15:53 GMT+02:00 Viktor Vlasov <viktorvlasovsiberian@gmail. > com > > >: > > > > > > > Hi there! > > > > > > > > First of all I want to thank you for your time and efforts about this > > > > project. > > > > > > > > I am Software Engineer with almost 3 years experience, most of the > > time I > > > > work with Java related technologies. > > > > > > > > Recently I have started to consider possibility to contribute to > Flink. > > > > For begin I chose this issue: https://issues.apache.org/ > > > > jira/browse/FLINK-9432. > > > > > > > > After implementation I have faced with an interesting question. When > I > > > was > > > > trying to decide what tests to create for the function DECADE in > class > > > > org/apache/flink/table/expressions/validation/ > > > > ScalarFunctionsValidationTest.scala > > > > I've figured out that such functions as CENTURY and MILLENNIUM work > > with > > > > TIME type without problems. Here an examples: > > > > EXTRACT(CENTURY FROM TIME '00:00:00') - returns 0 > > > > EXTRACT(MILLENNIUM FROM TIME '00:00:00') - returns 0 > > > > > > > > It's strange by my opinion, time is not date and how we can extract > > such > > > > things from that. > > > > > > > > Meanwhile when I try to use similar logic in calcite, error is > occured. > > > > Here an example: > > > > SELECT EXTRACT(CENTURY FROM TIME '00:00:00'); > > > > throws `java.lang.AssertionError: unexpected TIME` > > > > > > > > Is it necessary to create separate issue for that? > > > > > > > > > > > > > -- > "So you have to trust that the dots will somehow connect in your future." >