-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Fix][Connectors-Jdbc] Postgres supports streaming and batch reading and writing of the interval data type
#9590
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
Conversation
…ding and writing
...ache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresJdbcRowConverter.java
Outdated
Show resolved
Hide resolved
...ache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresJdbcRowConverter.java
Outdated
Show resolved
Hide resolved
… in Debezium, so if it is an integer, it is given microseconds by default.
interval data type for reading and writing.interval data type
…ium, so if it is a number, it is formatted as a postgres interval value.
|
Moreover, your approach only covers the "day" type. The "interval" type should also include "month" and "year". |
@WJX20 Yes, I am dealing with the default number type when the |
|
got off work |
@WJX20 now you can use this configuration parameter
|
Hisoka-X
left a comment
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. Thanks @chestnut-c
|
@chestnut-c I changed the variable name and it's OK. If I wait a moment and merge it |
corgy-w
left a comment
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.
wait ci
ok thx @corgy-w |
…and writing of the `interval` data type (apache#9590) Co-authored-by: chestnufang <[email protected]> Co-authored-by: corgy-w <[email protected]>








Purpose of this pull request
Postgres supports
intervaldata type for reading and writing. close #9582Does this PR introduce any user-facing change?
No
How was this patch tested?
for batch task:

The interval data type is not supported before modification
After modification, the interval data type can be read and written normally.
for streaming task:


And it is compatible with cdc scenarios. The Postgres interval type is converted to microseconds (long type) in Debezium such as io.debezium.time.MicroDuration , so if it is an number, it is given in microseconds by default.
Check list
New License Guide