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 bug with hive column name with space replacement #538

Merged
merged 2 commits into from
Mar 1, 2023
Merged

Conversation

swaranga-netflix
Copy link
Contributor

We were using the wrong method from the matcher. regionStart actually gives you the start index of the input being matched. The right method to use here is start and end.

Also added test cases for all the column types for the table that was affected.

@@ -105,6 +105,20 @@ class HiveTypeConverterSpec extends Specification {
"struct<field1:string,field2:decimal (38,9 ),field3:bigint>",
"struct<field1:string,field2:decimal (38),field3:bigint>",
"struct<field1:string,field2:decimal(38 ),field3:bigint>",

"struct<prediction_date:int,lower_confidence_amt:decimal(30,2),upper_confidence_amt:decimal(30,2),model_short_name:string>",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice work with the thorough test cases!

@swaranga-netflix swaranga-netflix marked this pull request as ready for review March 1, 2023 01:39
@swaranga-netflix swaranga-netflix merged commit 3b2b817 into master Mar 1, 2023
@swaranga-netflix swaranga-netflix deleted the regex branch March 14, 2023 22:53
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