|
7 | 7 | import io.opentelemetry.context.Context;
|
8 | 8 | import org.apache.calcite.adapter.jdbc.JdbcSchema;
|
9 | 9 | import org.apache.calcite.adapter.jdbc.JdbcTable;
|
| 10 | +import org.apache.calcite.avatica.util.ArrayImpl; |
10 | 11 | import org.apache.calcite.jdbc.CalciteConnection;
|
11 | 12 | import org.apache.calcite.jdbc.CalciteSchema;
|
12 | 13 | import org.apache.calcite.schema.Schema;
|
@@ -291,6 +292,8 @@ private Map<String, ColumnMetadata> getTableColumnInfo(TableMetadata table) {
|
291 | 292 | remapTypes.put("JavaType(class java.lang.Integer)", "INTEGER");
|
292 | 293 | remapTypes.put("INTEGER NOT NULL", "INTEGER");
|
293 | 294 | remapTypes.put("INTEGER", "INTEGER");
|
| 295 | + remapTypes.put("MAP NOT NULL", "MAP"); |
| 296 | + remapTypes.put("ARRAY NOT NULL", "ARRAY"); |
294 | 297 | remapTypes.put("JSON", "JSON");
|
295 | 298 | remapTypes.put("JSONB", "JSON");
|
296 | 299 | remapTypes.put("SMALLINT NOT NULL", "INTEGER");
|
@@ -478,6 +481,8 @@ public String queryModels(String query, String parentTraceId, String parentSpanI
|
478 | 481 | java.util.Date utilDate = new java.util.Date(sqlTimestamp.getTime());
|
479 | 482 | String rfcDateString = rfcFormat.format(utilDate.toInstant());
|
480 | 483 | columns.put(metaData.getColumnLabel(i), rfcDateString);
|
| 484 | + } else if (value instanceof ArrayImpl) { |
| 485 | + columns.put(metaData.getColumnLabel(i), ((ArrayImpl) value).getArray()); |
481 | 486 | }
|
482 | 487 | // if it is not date - put the value directly
|
483 | 488 | else {
|
|
0 commit comments