Thanks Julian, this could have been the problem.
I have another question? How the streaming (e.g. continuous query) is
supposed to be consumed? Given that the enumerator never ends unless
canceled?
For example I am running the following query through sqllite:
SELECT STREAM
FLOOR("rowtime" TO SECOND) AS "rowtime2",
"itemNumber",
SUM("retailCost") AS "retailCost2"
FROM "BookMaster"
GROUP BY FLOOR("rowtime" TO SECOND), "itemNumber";
It doesn't emit any errors but doesn't compute/show any results either? (i
am emitting new data in the mean time)
On 4 December 2017 at 05:05, Julian Hyde <[email protected]> wrote:
> 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]
>
>
--
Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software
Engineer | Spring <https://spring.io/>.io | Pivotal <http://pivotal.io/> |
[email protected]