Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Handle edge case for effective_properties in databricks_sql_table #4153

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Oct 25, 2024

Changes

It was reported in #4098 that some of the specified options, like, multiLine, recursiveFileLookup and potentially more, aren't returned as option.multiLine, etc., but instead are expanded into full names, like, spark.sql.dataSourceOptions.multiLine.

This PR changes lookup logic a bit, and if we can't find option.something, then we're looking for all options ending with .something (only if there are no . in the name).

Resolves #4098

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

…table`

It was reported in #4098 that some of the specified options, like, `multiLine`,
`recursiveFileLookup` and potentially more, aren't returned as `option.multiLine`, etc.,
but instead are expanded into full names, like, `spark.sql.dataSourceOptions.multiLine`.

This PR changes lookup logic a bit, and if we can't find `option.something`, then we're
looking for all options ending with `.something` (only if there are no `.` in the name).

Resolves #4098
@alexott alexott requested review from a team as code owners October 25, 2024 06:50
@alexott alexott requested review from tanmay-db and removed request for a team October 25, 2024 06:50
@alexott alexott requested a review from mgyucht October 25, 2024 06:50
Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to be explicit about the allowed prefixes, rather than allowing any prefix. Otherwise this LGTM.

catalog/resource_sql_table.go Outdated Show resolved Hide resolved
catalog/resource_sql_table.go Outdated Show resolved Hide resolved
@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/11557461282

@alexott alexott added this pull request to the merge queue Oct 29, 2024
Merged via the queue into main with commit 92357dc Oct 29, 2024
10 checks passed
@alexott alexott deleted the fix/issue-4098 branch October 29, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ISSUE] Issue with databricks_sql_table resource perpetual diff on options
3 participants