a step further!

Although, not documented
​it
 appears that the streamable table must implement the getStatistics()
method even if it returns empty sets. Otherwise the
​m​
onotonicity
​ computation in
ItentifierNamespace#getMonotonicity
​ ​
will always return
​ ​
SqlMonotonicity.NOT_MONOTONIC
​ causing the previous error.

Now i'm facing another issue "java.lang.ClassCastException:
java.lang.String cannot be cast to java.lang.Double"
​, that appears to be
 related to
​ the​
"GROUP BY FLOOR(\"rowtime\" TO HOUR)
​ expression.

I will continue exploring but please share if there are some other
(undocumented) insides i need to set.

Thanks,
Christian

​

On 3 December 2017 at 23:04, Christian Tzolov <[email protected]> wrote:

>
> I have implemented a StreamingTable with monotonic
> ​ ​
> rowtime
> ​ ​
> column:
>
> 1: jdbc:calcite:model=/Users/ctzolov/Dev/proj> !columns "BookMaster
> ​"​
>
> +-----------+-------------+------------+-------------+------
> -----+-----------+-+
> | TABLE_CAT | TABLE_SCHEM | TABLE_NAME | COLUMN_NAME | DATA_TYPE |
> TYPE_NAME | |
> +-----------+-------------+------------+-------------+------
> -----+-----------+-+
> *|           | bookshopstream | BookMaster | rowtime     | 93        |
> TIMESTAM |*
> |           | bookshopstream | BookMaster | itemNumber  | 4         |
> JavaType |
> |           | bookshopstream | BookMaster | description | 12        |
> JavaType |
> |           | bookshopstream | BookMaster | retailCost  | 8         |
> JavaType |
> |           | bookshopstream | BookMaster | yearPublished | 4         |
> JavaTy |
> |           | bookshopstream | BookMaster | author      | 12        |
> JavaType |
> |           | bookshopstream | BookMaster | title       | 12        |
> JavaType |
> +-----------+-------------+------------+-------------+------
> -----+-----------+-+
>
> But when i try
> ​a ​
> streaming query like this:
>
> SELECT STREAM
>   FLOOR("rowtime" TO HOUR) AS "rowtime",
>   SUM("retailCost") AS "retailCost"
> FROM "BookMaster"
> GROUP BY FLOOR("rowtime" TO HOUR)
>
> It
> ​ complains of a missing monotonic expression: ​
>
>
> From line 5, column 1 to line 5, column 33: Streaming aggregation requires
> at least one monotonic expression in GROUP BY clause (state=,code=0)
>
> ​What is missing? ​
>
> ​Thanks​
>
> --
> Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software
> Engineer | Spring <https://spring.io/>.io | Pivotal <http://pivotal.io/>
> | [email protected]
>



-- 
Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software
Engineer | Spring <https://spring.io/>.io | Pivotal <http://pivotal.io/> |
[email protected]

Reply via email to