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

val of type TIME_WITHOUT_TIME_ZONE setting #3

Open
baisui1981 opened this issue Aug 8, 2022 · 0 comments
Open

val of type TIME_WITHOUT_TIME_ZONE setting #3

baisui1981 opened this issue Aug 8, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@baisui1981
Copy link
Member

setting of col time_c TIME(0) is unsupported tempory

CREATE TABLE full_types (
    id INTEGER NOT NULL,
    bytea_c BYTEA,
    small_c SMALLINT,
    int_c INTEGER,
    big_c BIGINT,
    real_c REAL,
    double_precision DOUBLE PRECISION,
    numeric_c NUMERIC(10, 5),
    decimal_c DECIMAL(10, 1),
    boolean_c BOOLEAN,
    text_c TEXT,
    char_c CHAR,
    character_c CHARACTER(3),
    character_varying_c CHARACTER VARYING(20),
    timestamp3_c TIMESTAMP(3),
    timestamp6_c TIMESTAMP(6),
    date_c DATE,
    time_c TIME(0),
    default_numeric_c NUMERIC,
    PRIMARY KEY (id)
);

ALTER TABLE full_types REPLICA IDENTITY FULL;

INSERT INTO full_types VALUES (
    1, '2', 32767, 65535, 2147483647, 5.5, 6.6, 123.12345, 404.4443, true,
    'Hello World', 'a', 'abc', 'abcd..xyz',  '2020-07-17 18:00:22.123', '2020-07-17 18:00:22.123456',
    '2020-07-17', '18:00:22', 500);
JdbcOutputFormat [postgre_mysql] writeRecord error: when converting field[0] in Row(+I(1,[50],32767,65535,2147483647,5.5,6.6,123.123450000000000000,404.400000000000000000,true,Hello World,a,abc,abcd..xyz,2020-07-17T18:00:22.123,2020-07-17T18:00:22.123456,18460,36022000,500.000000000000000000))
java.lang.IllegalStateException: index:17 val:36022000
	at com.dtstack.chunjun.connector.jdbc.sink.JdbcOutputFormat.processWriteException(JdbcOutputFormat.java:353)
	at com.dtstack.chunjun.connector.jdbc.sink.JdbcOutputFormat.writeSingleRecordInternal(JdbcOutputFormat.java:192)
	at com.dtstack.chunjun.sink.format.BaseRichOutputFormat.writeSingleRecord(BaseRichOutputFormat.java:472)
	at com.dtstack.chunjun.sink.format.BaseRichOutputFormat.lambda$writeRecordInternal$1(BaseRichOutputFormat.java:493)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at com.dtstack.chunjun.sink.format.BaseRichOutputFormat.writeRecordInternal(BaseRichOutputFormat.java:493)
	at com.dtstack.chunjun.sink.format.BaseRichOutputFormat.lambda$initTimingSubmitTask$0(BaseRichOutputFormat.java:449)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: index:17 val:36022000
	at com.dtstack.chunjun.connector.jdbc.converter.JdbcColumnConverter.toExternal(JdbcColumnConverter.java:141)
	at com.dtstack.chunjun.connector.jdbc.converter.JdbcColumnConverter.toExternal(JdbcColumnConverter.java:58)
	at com.dtstack.chunjun.connector.jdbc.sink.PreparedStmtProxy.writeSingleRecordInternal(PreparedStmtProxy.java:222)
	at com.dtstack.chunjun.connector.jdbc.sink.JdbcOutputFormat.writeSingleRecordInternal(JdbcOutputFormat.java:189)
	... 12 more
Caused by: java.lang.UnsupportedOperationException: index:17,val:+I(1,[50],32767,65535,2147483647,5.5,6.6,123.123450000000000000,404.400000000000000000,true,Hello World,a,abc,abcd..xyz,2020-07-17T18:00:22.123,2020-07-17T18:00:22.123456,18460,36022000,500.000000000000000000)
	at com.dtstack.chunjun.connector.jdbc.converter.JdbcColumnConverter.lambda$createExternalConverter$a54efc5$11(JdbcColumnConverter.java:283)
	at com.dtstack.chunjun.connector.jdbc.converter.JdbcColumnConverter.lambda$wrapIntoNullableExternalConverter$f2b99adf$1(JdbcColumnConverter.java:87)
	at com.dtstack.chunjun.connector.jdbc.converter.JdbcColumnConverter.toExternal(JdbcColumnConverter.java:138)
	... 15 more
@baisui1981 baisui1981 added the bug Something isn't working label Aug 8, 2022
baisui1981 added a commit that referenced this issue Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant