[jira] [Created] (CALCITE-5364) In materialized view substitution, use custom time frames

2022-11-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5364:


 Summary: In materialized view substitution, use custom time frames
 Key: CALCITE-5364
 URL: https://issues.apache.org/jira/browse/CALCITE-5364
 Project: Calcite
  Issue Type: Bug
Reporter: Julian Hyde


Custom time frames were added in CALCITE-5155, and part of the definition of a 
custom time frame is the time frames it rolls up to. Materialized view 
substitution should use this information, so that you can create materialized 
views on custom time frames such as '15 minutes' or '21 days' and have them 
roll up.

Also you should be able to use materialized views (on custom and regular time 
frames) to answer queries with custom time frames (e.g. {{FLOOR(orderDate TO 
month6)}}).



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


[jira] [Created] (CALCITE-5363) Move DATEADD, DATEDIFF, DATE_PART from Babel to Core parser

2022-11-02 Thread Julian Hyde (Jira)
Julian Hyde created CALCITE-5363:


 Summary: Move DATEADD, DATEDIFF, DATE_PART from Babel to Core 
parser
 Key: CALCITE-5363
 URL: https://issues.apache.org/jira/browse/CALCITE-5363
 Project: Calcite
  Issue Type: Bug
Reporter: Julian Hyde


Move the DATEADD, DATEDIFF, DATE_PART functions (maybe also DATEPART) from 
Babel to Core parser. They require special parsing (maybe not quite as special, 
following CALCITE-5155) but it would be nice if they could be enabled just by 
setting 'lib=postgres' without switching parser.



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


[jira] [Created] (CALCITE-5362) Implement geometry measurement functions

2022-11-02 Thread Bertil Chapuis (Jira)
Bertil Chapuis created CALCITE-5362:
---

 Summary: Implement geometry measurement functions
 Key: CALCITE-5362
 URL: https://issues.apache.org/jira/browse/CALCITE-5362
 Project: Calcite
  Issue Type: New Feature
  Components: core
Reporter: Bertil Chapuis
Assignee: Bertil Chapuis


The following spatial measurement functions are yet to be implemented:
 * ST_Area
 * ST_ClosestCoordinate
 * ST_ClosestPoint
 * ST_FurthestCoordinate
 * ST_Length
 * ST_LocateAlong
 * ST_LongestLine
 * ST_MaxDistance
 * ST_Perimeter
 * ST_ProjectPoint



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


Custom time frames

2022-11-02 Thread Julian Hyde
I just pushed a draft PR for custom time frames [1] [2]. Can one or
two people review?

Julian

[1] https://github.com/apache/calcite/pull/2960
[2] https://issues.apache.org/jira/browse/CALCITE-5155


[jira] [Created] (CALCITE-5361) Update janino version to 3.1.9

2022-11-02 Thread Sergey Nuyanzin (Jira)
Sergey Nuyanzin created CALCITE-5361:


 Summary: Update janino version to 3.1.9
 Key: CALCITE-5361
 URL: https://issues.apache.org/jira/browse/CALCITE-5361
 Project: Calcite
  Issue Type: Improvement
Reporter: Sergey Nuyanzin


This is a follow up task to update janino
it is not released yet.
while upgrade of Calcite to 1.28 for Flink 
(https://issues.apache.org/jira/browse/FLINK-21239) I faced a number of issues 
in janino
https://github.com/janino-compiler/janino/issues/185
https://github.com/janino-compiler/janino/issues/186
https://github.com/janino-compiler/janino/issues/187
https://github.com/janino-compiler/janino/issues/188
would be great to update janino once the fix version will be released





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


Returning the Intermediate Representation of the rewrite rules

2022-11-02 Thread G.O. Barbulescu
Dear Apache Calcite development team,

I am currently working on a research project in which I am considering Apache 
Calcite for the parsing stage. I was wondering if there exists an API to return 
the intermediate representation (relational tree) for the pre-defined SQL 
rewrite rules?
For instance, a relational tree for push-filter-though-join rule in format (LHS 
relational tree => RHS relational tree).
The motivation behind this is to have a set of rewrite rules in the same format 
(IR) as the output of opTree.explain() to build new optimizers.

Thanks for your time.

Many thanks,
George Barbulescu