If you change

>  AS "rowtime”,

to

> AS "rowtime2",

is the behavior any different? I am concerned that the “rowtime” column is 
visible in the GROUP BY clause. (It shouldn’t be, but bugs happen.)


> On Dec 3, 2017, at 3:04 PM, 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]

Reply via email to