apache / apache/shardingsphere

Consider optimizing AbstractJDBCRowsLoader#loadRowValue logic

Open
#21,942 0 comments 0 reactions 1 assignee View on GitHub

@strongduanmu is already working on this.

Since Nov 4, 2022.

in: kernel type: enhancement
Dominant language
Java
Stars
20.8k
Forks
6.9k
Avg merge
9h 55m
Merged PRs (30d)
311

Description

Feature Request

Is your feature request related to a problem?

#21926

Describe the feature you would like.

At present, the AbstractJDBCRowsLoader#loadRowValue method seems to only consider the corresponding relationship between SQL Type and Java Type in MySQL, and does not correctly handle other databases such as PostgreSQL and openGauss. Therefore, java.sql.SQLException: Unknown exception: java.lang.Integer cannot be cast to java.lang.Short appeared in #21926, and we need to adapt to different database dialects.

Also, I looked at the JDBC specification, it specifies the mapping between JDBC Type and Java Type, and most databases are implemented based on the specification, so we can implement these common methods in abstract classes.

image image image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.