Help needed with a bug

2018-11-16 Thread ptr.bo...@gmail.com
Hello Calcite team, Anyone willing to help with a patch for https://issues.apache.org/jira/browse/CALCITE-2667 ? I need some hint to go through SqlToRelConverter to patch the bug. It seems that for some cases following query does not work: SELECT * FROM TABLE(FUNCTIONTABLE(...)) FT JOIN SOMEVIE

Re: Pull requests to review

2018-11-06 Thread ptr.bo...@gmail.com
Vladimir, could you elaborate more on this? Should such mentioned rule convert the RexLiterals with TimestampString value to Long with the time zone from data context? Are you sure that such rule wouldbe triggered before the logic SqlUserDefinedTableMacro.coerce(SqlUserDefinedTableMacro.java:190)

Re: Pull requests to review

2018-11-06 Thread ptr.bo...@gmail.com
’m not sure where that should come from in your code. > > Julian > > > > On Nov 5, 2018, at 1:19 PM, ptr.bo...@gmail.com wrote: > > > > Julian, so.. is it correct to translate TimestampString to > > java.sql.Timestamp on RexToLixTranslator.convert(...) level as

Re: Pull requests to review

2018-11-05 Thread ptr.bo...@gmail.com
t; > > On Nov 5, 2018, at 5:49 AM, ptr.bo...@gmail.com wrote: > > > > Vladimir, > > > > I thought that TimestampString IS the appropriate type :D (knowledge > based > > on Rexbuilder code, where TimestampString is being created as > RexLiteral). &g

Re: Pull requests to review

2018-11-05 Thread ptr.bo...@gmail.com
Vladimir, I thought that TimestampString IS the appropriate type :D (knowledge based on Rexbuilder code, where TimestampString is being created as RexLiteral). My problem is that I don't see what is the scope of TimestampString, DateString, etc in Calcite. Does it span to Rel/Rex tree? Or it shou

Pull requests to review

2018-11-05 Thread ptr.bo...@gmail.com
Hello, Anyone willing to review my pull requests? https://github.com/apache/calcite/pull/878 - this is already patched after reviews. It fixes CALCITE-2609. https://github.com/apache/calcite/pull/878 https://github.com/apache/calcite/pull/900 Those pulls are alternative fixes to CALCITE-2641 . S

Re: Timestamp as a parameter of UDF

2018-10-29 Thread ptr.bo...@gmail.com
s to write a test in > TableFunctionTest. > > Julian > > > > > On Oct 25, 2018, at 5:32 AM, ptr.bo...@gmail.com wrote: > > > > Will try, thanks. > > > > On Thu, Oct 25, 2018 at 2:16 PM Vladimir Sitnikov < > > sitnikov.vladi...@gmail.com>

Re: Provide model.json file from Resources in Jar

2018-10-26 Thread ptr.bo...@gmail.com
Hello, use: connection = DriverManager.getConnection("jdbc:calcite:",getProperties()); in method getPropertied provide: property *user* and *password* property *inline* with your schema loaded from resource as a string. Regards On Fri, Oct 26, 2018 at 1:46 PM Shashwat Kumar wrote: > Hi, > > I

Re: Timestamp as a parameter of UDF

2018-10-25 Thread ptr.bo...@gmail.com
Will try, thanks. On Thu, Oct 25, 2018 at 2:16 PM Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > Then it might be a bug > in org/apache/calcite/linq4j/tree/OptimizeShuttle.java:277 > Have you tried to comment that branch out for test purposes? > > Vladimir > -- Piotr Bojko http://ab

Re: Timestamp as a parameter of UDF

2018-10-25 Thread ptr.bo...@gmail.com
Vladimir, TimestampString with toString = 2013-01-01 01:01:01 On Thu, Oct 25, 2018 at 1:58 PM Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > Piotr>I've got following exception and wondering whether I am missing > something > > It sounds like a bug. > > Piotr>value 2013-01-0101:01:01 d

Timestamp as a parameter of UDF

2018-10-25 Thread ptr.bo...@gmail.com
Hello, I am trying to create UDF with java.sql.Timestamp as a parameter: public static QueryableTable getTable( @Parameter(name = "Projection") String projection, @Parameter(name = "Query") String query, @Parameter(name = "Test Timestamp") Timestamp timestamp) But when using following UDF like t

Re: ViewTableMacro and empty parameteters

2018-10-23 Thread ptr.bo...@gmail.com
ybe we need a SQL equivalent of quasi-quote?! [1] > > > > Julian > > > > [1] > > > https://courses.cs.washington.edu/courses/cse341/04wi/lectures/14-scheme-quote.html > > < > > > https://courses.cs.washington.edu/courses/cse341/04wi/lectures/14-

ViewTableMacro and empty parameteters

2018-10-22 Thread ptr.bo...@gmail.com
Hello dear Calcite team :) I have one design question on ViewTableMacro: Why does it not implement parameters? I was thinking about dynamic parameters "?" here. For example, following view with dynamic parameters some_view: SELECT * FROM some_table WHERE id > ? AND LIMIT ? could handle two param

Unimplemented CalcitePrepareImpl.getClassName

2018-10-08 Thread ptr.bo...@gmail.com
Hello, Does anybody know why method org.apache.calcite.prepare.CalcitePrepareImpl.getClassName is not implemented? This is an issue of a bug: https://issues.apache.org/jira/browse/CALCITE-2613?focusedCommentId=16641567&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#commen

Re: Avatica or Calcite or mine fault?

2018-10-05 Thread ptr.bo...@gmail.com
be a starting point, too). > > Feel free to ping me on Jira. Thanks Piotr! > > On 10/4/18 9:08 AM, ptr.bo...@gmail.com wrote: > > I've logged a JIRA for the first bug, with a fix proposal - > > https://issues.apache.org/jira/browse/CALCITE-2609. > > > > But the

Re: Avatica or Calcite or mine fault?

2018-10-04 Thread ptr.bo...@gmail.com
I've logged a JIRA for the first bug, with a fix proposal - https://issues.apache.org/jira/browse/CALCITE-2609. But the case with AvaticaParameter NPE still remains unclear for me - in terms of design. Help needed :) On Wed, Oct 3, 2018 at 4:14 PM ptr.bo...@gmail.com wrote: > As for t

Re: Avatica or Calcite or mine fault?

2018-10-03 Thread ptr.bo...@gmail.com
caParameter that > you don't provide null arguments, but that could be argued in either > direction (e.g. you should not provide null arguments in the first place). > > On 10/2/18 5:11 PM, ptr.bo...@gmail.com wrote: > > Hello, > > > > It seems that my case consists of

Re: Avatica or Calcite or mine fault?

2018-10-02 Thread ptr.bo...@gmail.com
e: > Hey Piotr, > > Thanks for reporting this! I am not familiar with Avatica's internals, > so can't recommend how this can be fixed. However, I would suggest > writing a test case to reproduce the problem in the meantime. > > Francis > > On 1/10/2018 8:59 PM, ptr

Avatica or Calcite or mine fault?

2018-10-01 Thread ptr.bo...@gmail.com
Hello fellow calcite dev team :) I have discovered the case with NPE when trying to use parameters on prepared statement: java.lang.NullPointerException at org.apache.calcite.avatica.proto.Common$AvaticaParameter$Builder.setClassName(Common.java:9040) at org.apache.calcite.avatica.AvaticaParameter

Fix for CALCITE-2446 for review

2018-08-07 Thread ptr.bo...@gmail.com
Hello, I have a pull for review - https://github.com/apache/calcite/pull/780 It fixes the bug https://issues.apache.org/jira/browse/CALCITE-2446 This change removes validation/rewriting step from view expansion so it would be great if the change would be reviewed by someone who knows the mechanis

Re: problem with lateral join

2018-08-03 Thread ptr.bo...@gmail.com
eate a test case in ServerTest (since I presume that > it needs CREATE VIEW followed by a query). > > Julian > > > > On Aug 2, 2018, at 4:50 AM, ptr.bo...@gmail.com wrote: > > > > Hello, > > > > I struggling with a strange case. Following query works for me:

problem with lateral join

2018-08-02 Thread ptr.bo...@gmail.com
Hello, I struggling with a strange case. Following query works for me: SELECT * FROM CORE.FILTERS F CROSS JOIN LATERAL TABLE(AUX.TBLFUNCTION('somestring, F.aCOLLUMN)) tblfn But when it is placed as a view under a schema EXAMPLES with name EXAMPLECOLLATERAL, following query won't work SELECT * FRO

Re: [jira] [Created] (CALCITE-2420) Aggregate functions MIN/MAX does not work for Timestamp

2018-07-18 Thread ptr.bo...@gmail.com
Hello, I've just found a bug. I've placed a test case for it here - https://issues.apache.org/jira/browse/CALCITE-2420 It seems that MIN/MAX aggregate functions does not support Timestamp properly and RexImpTable.MinMaxImplementor.implementNotNullAdd creates an implementation in which argument is

Needs Review - CALCITE-2320

2018-05-22 Thread ptr.bo...@gmail.com
Hello, Please review a bug fix: Issue - https://issues.apache.org/jira/browse/CALCITE-2320 Pull - https://github.com/apache/calcite/pull/693 Thank you. -- Piotr Bojko http://about.me/ptr.bojko

Re: Reviewers

2018-05-21 Thread ptr.bo...@gmail.com
Hello, I've just fired at you Julian a pull request, just like you said. Sorry for that. Currently, each bug at JIRA is assigned to you automatically - this can be misleading, when someone is logging a bug and deliver a fix just after. This is my case. Maybe it would be better to leave a JIRA iss

Re: Setting up Calcite development with Eclipse

2018-02-08 Thread ptr.bo...@gmail.com
First thing first - install maven as an external tool. Then point your Eclipse to use it.Just as the your looking results suggest :) My personal opinion about the case is that this is not the problem of setting up calcite with any IDE to have working build/run/debug/test commands but rather effect

state of jdbc implementation

2018-01-11 Thread ptr.bo...@gmail.com
Hey folks, Reading the site I've the note that pushing as much of query computation to the database under the jdbc is planned. I have not found anything more at the code level or the site. Did someone try to make this happen? I would like to know whether some stoppers occurred or simply this

Re: end2end tests

2017-12-08 Thread ptr.bo...@gmail.com
t mind extra > dependencies, and don’t mind if the test suite takes a long time. > > Julian > > > > On Dec 2, 2017, at 3:40 PM, ptr.bo...@gmail.com wrote: > > > > Hello fellow calcite dev team, > > > > I am building a database with use of calcite fr

end2end tests

2017-12-02 Thread ptr.bo...@gmail.com
Hello fellow calcite dev team, I am building a database with use of calcite framework and decided that instead of simple unit tests I will go only with integration tests. This is due the fact that my code only glues the calcite with data and configures the whole thing decorating with web api and j

Hide subschema in calcite

2017-11-13 Thread ptr.bo...@gmail.com
Hello, I have another question about using and/or enhancing calcite. I would like to hide a specific sub-schema from schemas defined in JSON for Calcite. Only views from another sub-schema onto this hidden one would be available. Is there any way to achieve this? If not - where such configuratio

Re: Problems with exposing calcite through avatica and custom servlet

2017-11-02 Thread ptr.bo...@gmail.com
27;ve managed to connect with squirrel. Wow :) Again - thank you for calcite P On Thu, Nov 2, 2017 at 2:32 PM ptr.bo...@gmail.com wrote: > Hello Julian, > > I am pretty sure that this is not an container issue, ie classloader etc. > Error stack is eated by avatica AbstractHandler imp

Re: Problems with exposing calcite through avatica and custom servlet

2017-11-02 Thread ptr.bo...@gmail.com
l to you (though not that simple - I recall that > Avatica has tests that use jetty). A next step for you might be to start > with one of these simple environments and add complexity until something > breaks; then you’ll know where the conflict is coming from. > > Julian > > >

Problems with exposing calcite through avatica and custom servlet

2017-10-31 Thread ptr.bo...@gmail.com
Hello, My task is to expose calcite-made schema through avatica. I've encountered some stopper here. Some details I've placed at stackoverflow - but no help there. https://stackoverflow.com/questions/46792353/expose-calcite-based-db-through-avatica-by-custom-servlet Could you, please, make some