File tree Expand file tree Collapse file tree 2 files changed +197
-95
lines changed
main/java/tech/ydb/jdbc/impl
test/java/tech/ydb/jdbc/impl Expand file tree Collapse file tree 2 files changed +197
-95
lines changed Original file line number Diff line number Diff line change @@ -195,20 +195,27 @@ public static int toSqlType(Type type) {
195195
196196 private int toSqlTypeImpl (Type type ) {
197197 switch (type .getKind ()) {
198+ case PRIMITIVE :
199+ if (!sqlTypeByPrimitiveNumId .containsKey (type )) {
200+ throw new RuntimeException ("Internal error. Unsupported YDB type: " + type );
201+ }
202+ return sqlTypeByPrimitiveNumId .get (type );
198203 case OPTIONAL :
199204 return toSqlTypeImpl (type .unwrapOptional ());
200205 case DECIMAL :
201206 return Types .DECIMAL ;
207+ case STRUCT :
208+ return Types .STRUCT ;
209+ case LIST :
210+ return Types .ARRAY ;
202211 case NULL :
203212 case VOID :
204213 return Types .NULL ;
205214 case PG_TYPE :
215+ case TUPLE :
216+ case DICT :
217+ case VARIANT :
206218 return Types .OTHER ;
207- case PRIMITIVE :
208- if (!sqlTypeByPrimitiveNumId .containsKey (type )) {
209- throw new RuntimeException ("Internal error. Unsupported YDB type: " + type );
210- }
211- return sqlTypeByPrimitiveNumId .get (type );
212219 default :
213220 throw new RuntimeException ("Internal error. Unsupported YDB kind: " + type );
214221 }
You can’t perform that action at this time.
0 commit comments