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: databricks external location #5429

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

achettyiitr
Copy link
Member

@achettyiitr achettyiitr commented Jan 14, 2025

Description

  • There seems to be a bug that got introduced in this PR.
func (d *Deltalake) tableLocationQuery(tableName string) string {
	enableExternalLocation := warehouseutils.GetConfigValueBoolString(configKeyEnableExternalLocation, d.Warehouse)
	externalLocation := warehouseutils.GetConfigValue(configKeyExternalLocation, d.Warehouse)

	if enableExternalLocation != "true" || externalLocation == "" {
		return ""
	}

	return fmt.Sprintf("LOCATION '%s/%s/%s'", externalLocation, d.Namespace, tableName)
}

Got converted to

func (d *Deltalake) tableLocationQuery(tableName string) string {
	enableExternalLocation := d.Warehouse.GetBoolDestinationConfig(model.EnableExternalLocationSetting)
	externalLocation := d.Warehouse.GetStringDestinationConfig(d.conf, model.ExternalLocationSetting)

	if enableExternalLocation || externalLocation == "" {
		return ""
	}

	return fmt.Sprintf("LOCATION '%s/%s/%s'", externalLocation, d.Namespace, tableName)
}

Linear Ticket

  • Resolves WAR-172

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.80%. Comparing base (15a886c) to head (05d05a7).
Report is 1 commits behind head on release/1.40.x.

Additional details and impacted files
@@                Coverage Diff                 @@
##           release/1.40.x    #5429      +/-   ##
==================================================
- Coverage           75.12%   74.80%   -0.33%     
==================================================
  Files                 440      440              
  Lines               61774    61412     -362     
==================================================
- Hits                46408    45938     -470     
- Misses              12856    12933      +77     
- Partials             2510     2541      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@achettyiitr achettyiitr merged commit 7a2bcf9 into release/1.40.x Jan 14, 2025
68 of 69 checks passed
@achettyiitr achettyiitr deleted the fix.databricks-external-location branch January 14, 2025 08:34
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.

3 participants