Skip to content

Commit

Permalink
bit, double and float data types handling
Browse files Browse the repository at this point in the history
  • Loading branch information
zinal committed Aug 10, 2023
1 parent fc95c43 commit 7c9950c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/tech/ydb/importer/target/YdbTableBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ private String makeBlobName(String field) {
private Type convertType(ColumnInfo ci) {
switch (ci.getSqlType()) {
case java.sql.Types.BOOLEAN:
case java.sql.Types.BIT:
return PrimitiveType.Bool;
case java.sql.Types.SMALLINT:
return PrimitiveType.Int32;
Expand Down Expand Up @@ -153,6 +154,10 @@ private Type convertType(ColumnInfo ci) {
// TEMP: only DECIMAL(22,9) is supported for table columns.
return DecimalType.of(22, 9);
}
case java.sql.Types.DOUBLE:
return PrimitiveType.Double;
case java.sql.Types.FLOAT:
return PrimitiveType.Float;
case java.sql.Types.VARCHAR:
case java.sql.Types.CHAR:
case java.sql.Types.NVARCHAR:
Expand Down

0 comments on commit 7c9950c

Please sign in to comment.