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

RMLTC0018a-MySQL: space-padding of CHAR(15) columns is autoremoved in MySQL #43

Open
thomas-delva opened this issue Apr 12, 2021 · 2 comments

Comments

@thomas-delva
Copy link

The test case uses a column with type CHAR(15) containing values shorter than 15 characters, such as 'Venus'. The expected output contains literals of length 15, with spaces added, e.g., "Venus ". (Unfortunately github markdown renders this with 1 trailing space, but there should be 10.)

However, MySQL autoremoves these trailing spaces, so the mapper generates values like "Venus", leading to a test failure.

If MySQL treats a CHAR(15) with trailing spaces like a short string without spaces, I think the literal should also be this short string since that's a faithful representation of the database value. (This is up for discussion.) Also, I did not find anything in the part of the R2RML spec mentioned in the test case description (or in other parts of the spec) about adding space-padding to short CHAR(15)s.

@thomas-delva
Copy link
Author

I have not looked at the behaviour of other databases (postgres, sqlserver) for fixed-length character arrays yet. Will do so when I go over their test cases.

@thomas-delva thomas-delva changed the title RMLTC0018-MySQL: space-padding of CHAR(15) columns is autoremoved in MySQL RMLTC0018a-MySQL: space-padding of CHAR(15) columns is autoremoved in MySQL Apr 13, 2021
@thomas-delva
Copy link
Author

The same test case for PostgreSQL (RMLTC0018a-PostgreSQL) does create padded literals

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

No branches or pull requests

1 participant