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

feat(databricks): normalize column names #241

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

atzoum
Copy link
Collaborator

@atzoum atzoum commented Dec 12, 2024

Description

The default behaviour of databricks is to return column names case sensitive when one queries the information schema, even though it treats them as case insensitive in sql statements.
For table names, databricks behaviour is different, it stores them in lowercase.
So, by default, table names are returned normalized by databricks, whereas column names are not.
To avoid this inconsistency, we are now normalizing column names as default behaviour.

Users who wish to avoid this behavioural change, they can set the SkipColumnNormalization configuration flag to true.

Linear Ticket

resolves PRO-3980

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 Dec 12, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 6 lines in your changes missing coverage. Please review.

Project coverage is 85.69%. Comparing base (a582787) to head (e3d52d0).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
sqlconnect/internal/databricks/tableadmin.go 64.70% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #241      +/-   ##
==========================================
+ Coverage   85.51%   85.69%   +0.17%     
==========================================
  Files          88       88              
  Lines        4494     4571      +77     
==========================================
+ Hits         3843     3917      +74     
- Misses        495      497       +2     
- Partials      156      157       +1     

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

@atzoum atzoum changed the title [WIP] feat(databricks): normalize column names feat(databricks): normalize column names Dec 13, 2024
@atzoum atzoum marked this pull request as ready for review December 13, 2024 09:37
@atzoum atzoum force-pushed the feat.normalizeDatabricksColumns branch from 6f01029 to e3d52d0 Compare December 13, 2024 09:37
@atzoum atzoum merged commit 8161d20 into main Dec 13, 2024
22 checks passed
@atzoum atzoum deleted the feat.normalizeDatabricksColumns branch December 13, 2024 10:57
atzoum pushed a commit that referenced this pull request Dec 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.14.0](v1.13.0...v1.14.0)
(2024-12-13)


### Features

* **bigquery:** bump cloud.google.com/go/bigquery from 1.63.1 to 1.65.0
([#238](#238))
([a582787](a582787))
* **databricks:** normalize column names
([#241](#241))
([8161d20](8161d20))
* **snowflake:** bump github.com/snowflakedb/gosnowflake from 1.11.1 to
1.12.1 ([#237](#237))
([8dbffab](8dbffab))
* **trino:** bump github.com/trinodb/trino-go-client from 0.317.0 to
0.320.0 ([#231](#231))
([79c9333](79c9333))


### Miscellaneous

* **deps:** bump codecov/codecov-action from 4 to 5
([#234](#234))
([5eb7be9](5eb7be9))
* **deps:** bump github.com/rudderlabs/rudder-go-kit from 0.43.0 to
0.45.0 ([#235](#235))
([e1b526f](e1b526f))
* **deps:** bump github.com/tidwall/gjson from 1.17.3 to 1.18.0
([#229](#229))
([bbcffdb](bbcffdb))
* **deps:** bump golang.org/x/crypto from 0.29.0 to 0.31.0 in the
go_modules group
([#240](#240))
([5757306](5757306))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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