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

Is it possible to support unsigned integer? #7306

Closed
HuangKBAaron opened this issue Apr 5, 2017 · 4 comments
Closed

Is it possible to support unsigned integer? #7306

HuangKBAaron opened this issue Apr 5, 2017 · 4 comments

Comments

@HuangKBAaron
Copy link

OrientDB Version: 2.2.17

Java Version: n/a

OS: n/a

Expected behavior

There are lots of cases that both large integers and unsigned integers for different purposes and distinguish is vital.

Actual behavior

doesn't support with 2.2.17

Steps to reproduce

n/a

@luigidellaquila
Copy link
Member

Hi @HuangKBAaron

Right now OrientDB supports five types of numbers

  • Integer: 32bit signed
  • Long: 64bit signed
  • Float: 32bit
  • Double: 64bit
  • Decimal: absolute precision (same as Java BigDecimal)

For now, you can use Long instead of unsigned int.

Supporting unsigned integers is not in the roadmap, but we can consider it of course.

Thanks

Luigi

@HuangKBAaron
Copy link
Author

most of the ids are using unsigned long (64bit), it would be common to support it. because most of the CPUs are 64bit, so unsigned long value can be load/save with one operation. If not supported, the work around would be 'Decimal', which take more than one operation. Because it is a primary job for sorting, comparing, and etc., it is bad for high performance situation.

@tglman
Copy link
Member

tglman commented Apr 12, 2017

hi @HuangKBAaron

I see your point, orient does not have unsigned integer and right now and we cannot support it in short term, if your id is a sequential you may try to re-map it to a signed long that support anyway from 0 to 9,223,372,036,854,775,807 and should anyway contain your load.

Regards

@lvca lvca closed this as completed Aug 5, 2017
@lvca
Copy link
Member

lvca commented Aug 5, 2017

Such enhancement is too expensive in comparison to the benefits. Sorry, I'm closing it unless a lot of users would +1 this.

@lvca lvca added the wontfix label Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants