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

Bug: Testing framework cann't handle escape characters #4611

Open
acquamarin opened this issue Dec 9, 2024 · 1 comment
Open

Bug: Testing framework cann't handle escape characters #4611

acquamarin opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working testing Testing related issues

Comments

@acquamarin
Copy link
Collaborator

acquamarin commented Dec 9, 2024

Kùzu version

master

What operating system are you using?

MAC M1

What happened?

I have a test case which contains \ characteres in the expected error section:

-LOG LoadFromIncorrectFileFormat
-STATEMENT LOAD FROM "${KUZU_ROOT_DIRECTORY}/dataset/copy-test/node/parquet/types_50k_0.parquet" (format='csv') RETURN *;
---- error
Copy exception: Error in file ${KUZU_ROOT_DIRECTORY}/dataset/copy-test/node/parquet/types_50k_0.parquet on line 1: Conversion exception: Invalid UTF8-encoded string. Line/record containing the error: 'PAR1\x15\x4\x15\xA0\xA3\x10\x15\xBE\x92\bL\x15\xB4\x84\x2\x15

The actual error is:

Copy exception: Error in file /Users/z473chen/Desktop/code/kuzu/dataset/copy-test/node/parquet/types_50k_0.parquet on line 1: Conversion exception: Invalid UTF8-encoded string. Line/record containing the error: 'PAR1\x15\x4\x15\xA0\xA3\x10\x15\xBE\x92\bL\x15\xB4\x84\x2\x15

which matches my expected error.

However the testing framework still complains about the incorrect result:

Expected equality of these values:
  actualError
    Which is: "Copy exception: Error in file /Users/z473chen/Desktop/code/kuzu/dataset/copy-test/node/parquet/types_50k_0.parquet on line 1: Conversion exception: Invalid UTF8-encoded string. Line/record containing the error: 'PAR1\x15\x4\x15\xA0\xA3\x10\x15\xBE\x92\bL\x15\xB4\x84\x2\x15"
  expectedError
    Which is: "Copy exception: Error in file /Users/z473chen/Desktop/code/kuzu/dataset/copy-test/node/parquet/types_50k_0.parquet on line 1: Conversion exception: Invalid UTF8-encoded string. Line/record containing the error: 'PAR1\\x15\\x4\\x15\\xA0\\xA3\\x10\\x15\\xBE\\x92\\bL\\x15\\xB4\\x84\\x2\\x15"

Looks like the \ is incorrectly parsed in the testing framework.

Are there known steps to reproduce?

Try the following test case in test file:

-LOG LoadFromIncorrectFileFormat
-STATEMENT LOAD FROM "${KUZU_ROOT_DIRECTORY}/dataset/copy-test/node/parquet/types_50k_0.parquet" (format='csv') RETURN *;
---- error
Copy exception: Error in file ${KUZU_ROOT_DIRECTORY}/dataset/copy-test/node/parquet/types_50k_0.parquet on line 1: Conversion exception: Invalid UTF8-encoded string. Line/record containing the error: 'PAR1\x15\x4\x15\xA0\xA3\x10\x15\xBE\x92\bL\x15\xB4\x84\x2\x15
@acquamarin acquamarin added the bug Something isn't working label Dec 9, 2024
@acquamarin acquamarin self-assigned this Dec 9, 2024
@acquamarin acquamarin added the testing Testing related issues label Dec 9, 2024
@SterlingT3485 SterlingT3485 self-assigned this Dec 9, 2024
@SterlingT3485
Copy link
Collaborator

looking into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing Testing related issues
Projects
None yet
Development

No branches or pull requests

2 participants