Skip to content
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

Merged

Conversation

zijiacj
Copy link
Collaborator

@zijiacj zijiacj commented Dec 23, 2024

What type of PR is this?

type-bug

What this PR does / why we need it:

create function fun_year (p1 year) returns year begin
return 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.

image
Current the jdbc of ob specifies that the year type corresponds to Short in java, so changed from getString to getShort

For getting function execution results from database which dialect_type is mysql, use JdbcRowMapper to handle the type conversion

Which issue(s) this PR fixes:

Fixes #3942

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


@zijiacj zijiacj self-assigned this Dec 23, 2024
@zijiacj zijiacj added the type-bug Something isn't working label Dec 23, 2024
@zijiacj zijiacj added this to the ODC 4.3.3 milestone Dec 23, 2024
@zijiacj zijiacj changed the title fix(core):The function does not display properly if the return value type is year fix(function):The function does not display properly if the return value type is year Dec 25, 2024
@zijiacj zijiacj force-pushed the fix/function_return_incorrect_where_return_type_is_year branch from ccb3ace to d946ff9 Compare December 26, 2024 06:19
Copy link
Collaborator

@PeachThinking PeachThinking left a 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?

PeachThinking
PeachThinking previously approved these changes Dec 27, 2024
Copy link
Collaborator

@PeachThinking PeachThinking left a comment

Choose a reason for hiding this comment

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

lgtm

guowl3
guowl3 previously approved these changes Dec 30, 2024
Copy link
Collaborator

@guowl3 guowl3 left a comment

Choose a reason for hiding this comment

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

lgtm

@zijiacj zijiacj dismissed stale reviews from guowl3 and PeachThinking via f83f478 December 30, 2024 09:30
LuckyPickleZZ
LuckyPickleZZ previously approved these changes Dec 31, 2024
Copy link
Collaborator

@LuckyPickleZZ LuckyPickleZZ left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@MarkPotato777 MarkPotato777 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@guowl3 guowl3 left a comment

Choose a reason for hiding this comment

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

lgtm

@guowl3 guowl3 merged commit e6e06ab into dev/4.3.x Jan 2, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Something isn't working
Projects
Status: Developed
Development

Successfully merging this pull request may close these issues.

6 participants