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

optimize: support oracle date types #4542

Merged
merged 71 commits into from
Nov 14, 2022

Conversation

doubleDimple
Copy link
Contributor

@doubleDimple doubleDimple commented Apr 10, 2022

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

解决AT模式下,oracle数据库不支持以下时间类型:
TIMESTAMP WITH TIME ZONE
TIMESTAMP WITH LOCAL TIME ZONE
此pr解决以上三个类型的支持

Ⅱ. Does this pull request fix one issue?

fixes #4536

Ⅲ. Why don't you add test cases (unit test/integration test)?

yes, test code in # 4411

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

doubleDimple and others added 30 commits January 3, 2022 15:01
# Conflicts:
#	core/src/main/java/io/seata/core/console/result/PageResult.java
#	server/src/main/java/io/seata/server/storage/SessionConverter.java
@funky-eyes funky-eyes requested a review from jsbxyyx June 12, 2022 13:12
@slievrly slievrly modified the milestones: 2.0.0, 1.6.0 Sep 6, 2022
}

static {
ZONE_ID_MAP.put(250, "Asia/Shanghai");
Copy link
Member

Choose a reason for hiding this comment

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

how to ensure all the zone id in the ZONE_ID_MAP ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

具体解决办法:1维护常用的时区,其他时区通过在配置文件中配置,实时读取相关配置

Copy link
Contributor

Choose a reason for hiding this comment

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

how to ensure all the zone id in the ZONE_ID_MAP ?

We first add the commonly used time zones, the remaining open interface allows users to manually add their own, 1. api way to add time zones 2. configuration file to add time zones , both options should be supported

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

1.后续需考虑时区的动态添加

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM pr登记一下

Copy link
Contributor

@caohdgege caohdgege left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes merged commit 42f0446 into apache:develop Nov 14, 2022
*/
public class OracleJdbcType {

public static final int TIMESTAMP_WITH_TIME_ZONE = -101;
Copy link
Member

Choose a reason for hiding this comment

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

Be careful not to duplicate the int value of java.sql.Types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The following are duplicate types:
image

zw201913 pushed a commit to zw201913/seata that referenced this pull request Nov 16, 2022
…o 1114_for_5073

* '1114_for_5073' of https://github.com/zw201913/seata:
  test: test support for arm64 (apache#5069)
  test: add AT transaction mode tests to support database data types (Oracle) (apache#4411)
  bugfix: fix could not intercept the sql witch has no primary and unique (apache#5078)
  optimize: intercept insert on duplicate update statement which has no primary key and unique index (apache#5075)
  optimize: support oracle date types (apache#4542)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AT mode oracle some dateTypes not support
6 participants