-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[hotfix-#1952][core|doris] Fix ARRAY and LARGEINT type conversion exc… #1953
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This pull request introduces configurable timezone support to fix ARRAY and LARGEINT type conversion exceptions in the Doris connector. The fix allows users to control whether date/timestamp operations use the system's local timezone or the default GMT+8 timezone via a system property.
- Adds
USE_LOCAL_TIMEZONEsystem property to control timezone behavior - Modifies
DateUtilto conditionally use local timezone or GMT+8 based on the system property - Maintains backward compatibility by defaulting to GMT+8 when the property is not set
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
|
||
| private static final String TIME_ZONE = "GMT+8"; | ||
|
|
||
| private static final boolean isUseLocalTimeZone = |
Copilot
AI
Dec 1, 2025
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.
The variable name isUseLocalTimeZone does not follow Java naming conventions for boolean variables. In Java, boolean variable names should not include "is" as a prefix when declared, since the getter method will add "is" automatically. The variable should be named useLocalTimeZone instead of isUseLocalTimeZone.
| private static final boolean isUseLocalTimeZone = | |
| private static final boolean useLocalTimeZone = |
| public class DateUtil { | ||
|
|
||
| private static final String TIME_ZONE = "GMT+8"; | ||
|
|
Copilot
AI
Dec 1, 2025
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.
The new system property USE_LOCAL_TIMEZONE lacks documentation. A comment should be added to explain:
- What this property does (controls timezone behavior for date/timestamp formatting)
- How to set it (as a JVM system property)
- Valid values (true/false)
- Default behavior when not set (uses GMT+8)
- The impact on date/timestamp conversions across the application
| /** | |
| * System property: USE_LOCAL_TIMEZONE | |
| * | |
| * Controls timezone behavior for date/timestamp formatting throughout the application. | |
| * | |
| * How to set: Pass as a JVM system property, e.g. -DUSE_LOCAL_TIMEZONE=true | |
| * Valid values: "true" or "false" (case-insensitive) | |
| * Default behavior: If not set or set to "false", uses GMT+8 as the default timezone. | |
| * If set to "true", uses the local system timezone for date/timestamp conversions. | |
| * | |
| * Impact: Affects how dates and timestamps are formatted and parsed across the application. | |
| * Setting this to "true" will use the system's local timezone, which may change the results | |
| * of date/timestamp conversions depending on the environment where the JVM is running. | |
| */ |
…eptions
Purpose of this pull request
Which issue you fix
Fixes # (issue).
Checklist: