Add "Streaming SQL" talk
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/d42581d9 Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/d42581d9 Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/d42581d9 Branch: refs/heads/master Commit: d42581d9a56dba377fac5d827c03b5aa12a648b7 Parents: 9188736 Author: Julian Hyde <[email protected]> Authored: Thu Feb 18 17:43:21 2016 -0800 Committer: Julian Hyde <[email protected]> Committed: Fri Feb 19 14:28:08 2016 -0800 ---------------------------------------------------------------------- site/_docs/stream.md | 13 ++++++-- site/_posts/2016-02-17-streaming-sql-talk.md | 40 +++++++++++++++++++++++ site/community/index.md | 8 +++++ 3 files changed, 59 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite/blob/d42581d9/site/_docs/stream.md ---------------------------------------------------------------------- diff --git a/site/_docs/stream.md b/site/_docs/stream.md index 395447b..c43d89f 100644 --- a/site/_docs/stream.md +++ b/site/_docs/stream.md @@ -205,7 +205,15 @@ at or after 11:00:00, it will never see a row that will contribute to a 10:00:00 total. A column or expression that is increasing or decreasing is said to be -*monotonic*. Without a monotonic expression in the `GROUP BY` clause, Calcite is +*monotonic*. + +If column or expression has values that are slightly out of order, +and the stream has a mechanism (such as punctuation or watermarks) +to declare that a particular value will never be seen again, then +the column or expression is said to be *quasi-monotonic*. + +Without a monotonic or quasi-monotonic expression in the `GROUP BY` clause, +Calcite is not able to make progress, and it will not allow the query: {% highlight sql %} @@ -217,7 +225,8 @@ not able to make progress, and it will not allow the query: ERROR: Streaming aggregation requires at least one monotonic expression in GROUP BY clause {% endhighlight %} -Monotonic columns need to be declared in the schema. The monotonicity is +Monotonic and quasi-monotonic columns need to be declared in the schema. +The monotonicity is enforced when records enter the stream and assumed by queries that read from that stream. We recommend that you give each stream a timestamp column called `rowtime`, but you can declare others, `orderId`, for example. http://git-wip-us.apache.org/repos/asf/calcite/blob/d42581d9/site/_posts/2016-02-17-streaming-sql-talk.md ---------------------------------------------------------------------- diff --git a/site/_posts/2016-02-17-streaming-sql-talk.md b/site/_posts/2016-02-17-streaming-sql-talk.md new file mode 100644 index 0000000..9c5d55a --- /dev/null +++ b/site/_posts/2016-02-17-streaming-sql-talk.md @@ -0,0 +1,40 @@ +--- +layout: news_item +title: "Streaming SQL in Samza" +date: "2016-02-17 11:53:00 -0800" +author: jhyde +categories: ["talks"] +--- +<!-- +{% comment %} +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to you under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +{% endcomment %} +--> + +Julian Hyde gave a talk at the [Apache Samza](http://samza.apache.org/) +meetup in Mountain View, CA. + +His talk asked the questions: + +* What is [SamzaSQL](https://github.com/milinda/samza-sql), + and what might I use it for? +* Does this mean that Samza is turning into a database? +* What is a query optimizer, and what can it do for my streaming queries? + +The talk is available in +[[slides](http://www.slideshare.net/julianhyde/streaming-sql)] +and +[[video](http://www.ustream.tv/recorded/83322450#to00:55:48)]. http://git-wip-us.apache.org/repos/asf/calcite/blob/d42581d9/site/community/index.md ---------------------------------------------------------------------- diff --git a/site/community/index.md b/site/community/index.md index ac2452c..b0c9fdb 100644 --- a/site/community/index.md +++ b/site/community/index.md @@ -97,6 +97,14 @@ Apache Kylin meetup, 2014; <iframe src="//www.slideshare.net/slideshow/embed_code/key/fCGsAedsQiq53V" width="629" height="354" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> +## Streaming SQL + +At Samza meetup, Mountain View, CA, 2016 +[[video](http://www.ustream.tv/recorded/83322450#to00:55:48)], +[[slides](http://www.slideshare.net/julianhyde/streaming-sql)]. + +<iframe src="//www.slideshare.net/slideshow/embed_code/key/rzaptOy3H8K6Gz" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> + ## More talks * <a href="https://github.com/julianhyde/share/blob/master/slides/hive-cbo-seattle-2014.pdf?raw=true">Cost-based optimization in Hive 0.14</a> (Seattle, 2014)
