Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8750141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:48:53+00:00 2026-06-13T12:48:53+00:00

I want to store double values (as column names) using Hector. As far as

  • 0

I want to store double values (as column names) using Hector. As far as I understand it, I have to use the LONGTYPE comparator in conjunction with a DoubleSerializer.
I have created a columnFamily with ComparatorType.LONGTYPE as comparator and ComparatorType.UTF8TYPE as validator.
I insert data into my column family like this:

Mutator<String> m = HFactory.createMutator(_keyspace, _ss);
m.addInsertion(rowKey, cf, HFactory.createColumn(colKey, "", _ds, _ss));

where rowKey is a String, colKey is a double, _ds a DoubleSerializer and _ss a StringSerializer.
Everything seems to work for positive double values. However, when I want to do range queries with negative start and/or finish parameters, things get odd.
This is the code I use to query:

SliceQuery<String, Double, String> q = 
          HFactory.createSliceQuery(ks, _ss, _ds, _ss);
q.setRange(START, FINISH., false, 500);

When START and FINISH are positive, everything is ok.

When START is negative and FINISH positive, it will return the correct positive values, but only those negative values that are actually smaller then START.

When both are negative and START is smaller (as it should be !?) then FINISH, it will throw an

InvalidRequestException(why:range finish must come after start in the order of traversal).

When both are negative, but START is bigger then FINISH (i.e. less negative), it will return the correct results, but in the wrong order (the least negative, i.e. biggest, first).

Can anyone comment on that? Am I doing something wrong or is there maybe a bug in hector somewhere?

Edit: Unfortunately, the DoubleType has been removed in a previous version of hector. I forgot to mention that the version Im using is 1.1-0.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:48:54+00:00Added an answer on June 13, 2026 at 12:48 pm

    Since there seemed to be no way to “solve” this issue, I have implemented Double and Float format for hector. It has been pulled into the masterbranch and is therefore available in current snapshot .
    I assume it will make its way into the next release as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to store ~3,000,000 double values at unsigned int indices under VS2010 C++.
I want to store the TF-IDF matrix so I don't have to recalculate it
I want to store a very long string in database using php. The size
I am creating an array of double values,I want to add the created array
I have a couple of properties in C# which are double and I want
I have a table (MySQL) that has a column called binID. The values in
I have two arrays containing different keys and values. However, some keys store strings
So I want to save an ordered set of double values, and I want
In my application I'm going to use floating point values to store geographical coordinates
I have the need to store a range of values (like 25-50 or 100-200),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.