Skip to content

Conversation

@hadoopkandy
Copy link
Contributor

@hadoopkandy hadoopkandy commented Oct 25, 2023

Why are the changes needed?

We shoud support initialize SQL to init session context the in Flink SQL (e.g. setting up catalogs).

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before make a pull request

Was this patch authored or co-authored using generative AI tooling?

No.

@link3280 link3280 added this to the v1.9.0 milestone Oct 25, 2023
Copy link
Contributor

@link3280 link3280 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR. The code generally looks good, but the tests could be improved a bit. Please take a look at my comments.

@link3280 link3280 requested a review from pan3793 October 25, 2023 11:44
@cxzl25 cxzl25 changed the title [KYUUBI #5507] [FLINK] Support Initialize SQL in Flink Engine [KYUUBI #5507][FLINK] Support Initialize SQL in Flink Engine Oct 26, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2023

Codecov Report

Merging #5518 (0782738) into master (27d845c) will decrease coverage by 0.24%.
Report is 9 commits behind head on master.
The diff coverage is n/a.

❗ Current head 0782738 differs from pull request most recent head b1720ec. Consider uploading reports for the commit b1720ec to get more accurate results

@@             Coverage Diff              @@
##             master    #5518      +/-   ##
============================================
- Coverage     61.67%   61.44%   -0.24%     
  Complexity       23       23              
============================================
  Files           603      603              
  Lines         35670    35669       -1     
  Branches       4869     4869              
============================================
- Hits          21999    21916      -83     
- Misses        11291    11376      +85     
+ Partials       2380     2377       -3     

see 23 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

}
}
withKyuubiConf.foreach { case (k, v) =>
System.setProperty(k, v)
Copy link
Member

Choose a reason for hiding this comment

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

what's the background of this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not relevant. It's probably a cleanup of unused codes.

Copy link
Member

@pan3793 pan3793 left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just left a few comments

link3280 and others added 2 commits November 2, 2023 12:43
…uubi/engine/flink/FlinkSQLEngine.scala

Co-authored-by: Cheng Pan <pan3793@gmail.com>
…uubi/engine/flink/operation/FlinkEngineInitializeSuite.scala
@pan3793 pan3793 closed this in 4668baf Nov 2, 2023
@pan3793
Copy link
Member

pan3793 commented Nov 2, 2023

Thanks, merged to master

@hadoopkandy hadoopkandy deleted the KYUUBI-5507 branch November 2, 2023 11:47
YesOrNo828 pushed a commit to YesOrNo828/kyuubi that referenced this pull request Nov 6, 2023
### _Why are the changes needed?_
We shoud support initialize SQL to init session context the  in Flink SQL  (e.g. setting up catalogs).

### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_
No.

Closes apache#5518 from hadoopkandy/KYUUBI-5507.

Closes apache#5507

b1720ec [Cheng Pan] Update externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink/operation/FlinkEngineInitializeSuite.scala
0782738 [Paul Lin] [KYUUBI-5507] Improve codestyle
13035f3 [Paul Lin] Update externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala
2ce8031 [Paul Lin] [KYUUBI-5507] Improve tests
a29ac38 [Paul Lin] [KYUUBI-5507] Run engine initial SQL at Engine start
b864af5 [wangkang] Merge branch 'apache:master' into KYUUBI-5507
b37d62d [kandy01.wang] [KYUUBI apache#5507] [FLINK] Support Initialize SQL in Flink Engine

Lead-authored-by: Kang Wang <kandy01.wang@vipshop.com>
Co-authored-by: Paul Lin <paullin3280@gmail.com>
Co-authored-by: kandy01.wang <kandy01.wang@vipshop.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Co-authored-by: wangkang <525262800@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
@pan3793
Copy link
Member

pan3793 commented Nov 24, 2023

I was asked frequently these days how to initialize the catalog in the Flink engine.

@link3280, if you don't mind, I propose to backport this patch to 1.8.1 so that we can deliver it soon.

@link3280
Copy link
Contributor

@pan3793 Sure. I'll create a backport PR in days.

@pan3793 pan3793 modified the milestones: v1.9.0, v1.8.1 Nov 24, 2023
@pan3793
Copy link
Member

pan3793 commented Nov 24, 2023

@link3280 I cherry-pick it to branch-1.8 in 902815d

pan3793 added a commit that referenced this pull request Nov 24, 2023
### _Why are the changes needed?_
We shoud support initialize SQL to init session context the  in Flink SQL  (e.g. setting up catalogs).

### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_
No.

Closes #5518 from hadoopkandy/KYUUBI-5507.

Closes #5507

b1720ec [Cheng Pan] Update externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink/operation/FlinkEngineInitializeSuite.scala
0782738 [Paul Lin] [KYUUBI-5507] Improve codestyle
13035f3 [Paul Lin] Update externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala
2ce8031 [Paul Lin] [KYUUBI-5507] Improve tests
a29ac38 [Paul Lin] [KYUUBI-5507] Run engine initial SQL at Engine start
b864af5 [wangkang] Merge branch 'apache:master' into KYUUBI-5507
b37d62d [kandy01.wang] [KYUUBI #5507] [FLINK] Support Initialize SQL in Flink Engine

Lead-authored-by: Kang Wang <kandy01.wang@vipshop.com>
Co-authored-by: Paul Lin <paullin3280@gmail.com>
Co-authored-by: kandy01.wang <kandy01.wang@vipshop.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Co-authored-by: wangkang <525262800@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
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.

4 participants