-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(function):The function does not display properly if the return value type is year #4093
fix(function):The function does not display properly if the return value type is year #4093
Conversation
server/odc-core/src/main/java/com/oceanbase/odc/core/sql/util/JdbcDataTypeUtil.java
Outdated
Show resolved
Hide resolved
ccb3ace
to
d946ff9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you discussed the feasibility of the solution to this problem with the jdbc teachers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
server/odc-core/src/main/java/com/oceanbase/odc/core/sql/util/JdbcDataTypeUtil.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
...odc-service/src/main/java/com/oceanbase/odc/service/db/util/OBMysqlCallFunctionCallBack.java
Outdated
Show resolved
Hide resolved
...odc-service/src/main/java/com/oceanbase/odc/service/db/util/OBMysqlCallFunctionCallBack.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What type of PR is this?
type-bug
What this PR does / why we need it:
create function
fun_year
(p1
year) returns year beginreturn p1;
end;
In ob mysql tenant. The input and return parameters of the above function are both of the year type. The function is executed in black screen. the input and output are both 2024. However, the value obtained by jdbc using getString is 2024-01-01, which is inconsistent with black screen.
Current the jdbc of
ob
specifies that theyear
type corresponds toShort
in java, so changed fromgetString
togetShort
For getting function execution results from database which dialect_type is
mysql
, useJdbcRowMapper
to handle the type conversionWhich issue(s) this PR fixes:
Fixes #3942
Special notes for your reviewer:
Additional documentation e.g., usage docs, etc.: