[jira] [Created] (CALCITE-2651) Use scrolling by default in ElasticSearch adapter

2018-10-31 Thread Andrei Sereda (JIRA)
Andrei Sereda created CALCITE-2651: -- Summary: Use scrolling by default in ElasticSearch adapter Key: CALCITE-2651 URL: https://issues.apache.org/jira/browse/CALCITE-2651 Project: Calcite Iss

Calcite-Master - Build # 950 - Failure

2018-10-31 Thread Apache Jenkins Server
The Apache Jenkins build system has built Calcite-Master (build #950) Status: Failure Check console output at https://builds.apache.org/job/Calcite-Master/950/ to view the results.

[jira] [Created] (CALCITE-2650) Create a URL property for controlling autocommit in Avatica

2018-10-31 Thread Josh Elser (JIRA)
Josh Elser created CALCITE-2650: --- Summary: Create a URL property for controlling autocommit in Avatica Key: CALCITE-2650 URL: https://issues.apache.org/jira/browse/CALCITE-2650 Project: Calcite

Re: How to modify select identifiers

2018-10-31 Thread Julian Feinauer
Please have a look in the SqlDialect class: /** * A dialect useful for generating SQL which can be parsed by the * Calcite parser, in particular quoting literals and identifiers. If you * want a dialect that knows the full capabilities of the database, create * one from a connection.

Re: How to modify select identifiers

2018-10-31 Thread Shashwat Kumar
Hi Julian, I have been able to successfully implement your above suggestions and got properly modifed SqlNode in the end. Now I want to convert SqlNode to sqlquery which I want to pass to JDBC connection. Could you please help in that? sqlNode.toString() is not giving proper query. sqlNode.toSqlS

Re: How to modify select identifiers

2018-10-31 Thread Julian Feinauer
Hi Shashwat, the implementation to use should be SqlBasicCall. And to achieve what you want to do I would use SqlParserPos pos = yourNode.getParserPosition(); SqlNode aliased = new SqlBasicCall(SqlStdOperatorTable.AS, new SqlNode[]{yourNode, new SqlIdentifier(Collections.singletonList("v", pos),

Re: How to modify select identifiers

2018-10-31 Thread Shashwat Kumar
Hi Julian, Thank you for quick response. SqlCall is abstract class so I am not able to find which concrete subclass of it I should instantiate. Could you please give some more hint or code snippet to do it? Also how to modify the identifier name. Say I want to change value to _MAP['value'] e.g. S

Re: How to modify select identifiers

2018-10-31 Thread Julian Feinauer
Hi Shashwat, Calcite does this by a Call to the "AS" Operator (basically value as v is just syntactic sugar for AS(value, v)). So you need to create a call node (SqlCall) with the AS Operator (SqlStdOperatorTable.AS) and as operands you node and an SqlIdentifier for the Alias. But your visitor

How to modify select identifiers

2018-10-31 Thread Shashwat Kumar
I want to modify select identifiers in sql statement. For example SELECT value FROM Data to SELECT value as v FROM Data I am able to get SqlNode for select identifiers as follows. public String visit(SqlCall sqlCall) { SqlNodeList selectList = ((SqlSelect) sqlCall).getSelectList();

Re: Calcite on Traces / Industry 4.0 data

2018-10-31 Thread Julian Feinauer
Hey, thanks for your reply and your ideas and reading your answer it becomes quite clear that we have some kind of "duality" between the SQL and the "signal" world. And indeed, your approach would allow us to close the bridge in one direction (signal to SQL). For many use cases (Temperature Se

Re: Access SELECT and WHERE Clause column names in SQL Query

2018-10-31 Thread Shashwat Kumar
Thank you Michael. I tried SqlVisitor only earlier but was not able to make that work. Got it now and able to fetch required details from the query. On Tue, Oct 30, 2018 at 7:00 PM Michael Mior wrote: > What have you tried? You should be able to build a SqlParser and call the > parseQuery metho

[jira] [Created] (CALCITE-2649) Allow RelBuilder to create field references to aliased relations without knowing the size of the stack

2018-10-31 Thread Stamatis Zampetakis (JIRA)
Stamatis Zampetakis created CALCITE-2649: Summary: Allow RelBuilder to create field references to aliased relations without knowing the size of the stack Key: CALCITE-2649 URL: https://issues.apache.org/ji