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

Load query exception for invalid file format #1159

Merged
merged 7 commits into from
Sep 19, 2023

Conversation

affan00733
Copy link
Member

No description provided.

@affan00733 affan00733 self-assigned this Sep 18, 2023
Copy link
Member

@jiashenC jiashenC left a comment

Choose a reason for hiding this comment

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

Thanks, can you please add a test case to test this?

Otherwise, it looks good.

.gitignore Outdated Show resolved Hide resolved
@xzdandy
Copy link
Collaborator

xzdandy commented Sep 19, 2023

Thanks for looking into this! To make sure my understanding is correct, this improves the error message but does not enable the case insensitive type comparison.

@@ -30,6 +31,9 @@ def exec(self, *args, **kwargs):
"""

# invoke the appropriate executor
if self.node.file_options["file_format"] is None:
Copy link
Member

Choose a reason for hiding this comment

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

Please loop over all the possible enum values so that we don’t need to update this if we add more types later. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

@gaurav274 , in this if condition we are checking if we are receiving the file format none. It would be the case only if the file format is not their in lark parser.
And after this there is a condition already available where we are checking all the available file format and passing it to the load executor

@jarulraj jarulraj linked an issue Sep 19, 2023 that may be closed by this pull request
2 tasks
@jiashenC
Copy link
Member

Thanks for looking into this! To make sure my understanding is correct, this improves the error message but does not enable the case insensitive type comparison.

Yes. I feel just providing better error message is good enough. Shall we also make it case insensitive?

@affan00733
Copy link
Member Author

Thanks, can you please add a test case to test this?

Otherwise, it looks good.

Yes i will add a testcase

@affan00733
Copy link
Member Author

Thanks for looking into this! To make sure my understanding is correct, this improves the error message but does not enable the case insensitive type comparison.

Yes it just gives the correct error message

@jiashenC jiashenC merged commit 85112bb into staging Sep 19, 2023
@jiashenC jiashenC deleted the load-query-fileFormat-error-fix branch September 19, 2023 21:44
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.

Load PDF bug
4 participants