Open ryanaston opened 9 months ago
@ryanaston we made a tradeoff in the SDK not to use pointers to increase the usability of the SDK. We've modeled our SDK after Google's Go SDK, which does the same. Optional values that must be sent in a request or that were explicitly set in a response are present in the ForceSendFields
field of every generated structure. The value of this field is a string with comma-separated field names that correspond to an explicit zero value in the serialized message. You should be able to check which structure contains PartitionInfo
in ForceSendFields
to find the appropriate column.
Description While many models properly set the
omitempty
flag in the json annotation, they do not use pointers, causing default values to populate. This is particularly problematic for ColumnInfo where the presence or absence of a zero-indexed partition_index field indicates whether or not a column is part of the partition structure.Expected behavior Codegen should support pointers for optional fields.
Additional context Another report related to this issue here: https://github.com/databricks/databricks-sdk-go/issues/516