[jira] [Created] (CALCITE-1387) CAST(ITEM() as INTEGER) throws RuntimeException in Runtime when return value of ITEM() is null

2016-09-26 Thread Jungtaek Lim (JIRA)
Jungtaek Lim created CALCITE-1387: - Summary: CAST(ITEM() as INTEGER) throws RuntimeException in Runtime when return value of ITEM() is null Key: CALCITE-1387 URL: https://issues.apache.org/jira/browse/CALCITE-1387

[jira] [Created] (CALCITE-1386) ITEM operator seems to ignore the value type of collection and assign the value to Object

2016-09-26 Thread Jungtaek Lim (JIRA)
Jungtaek Lim created CALCITE-1386: - Summary: ITEM operator seems to ignore the value type of collection and assign the value to Object Key: CALCITE-1386 URL: https://issues.apache.org/jira/browse/CALCITE-1386

Re: Strange behavior on MAP and ARRAY type

2016-09-26 Thread Julian Hyde
Regarding 1 and 2: these sound like bugs. Can you please log a JIRA case for each? If you can supply a test case, even better. Regarding 3. I checked the SQL standard, and the required behavior is to throw an exception. (Maybe ArrayIndexOutOfBoundsException isn’t the best exception to throw.)

Re: New type of window semantics

2016-09-26 Thread Julian Hyde
Have you considered the sliding window, which is already part of standard SQL? We propose to support it in streaming SQL also. Here is an example: SELECT orderId, price, AVG(price) OVER (ORDER BY orderTime ROWS 5 PRECEDING) FROM Orders (This is a non-streaming query, but you can add the STR

Re: Using Metadata in Query Optimization

2016-09-26 Thread jordan.halter...@gmail.com
I think you should just be able to override getStatistic() in your table implementations and return a Statistic object that has an accurate row count. The table scan should compute its cost from that, and uses 100d as a default IIRC. > On Sep 25, 2016, at 1:56 PM, Γιώργος Θεοδωράκης > wrote:

New type of window semantics

2016-09-26 Thread Radu Tudoran
Hi, First of all let me introduce myself - My name is Radu Tudoran and I am working in the field of Big Data processing with a high focus on streaming and more recently in the area of SQL. I wanted to raise a question/proposal for discussion in the community: Based on our requirements I reali