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

HierarchyId inconsistency #34

Closed
Liklainy opened this issue Mar 29, 2020 · 4 comments
Closed

HierarchyId inconsistency #34

Liklainy opened this issue Mar 29, 2020 · 4 comments

Comments

@Liklainy
Copy link
Contributor

Hello! Thanks for your hard work! 😄
In real data set I have encountered an hierarchyid like this:

/9138844059576.194933736431247.745612732/136587127227772.29968291099783.2405269301/194815533346310.190518957122630.1754824175/131180557026026.166347272232468.2634227923/112680214461405.155342927909666.4090640326/38488193629220.193847278467647.3890935971/

And I was not able to parse it with SqlHierarchyId implementation in this library

Encountered two blockers:

  1. This string cannot be parsed by SqlHierarchyId, because underlying node type is int (PR HierarchyId underlying type should be long #33)
  2. Cannot parse binary representation because there are no patterns for this case

The real problem is the second blocker.
It seams that current patterns don't implement all cases.

@dkearney1
Copy link

dkearney1 commented Jun 15, 2020

This issue is holding me up too. I believe PR #33 would fix my issue, or at least begin to.

@Liklainy
Copy link
Contributor Author

Hello, @dkearney1,
For patterns you can look at #6 and this link (you can find the same link in PR)

@dkearney1
Copy link

@Liklainy I have admit that my bit-twiddling skills are not up to the task of creating additional patterns, even after having read the documentation you linked. Should I be engaging the article's author about this?

dotMorten added a commit that referenced this issue Sep 8, 2020
@dotMorten
Copy link
Owner

Seems to be working just fine with latest source code, likely with PR 33 that changed it to use longs for parsing instead. Added a unit test also to ensure this won't regress

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

3 participants