Skip to content

Conversation

@wuchong
Copy link
Member

@wuchong wuchong commented Apr 16, 2021

What is the purpose of the change

This add documentations for new introduced window TVF based operations and also restructure "Queries" page.

Currently, the "Queries" page has been very large and it's getting longger when we supporting more features. We already have separate pages for Joins and CEP. I would propose to separate "Queries" into one page per operation. This way we can easily add more detailed informations for the operations and more examples.

Brief change log

The "Queires" page is restructured into following pages:

Queries
- Overview
- Hint (moved from "dev/table/sql/hints")
- WITH clause (new page)
- SELECT & WHERE (refactored)
- SELECT DISTINCT (new page)
- Windowing TVF (new page)
- Window Aggregation (refactored)
- Group Aggregation (refactored)
- Over Aggregation (refactored)
- Joins (moved from "dev/table/concepts/joins")
- Set Operations (refactored)
- ORDER BY clause 
- LIMIT clause
- Top-N
- Window Top-N (new page)
- Deduplication
- Pattern Recognition (moved from "dev/table/concepts/match_recognize")

I also refer some contents from https://docs.ververica.com/user_guide/sql_development/queries.html

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@wuchong
Copy link
Member Author

wuchong commented Apr 16, 2021

@leonardBang could you help to review this?

cc @twalthr @sjwiesman , would be great if you can have a look too.

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 16, 2021

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 2870d23 (Sat Aug 28 11:16:36 UTC 2021)

✅no warnings

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.

Details
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 16, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@sjwiesman sjwiesman self-requested a review April 16, 2021 13:17
Copy link
Contributor

@leonardBang leonardBang left a comment

Choose a reason for hiding this comment

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

Thanks @wuchong for the great work, I left some comments about TVF pages

Comment on lines 86 to 94
> SELECT * FROM TABLE(
TUMBLE(TABLE Bid, DESCRIPTOR(bidtime), INTERVAL '10' MINUTES));
-- or with the named params
-- note: the DATA param must be the first
> SELECT * FROM TABLE(
TUMBLE(
DATA => TABLE Bid,
TIMECOL => DESCRIPTOR(bidtime),
SIZE => INTERVAL '10' MINUTES));
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add note that Note: Currently Flink doesn't support individual window table-valued function, window table-valued function should use with aggregate operation, here we just for explanation the data produced by table-valued function

--+---------+-------+------+--------------+------------+--------------+

-- apply aggregation on the tumbling windowed table
> SELECT window_start, window_end, SUM(price)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we can use TIMESTAMP for bidtime and DECIMAL for price so that user can reproduce this case easily

@wuchong
Copy link
Member Author

wuchong commented Apr 20, 2021

Thanks @leonardBang for the reviewing, I have addressed your comments.

Copy link
Contributor

@sjwiesman sjwiesman left a comment

Choose a reason for hiding this comment

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

Thank you for picking this up @wuchong , I have reviewed the English pages of this PR

wuchong and others added 3 commits April 20, 2021 22:05
Co-authored-by: Seth Wiesman <sjwiesman@gmail.com>
Co-authored-by: Seth Wiesman <sjwiesman@gmail.com>
@wuchong
Copy link
Member Author

wuchong commented Apr 20, 2021

Thanks @sjwiesman for polishing the docs, it looks much better now! I also applied the changes to Chinese docs.

Copy link
Contributor

@sjwiesman sjwiesman left a comment

Choose a reason for hiding this comment

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

LGTM

@wuchong wuchong closed this in 9ba915a Apr 21, 2021
wuchong added a commit that referenced this pull request Apr 21, 2021
wuchong added a commit that referenced this pull request Apr 21, 2021
wuchong added a commit that referenced this pull request Apr 21, 2021
@wuchong wuchong deleted the docs-window-tvf branch April 21, 2021 03:51
wuchong added a commit that referenced this pull request Apr 21, 2021
wuchong added a commit that referenced this pull request Apr 21, 2021
wuchong added a commit that referenced this pull request Apr 21, 2021
wuchong added a commit that referenced this pull request Apr 21, 2021
xinggit pushed a commit to xinggit/flink that referenced this pull request Apr 22, 2021
xinggit pushed a commit to xinggit/flink that referenced this pull request Apr 22, 2021
xinggit pushed a commit to xinggit/flink that referenced this pull request Apr 22, 2021
xinggit pushed a commit to xinggit/flink that referenced this pull request Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants