flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-28858][docs] Add document to describe join hints for batch sql

Open swuferhong opened this issue 3 years ago • 1 comments

What is the purpose of the change

This pr is aims to add document for introduce join hints for batch sql.

Brief change log

  • Adding join hints contents in hint.md

Verifying this change

No test cases.

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

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

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? yes, this pr is a document.

swuferhong avatar Aug 09 '22 08:08 swuferhong

CI report:

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

flinkbot avatar Aug 09 '22 09:08 flinkbot

Hi, thank for you contribution. I left some comments here.

xuyangzhong avatar Aug 12 '22 10:08 xuyangzhong

@swuferhong for the structure of the document, my suggestion is like follows:

Query Hints

some description...

Syntax

query hints:

SELECT /*+ hint [, hint ]* */

hint:
      hintName
  |   hintName '(' optionKey '=' optionVal [, optionKey '=' optionVal ]* ')'
  |   hintName '(' hintOption [, hintOption ]* ')'

optionKey:
      simpleIdentifier
  |   stringLiteral

optionVal:
      stringLiteral

hintOption:
      simpleIdentifier
   |  numericLiteral
   |  stringLiteral

Join Hints

some description...

Join Hints - BROADCAST

{{< label Batch >}}

Join Hints - SHUFFLE_HASH

{{< label Batch >}}

Join Hints - SHUFFLE_MERGE

{{< label Batch >}}

Join Hints - NEST_LOOP

{{< label Batch >}}

// the LOOKUP for streaming will be added in https://github.com/apache/flink/pull/20577

Join Hints - LOOKUP

{{< label Streaming >}}

lincoln-lil avatar Aug 16 '22 09:08 lincoln-lil

@swuferhong for the structure of the document, my suggestion is like follows:

Query Hints

some description...

Syntax

query hints:

SELECT /*+ hint [, hint ]* */

hint:
      hintName
  |   hintName '(' optionKey '=' optionVal [, optionKey '=' optionVal ]* ')'
  |   hintName '(' hintOption [, hintOption ]* ')'

optionKey:
      simpleIdentifier
  |   stringLiteral

optionVal:
      stringLiteral

hintOption:
      simpleIdentifier
   |  numericLiteral
   |  stringLiteral

Join Hints

some description...

Join Hints - BROADCAST

{{< label Batch >}}

Join Hints - SHUFFLE_HASH

{{< label Batch >}}

Join Hints - SHUFFLE_MERGE

{{< label Batch >}}

Join Hints - NEST_LOOP

{{< label Batch >}}

// the LOOKUP for streaming will be added in #20577

Join Hints - LOOKUP

{{< label Streaming >}}

Thanks very much, I have adjusted the structure to the above structure.

swuferhong avatar Aug 17 '22 02:08 swuferhong