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

Fixes #3218: java.lang.NullPointerException when setting the type of a property to datetime in the mapping config of apoc.load.csv() #3976

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Feb 29, 2024

Fixes #3218

Up to 5.16 we had to use a workaround not to throw a NullPointerException with datetime/time mappings, since the bug is in Core.
E.g.

CALL apoc.load.csv('test.csv', {mapping:{name:{type: "datetime", optionalData: {}}}})

But, as this PR neo4j/apoc#571 is merged,
we can use datetime without optionalData: {} workaround, e.g.:

CALL apoc.load.csv('test.csv', {mapping:{name:{type: "datetime"}}})

Changes:

  • added test with multiple types and optionalData
  • added test with multiple types and without optionalData, to check that the APOC Core's fix works correctly
  • added assertMapEquals util, to check more easily the possible failied entry map

…a property to datetime in the mapping config of apoc.load.csv()
@RobertoSannino RobertoSannino merged commit 92ed594 into dev Mar 14, 2024
4 checks passed
@RobertoSannino RobertoSannino deleted the issue-3218 branch March 14, 2024 17:02
vga91 added a commit that referenced this pull request Apr 3, 2024
…ype of a property to datetime in the mapping config of apoc.load.csv() (#3976)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants