Skip to content

Commit

Permalink
[feat](api) add nullable info for api _schema (apache#46557)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?
spark doris connector still use `/api/<db>/<table>/_schema` api to get
column info, here we need nullable information.

like information_schema.columns, we add property: `is_nullable = Yes or
No`
  • Loading branch information
cambyzju authored Jan 11, 2025
1 parent 4cf70c0 commit 9fc6b8d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ protected Object schema(
Optional aggregationType = Optional.ofNullable(column.getAggregationType());
baseInfo.put("aggregation_type", aggregationType.isPresent()
? column.getAggregationType().toSql() : "");
baseInfo.put("is_nullable", column.isAllowNull() ? "Yes" : "No");
propList.add(baseInfo);
}
resultMap.put("status", 200);
Expand Down

0 comments on commit 9fc6b8d

Please sign in to comment.