Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qidaye committed Sep 26, 2024
1 parent cd17365 commit b20d14d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,17 @@ private static Column parseEsField(String fieldName, ObjectNode fieldValue, List
type = ScalarType.createStringType();
break;
case "nested":
case "object":
type = Type.JSONB;
break;
default:
type = Type.UNSUPPORTED;
}
} else {
type = ScalarType.createStringType();
column.setComment("Elasticsearch no type");
column2typeMap.put(fieldName, "no_type");
// When there is no explicit type in mapping, it indicates this type is an `object` in Elasticsearch.
// reference: https://www.elastic.co/guide/en/elasticsearch/reference/current/object.html
type = Type.JSONB;
column.setComment("Elasticsearch type is object");
column2typeMap.put(fieldName, "object");
}
if (arrayFields.contains(fieldName)) {
column.setType(ArrayType.create(type, true));
Expand Down

0 comments on commit b20d14d

Please sign in to comment.