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

#5605 Better support for long/longlong types in delimited text #1957

Merged
merged 2 commits into from
Mar 21, 2015
Merged

#5605 Better support for long/longlong types in delimited text #1957

merged 2 commits into from
Mar 21, 2015

Conversation

carolinux
Copy link
Contributor

Added the ability to also infer long types (which up to now lost precision because they were cast as longs)
Tested it with a sample file and it works fine (also integer,double, text functionality still works fine)

@carolinux carolinux changed the title #5605 Support for long/longlong types #5605 Better support for long/longlong types in delimited text Mar 19, 2015
@m-kuhn
Copy link
Member

m-kuhn commented Mar 19, 2015

Could you add a test for this? The CSV provider already has a good test-suite. It would be great to have it also cover datatype detection.

@carolinux
Copy link
Contributor Author

sure

@carolinux
Copy link
Contributor Author

You'd like me to extend the python tests? There's no C++ tests. I can do that (polyglot :D), just making sure.

./tests/src/python/test_qgsdelimitedtextprovider.py

@jef-n jef-n assigned jef-n and ccrook and unassigned jef-n Mar 19, 2015
@carolinux
Copy link
Contributor Author

test case added

@ccrook
Copy link
Contributor

ccrook commented Mar 20, 2015

@carolinux That's great - just in the process of rebuilding development machine ATM, but looks fine .. will review and merge as soon as it is available.

@ccrook ccrook merged commit 48591df into qgis:master Mar 21, 2015
@ccrook
Copy link
Contributor

ccrook commented Mar 21, 2015

@carolinux I made a few changes to the code - mainly restoring some handling around empty values, and I think the type inference code was generating very large arrays couldBe... as they were being appended to for each row. Also I adapted your testlongs test to a more general type inference test, as I realised this was missing altogether in the existing test suite. Great to have this support built in.

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.

4 participants