Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Shortcut common type inference cases to fail fast, speed up inference#660

Merged
srowen merged 3 commits intodatabricks:masterfrom
srowen:InferDateOpt
Sep 7, 2023
Merged

Shortcut common type inference cases to fail fast, speed up inference#660
srowen merged 3 commits intodatabricks:masterfrom
srowen:InferDateOpt

Conversation

@srowen
Copy link
Copy Markdown
Collaborator

@srowen srowen commented Sep 2, 2023

In schema inference, many different types are tried out for each input. This can get really slow in some cases, especially where the true type is just 'string'. This adds several shortcuts in the type inference code, to fail fast before expensive parsing code is run, where it's clear the parsing won't work. This also avoids using a thrown exception in one case for better speed.

@srowen srowen self-assigned this Sep 2, 2023
@srowen
Copy link
Copy Markdown
Collaborator Author

srowen commented Sep 4, 2023

I've got a customer checking out this change too. If I put it in, I'll also need to get this applied to the oustanding patch vs Spark that ports this.

@srowen srowen merged commit 994e357 into databricks:master Sep 7, 2023
@srowen srowen deleted the InferDateOpt branch September 7, 2023 03:46
@srowen srowen added this to the 0.17.0 milestone Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants