Skip to content

[KYUUBI #4325] Support replace preparedStatement for Trino-jdbc#4417

Closed
yehere wants to merge 11 commits intoapache:masterfrom
yehere:kyuubi-4325
Closed

[KYUUBI #4325] Support replace preparedStatement for Trino-jdbc#4417
yehere wants to merge 11 commits intoapache:masterfrom
yehere:kyuubi-4325

Conversation

@yehere
Copy link
Contributor

@yehere yehere commented Feb 26, 2023

Why are the changes needed?

close #4325

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

@yehere
Copy link
Contributor Author

yehere commented Feb 26, 2023

@ulysses-you Is there a reusable trino g4 file for me to resolve parameters,like EXECUTE statement1 USING INTEGER '1','abc' ?

@ulysses-you
Copy link
Contributor

@yehere you can add in KyuubiTrinoFeBaseParser.g4

@ulysses-you
Copy link
Contributor

ulysses-you commented Feb 27, 2023

please remove test/debug code when it's ready to review, thank you

@codecov-commenter
Copy link

codecov-commenter commented Mar 8, 2023

Codecov Report

Merging #4417 (7b2864b) into master (9ca00c8) will increase coverage by 4.03%.
The diff coverage is 36.13%.

@@             Coverage Diff              @@
##             master    #4417      +/-   ##
============================================
+ Coverage     53.59%   57.62%   +4.03%     
  Complexity       13       13              
============================================
  Files           579      579              
  Lines         31802    31888      +86     
  Branches       4253     4262       +9     
============================================
+ Hits          17045    18377    +1332     
+ Misses        13172    11754    -1418     
- Partials       1585     1757     +172     
Impacted Files Coverage Δ
...ala/org/apache/kyuubi/server/trino/api/Query.scala 62.58% <0.00%> (-21.06%) ⬇️
.../kyuubi/sql/parser/trino/KyuubiTrinoFeParser.scala 75.00% <ø> (ø)
...kyuubi/server/trino/api/v1/StatementResource.scala 38.23% <13.33%> (-12.44%) ⬇️
...ache/kyuubi/sql/plan/trino/TrinoFeOperations.scala 34.37% <22.22%> (-4.76%) ⬇️
...ubi/sql/parser/trino/KyuubiTrinoFeAstBuilder.scala 93.18% <57.14%> (-6.82%) ⬇️
.../apache/kyuubi/server/trino/api/TrinoContext.scala 53.97% <75.00%> (+0.10%) ⬆️
...c/main/java/org/apache/kyuubi/jdbc/hive/Utils.java 69.23% <96.29%> (+28.16%) ⬆️
...ache/kyuubi/jdbc/hive/KyuubiPreparedStatement.java 18.07% <100.00%> (-18.63%) ⬇️

... and 35 files with indirect coverage changes

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

case GetPrepareSql(statementId, _) =>
val query = Query(
statementId,
statement.split(s"$statementId FROM")(1),
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be statement of GetPrepareSql ?

Copy link
Contributor

@ulysses-you ulysses-you Mar 24, 2023

Choose a reason for hiding this comment

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

I mean we can use prepare.sql, which is parsed by antlr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This parse module I want my colleague to improve based on my code. He is responsible for trino

@ulysses-you
Copy link
Contributor

also cc @iodone if you have time to help review

@ulysses-you
Copy link
Contributor

thank you @yehere for the updating. There are still some comments not addressed.

@yehere yehere force-pushed the kyuubi-4325 branch 2 times, most recently from 7614b11 to 1302cef Compare March 23, 2023 09:59
arrow-format/11.0.0//arrow-format-11.0.0.jar
arrow-memory-core/11.0.0//arrow-memory-core-11.0.0.jar
arrow-memory-netty/11.0.0//arrow-memory-netty-11.0.0.jar
arrow-vector/11.0.0//arrow-vector-11.0.0.jar
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 lose arrow dependency list before ? @pan3793

Copy link
Member

Choose a reason for hiding this comment

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

we don't need to do arrow codec in server before, and since new deps is added, please update the LICENSE and NOTICE

@yehere yehere force-pushed the kyuubi-4325 branch 2 times, most recently from 7020e2b to e5ff618 Compare March 29, 2023 09:45
…,update the dependency file, run './build/dependency.sh --replace'
Copy link
Contributor

@ulysses-you ulysses-you left a comment

Choose a reason for hiding this comment

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

thanks, merging to master

@ulysses-you ulysses-you added this to the v1.8.0 milestone Mar 30, 2023
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.

[Subtask] Support replace preparedStatement for Trino-jdbc

4 participants