Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Case Sensitivity: Support Case Insensitive Index Column Names #78

Merged
merged 43 commits into from
Aug 4, 2020

Conversation

apoorvedave1
Copy link
Contributor

@apoorvedave1 apoorvedave1 commented Jul 1, 2020

This fixes #27

What changes were proposed in this pull request?

Currently index creation and usage is case sensitive. This PR addresses the issue by using "spark.sql.caseSensitivity" to determine whether to support case sensitivity or not. It adds support to use indexes if the original query is case insensitive.

Why are the changes needed?

Currently index creation and usage is case sensitive.
If base table has columns "c1", "c2" and the query is "SELECT C1, C2 FROM T WHERE...." the indexes cannot be used beause the rules do a case-sensitive matching irrespective of the value of "spark.sql.caseSensitivity".

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added unit tests to cover case-insensitive scenarios

@apoorvedave1 apoorvedave1 self-assigned this Jul 1, 2020
@apoorvedave1 apoorvedave1 added the enhancement New feature or request label Jul 1, 2020
@apoorvedave1 apoorvedave1 added this to the 0.2.0 milestone Jul 1, 2020
Copy link
Contributor Author

@apoorvedave1 apoorvedave1 left a comment

Choose a reason for hiding this comment

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

done

Copy link
Contributor Author

@apoorvedave1 apoorvedave1 left a comment

Choose a reason for hiding this comment

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

initial review done

@rapoth rapoth changed the title Casesensitivity: support case-insensitive index column names Case Sensitivity: Support Case Insensitive Index Column Names Jul 7, 2020
pirz
pirz previously approved these changes Jul 23, 2020
Copy link
Contributor

@pirz pirz left a comment

Choose a reason for hiding this comment

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

LGTM, thnx @apoorvedave1

AFFogarty
AFFogarty previously approved these changes Jul 24, 2020
Copy link
Contributor

@AFFogarty AFFogarty left a comment

Choose a reason for hiding this comment

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

LGTM.

@apoorvedave1 apoorvedave1 dismissed stale reviews from AFFogarty and pirz via a29b3d7 July 27, 2020 16:49
@imback82
Copy link
Contributor

imback82 commented Aug 2, 2020

@apoorvedave1 Can you resolve conflicts please?

# Conflicts:
#	src/test/scala/com/microsoft/hyperspace/index/E2EHyperspaceRulesTests.scala
# Conflicts:
#	src/test/scala/com/microsoft/hyperspace/actions/CreateActionTest.scala
imback82
imback82 previously approved these changes Aug 4, 2020
Copy link
Contributor

@imback82 imback82 left a comment

Choose a reason for hiding this comment

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

LGTM (one nit comment), thanks @apoorvedave1!

@imback82 imback82 merged commit 4916929 into microsoft:master Aug 4, 2020
@apoorvedave1 apoorvedave1 deleted the casesensitivity branch September 16, 2020 16:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle Case sensitivity in indexed and included column names appropriately
5 participants