You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/12/16 15:21:37 UTC
[GitHub] [shardingsphere] ryan-hao opened a new issue #14125: java.lang.ClassCastException: java.sql.Time cannot be cast to java.sql.Timestamp
ryan-hao opened a new issue #14125:
URL: https://github.com/apache/shardingsphere/issues/14125
version
shardingsphere-jdbc-core-spring-boot-starter', version: '5.0.0


--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ryan-hao edited a comment on issue #14125: java.lang.ClassCastException: java.sql.Time cannot be cast to java.sql.Timestamp
Posted by GitBox <gi...@apache.org>.
ryan-hao edited a comment on issue #14125:
URL: https://github.com/apache/shardingsphere/issues/14125#issuecomment-996362185
> Hi @ryan-hao, thank you for your feedback, can you provide the step to reproduce this exception?
database: mysql
```
CREATE TABLE `ind_test_1` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ind_test_2` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
```
entity
```
@Data
public class TestDateTime {
private Long id;
private LocalDate infoDate;
private LocalTime infoTime;
}
```

rules:
sharding:
tables:
ind_test:
actual-data-nodes: test-db.ind_test_$->{1..2}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: ind-test-inline
key-generate-strategy:
column: id
key-generator-name: snowflake
sharding-algorithms:
ind-test-inline:
type: INLINE
props:
algorithm-expression: ind_test_$->{id % 2 + 1}
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ryan-hao commented on issue #14125: java.lang.ClassCastException: java.sql.Time cannot be cast to java.sql.Timestamp
Posted by GitBox <gi...@apache.org>.
ryan-hao commented on issue #14125:
URL: https://github.com/apache/shardingsphere/issues/14125#issuecomment-996362185
> Hi @ryan-hao, thank you for your feedback, can you provide the step to reproduce this exception?
database: mysql
CREATE TABLE `ind_test_1` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ind_test_2` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
entity
@Data
public class TestDateTime {
private Long id;
private LocalDate infoDate;
private LocalTime infoTime;
}

rules:
sharding:
tables:
ind_test:
actual-data-nodes: test-db.ind_test_$->{1..2}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: ind-test-inline
key-generate-strategy:
column: id
key-generator-name: snowflake
sharding-algorithms:
ind-test-inline:
type: INLINE
props:
algorithm-expression: ind_test_$->{id % 2 + 1}
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #14125: java.lang.ClassCastException: java.sql.Time cannot be cast to java.sql.Timestamp
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #14125:
URL: https://github.com/apache/shardingsphere/issues/14125#issuecomment-996311359
Hi @ryan-hao, thank you for your feedback, can you provide the step to reproduce this exception?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ryan-hao edited a comment on issue #14125: java.lang.ClassCastException: java.sql.Time cannot be cast to java.sql.Timestamp
Posted by GitBox <gi...@apache.org>.
ryan-hao edited a comment on issue #14125:
URL: https://github.com/apache/shardingsphere/issues/14125#issuecomment-996362185
> Hi @ryan-hao, thank you for your feedback, can you provide the step to reproduce this exception?
database: mysql
```
CREATE TABLE `ind_test_1` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ind_test_2` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
```
entity
```
@Data
public class TestDateTime {
private Long id;
private LocalDate infoDate;
private LocalTime infoTime;
}
```

rules:
sharding:
tables:
ind_test:
actual-data-nodes: test-db.ind_test_$->{1..2}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: ind-test-inline
key-generate-strategy:
column: id
key-generator-name: snowflake
sharding-algorithms:
ind-test-inline:
type: INLINE
props:
algorithm-expression: ind_test_$->{id % 2 + 1}
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ryan-hao edited a comment on issue #14125: java.lang.ClassCastException: java.sql.Time cannot be cast to java.sql.Timestamp
Posted by GitBox <gi...@apache.org>.
ryan-hao edited a comment on issue #14125:
URL: https://github.com/apache/shardingsphere/issues/14125#issuecomment-996362185
> Hi @ryan-hao, thank you for your feedback, can you provide the step to reproduce this exception?
database: mysql
`
CREATE TABLE `ind_test_1` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ind_test_2` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
`
entity
`
@Data
public class TestDateTime {
private Long id;
private LocalDate infoDate;
private LocalTime infoTime;
}
`

rules:
sharding:
tables:
ind_test:
actual-data-nodes: test-db.ind_test_$->{1..2}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: ind-test-inline
key-generate-strategy:
column: id
key-generator-name: snowflake
sharding-algorithms:
ind-test-inline:
type: INLINE
props:
algorithm-expression: ind_test_$->{id % 2 + 1}
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] ryan-hao edited a comment on issue #14125: java.lang.ClassCastException: java.sql.Time cannot be cast to java.sql.Timestamp
Posted by GitBox <gi...@apache.org>.
ryan-hao edited a comment on issue #14125:
URL: https://github.com/apache/shardingsphere/issues/14125#issuecomment-996362185
> Hi @ryan-hao, thank you for your feedback, can you provide the step to reproduce this exception?
database: mysql
```
CREATE TABLE `ind_test_1` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ind_test_2` (
`id` bigint(20) NOT NULL,
`info_date` date DEFAULT NULL,
`info_time` time DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
```
entity
```
@Data
public class TestDateTime {
private Long id;
private LocalDate infoDate;
private LocalTime infoTime;
}
```

rules:
sharding:
tables:
ind_test:
actual-data-nodes: test-db.ind_test_$->{1..2}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: ind-test-inline
key-generate-strategy:
column: id
key-generator-name: snowflake
sharding-algorithms:
ind-test-inline:
type: INLINE
props:
algorithm-expression: ind_test_$->{id % 2 + 1}
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 123
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org