Skip to content

Commit 4e905c7

Browse files
feat: Support float4 in JDBC
1 parent 630e518 commit 4e905c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/google/cloud/spanner/jdbc/JdbcDataType.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ public Type getSpannerType() {
113113
}
114114
},
115115
FLOAT32 {
116+
private final Set<String> aliases = new HashSet<>(Collections.singletonList("float4"));
117+
116118
@Override
117119
public int getSqlType() {
118120
return Types.REAL;
@@ -152,6 +154,11 @@ public List<Float> getArrayElements(ResultSet rs, int columnIndex) {
152154
public Type getSpannerType() {
153155
return Type.float32();
154156
}
157+
158+
@Override
159+
public Set<String> getPostgreSQLAliases() {
160+
return aliases;
161+
}
155162
},
156163
FLOAT64 {
157164
private final Set<Class<?>> classes = new HashSet<>(Arrays.asList(Float.class, Double.class));

0 commit comments

Comments
 (0)