apache / apache/gravitino

[Improvement] Use SQL prepared statements in JdbcDatabaseOperations.java and PostgreSqlSchemaOperations.java

Open
#8,017 6 comments 0 reactions 0 assignees View on GitHub
good first issue improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 17h
Merged PRs (30d)
286

Description

### What would you like to be improved?

In the exist method the SQL string can be changed to use safer prepared statements.

### How should we improve?

generateDatabaseExistSql woudl need to change as well.

Contributor guide

Open the contributing guide

Research direction

Start in JdbcDatabaseOperations.java and PostgreSqlSchemaOperations.java by tracing the exist method and its SQL generation. Check how generateDatabaseExistSql is used, then update the SQL handling to use prepared statements and run the existing tests covering these database operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql
Domain
database
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.