Closed nsvir closed 2 months ago
A Double may be of 2 sql types java.sql.Types:
java.sql.Types
If NUMERIC occurs, the code successful cast BigDecimal into itself. if DOUBLE occurs, the code fails to cast Double to BigDecimal.
How to reproduce: Use a h2 database:
DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("org.h2.Driver"); dataSource.setUrl("jdbc:h2:mem:db;DB_CLOSE_DELAY=-1;MODE=Oracle"); dataSource.setUsername("sa"); dataSource.setPassword("sa"); return dataSource;
Execute this SQL
CREATE TABLE POST ( float FLOAT ); INSERT INTO POST(float) values (0.5);
Ask parquetWriter to serialize POST table
A Double may be of 2 sql types
java.sql.Types
:If NUMERIC occurs, the code successful cast BigDecimal into itself. if DOUBLE occurs, the code fails to cast Double to BigDecimal.
How to reproduce: Use a h2 database:
Execute this SQL
Ask parquetWriter to serialize POST table