databricks / cli

Databricks CLI
Other
115 stars 39 forks source link

Use `dyn.InvalidValue` to indicate absence #1507

Closed pietern closed 1 week ago

pietern commented 1 week ago

Changes

Previously, the functions Get and Index returned dyn.NilValue to indicate that a map key or sequence index wasn't found. This is a valid value, so we need to differentiate between actual absence and a real dyn.NilValue. We do this with the zero value of a dyn.Value (also captured in the constant dyn.InvalidValue).

Tests

pietern commented 1 week ago

Confirmed the integration tests are good as well.