Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: rewrite pull query docs page #7532

Merged
merged 10 commits into from
May 27, 2021
Merged

Conversation

cprasad1
Copy link
Contributor

@cprasad1 cprasad1 commented May 17, 2021

Description

Rewrite pull query docs page https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-reference/select-pull-query/

Testing done

Describe the testing strategy. Unit and integration tests are expected for any behavior changes.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@cprasad1 cprasad1 requested review from JimGalasyn and a team as code owners May 17, 2021 05:53
Copy link
Member

@JimGalasyn JimGalasyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with a few suggestions! If you'd like this to go live now, it needs to be cherry-picked to the 0.17.0-ksqldb branch, and to keep branches in sync, also to the 0.18.x-ksqldb branch. #LifeWithoutPintMerge

Copy link
Member

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I agree with @agavra 's feedback. Otherwise, LGTM!

@cprasad1 cprasad1 changed the title chore: rewrite pull query docs page docs: rewrite pull query docs page May 26, 2021
@cprasad1 cprasad1 requested a review from agavra May 26, 2021 23:42
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments inline - thanks for the PR!

docs/developer-guide/ksqldb-reference/select-pull-query.md Outdated Show resolved Hide resolved
[Push Queries](select-push-query.md).

Execute a pull query by sending an HTTP request to the ksqlDB REST API, and
You can execute a pull query by sending an HTTP request to the ksqlDB REST API, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlanConfluent do we need to update this at all after #6813? (shouldn't block this PR)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It streams back a chunked response. Technically, it's a single response, though maybe it's a little misleading, since I think that wording was intended to mean it's returned in one fell swoop (one chunk!). Maybe we want to change the description to either say "Streams back a chunked response as rows are fetched" or just make it a little more vague so that it's a little less tied to an implementation by saying "the API responds with resulting rows".

docs/developer-guide/ksqldb-reference/select-pull-query.md Outdated Show resolved Hide resolved
- You can issue a pull query against any table that was created by using
a [CREATE TABLE AS SELECT](../../ksqldb-reference/create-table-as-select)
statement.
- `SELECT` statements can contain column arithmetic and function calls.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we can express any expression? this implies we can only do arithmetic and function calls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ewmoved the commentary on SELECT. It was a bit confusing and wrong

docs/developer-guide/ksqldb-reference/select-pull-query.md Outdated Show resolved Hide resolved
docs/developer-guide/ksqldb-reference/select-pull-query.md Outdated Show resolved Hide resolved
- On windowed tables, WINDOWSTART and WINDOWEND can be optionally compared to literals.
For more information on windowed tables, see [Time and Windows in ksqlDB](../../concepts/time-and-windows-in-ksqldb-queries.md).

You can enable table scans to loosen the restrictions on the `WHERE` clause or eliminate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might want to say what a "table scan" is (perhaps the note below is a good place for this). @JimGalasyn thoughts?

docs/developer-guide/ksqldb-reference/select-pull-query.md Outdated Show resolved Hide resolved
- Key column(s) using range comparisons to literals.
- Non key columns to be used alone, without key references.
- Columns to be compared to other columns.
- References to subsets of columns from a multi-column key.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we also support UDFs and function calls? Might make sense to call out what is not supported as opposed to what is here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we do support UDFs and function calls. Really, anything goes. The below line gives an example of this: (e.g. instr(NAME_COL, 'hello') > 0)

`CREATE TABLE QUERYABLE_JOIN_TABLE AS SELECT * FROM JOIN_TABLE;` and then issue pull queries against `QUERYABLE_JOIN_TABLE`.


Pull queries against a table `INNER_JOIN` that is created by joining multiple tables:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure this example is helpful (the windowed one below is helpful because it shows the usage of window bounds on key lookups)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have stated in our 0.17 blog and 0.17 docs explicitly that Pull queries are not supported on Table-Table joins. This just clarifies to a certain degree that they are now supported.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO I think it's sufficiently clarified above when you discuss that any CTAS table can be queried. Not a big deal though, we can keep it or get another opinion on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it. It is also one of the examples in our 0.18 blog

@cprasad1
Copy link
Contributor Author

master is broken. merging this in as it is just docs

@cprasad1 cprasad1 merged commit ed969c6 into confluentinc:master May 27, 2021
@cprasad1 cprasad1 deleted the pull_doc branch May 27, 2021 19:58
cprasad1 added a commit to cprasad1/ksql that referenced this pull request May 27, 2021
* chore: rewrite pull query docs page

* revise some more

* incorporate Alan's comment

* explicitly call out features and limitations

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* nits

Co-authored-by: Chittaranjan Prasad <>
Co-authored-by: Almog Gavra <[email protected]>
cprasad1 added a commit to cprasad1/ksql that referenced this pull request May 27, 2021
* chore: rewrite pull query docs page

* revise some more

* incorporate Alan's comment

* explicitly call out features and limitations

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* nits

Co-authored-by: Chittaranjan Prasad <>
Co-authored-by: Almog Gavra <[email protected]>
cprasad1 added a commit that referenced this pull request May 27, 2021
* chore: fix pull queries in https://docs/concepts/queries.md (#7597)

* chore: fix pull queries in docs/concepts/queries.md

* nit in language

Co-authored-by: Chittaranjan Prasad <>

* docs: rewrite pull query docs page (#7532)

* chore: rewrite pull query docs page

* revise some more

* incorporate Alan's comment

* explicitly call out features and limitations

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* nits

Co-authored-by: Chittaranjan Prasad <>
Co-authored-by: Almog Gavra <[email protected]>

Co-authored-by: Almog Gavra <[email protected]>
cprasad1 added a commit that referenced this pull request May 27, 2021
* chore: fix pull queries in https://docs/concepts/queries.md (#7597)

* chore: fix pull queries in docs/concepts/queries.md

* nit in language

Co-authored-by: Chittaranjan Prasad <>

* docs: rewrite pull query docs page (#7532)

* chore: rewrite pull query docs page

* revise some more

* incorporate Alan's comment

* explicitly call out features and limitations

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* Update docs/developer-guide/ksqldb-reference/select-pull-query.md

Co-authored-by: Almog Gavra <[email protected]>

* nits

Co-authored-by: Chittaranjan Prasad <>
Co-authored-by: Almog Gavra <[email protected]>

Co-authored-by: Almog Gavra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants