kyuubi icon indicating copy to clipboard operation
kyuubi copied to clipboard

[FEATURE] Expose the query operator as Flink SQL client done for the select query.

Open Whojohn opened this issue 1 year ago • 0 comments

Code of Conduct

Search before asking

  • [X] I have searched in the issues and found no similar issues.

Describe the feature

which feature we need

Expose the query operator as Flink SQL client done for the select query.

query like this

select sum(a) ,count(*) from sou
  • before this feature(data return as duplicate, make user confuse) +--------------+---------+------------+ | EXPR$0 | EXPR$1 | +--------------+---------+------------+ | -1861035379 | 1 | | -1861035379 | 1 | | -317406356 | 2 | | -317406356 | 2 | | -684766290 | 3 | | -684766290 | 3 |

  • after (as flink sql client table SET 'sql-client.execution.result-mode' = 'changelog'; setting ) +--------------+---------+------------+ | EXPR$0 | EXPR$1 | op | +--------------+---------+------------+ | -1861035379 | 1 | +I | | -1861035379 | 1 | -U | | -317406356 | 2 | +U | | -317406356 | 2 | -U | | -684766290 | 3 | +U | | -684766290 | 3 | -U |

Motivation

why is nessary ?

The concept of changelog is specific to Flink SQL. If the operation is not exposed, users will be confused when using JDBC/Beeline.

Describe the solution

  1. FlinkOperation add operator column meta.
  2. FlinkTRowSetGenerator add opeartor as rowdata return .

Additional context

No response

Are you willing to submit PR?

  • [X] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
  • [ ] No. I cannot submit a PR at this time.

Whojohn avatar Jan 06 '25 07:01 Whojohn