Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Cannot set primitive value even if type is primitive in SearchArguments #18

Open
patduin opened this issue Feb 11, 2016 · 0 comments
Open

Comments

@patduin
Copy link
Contributor

patduin commented Feb 11, 2016

Consider the following failing unit test example for SearchArgumentFactoryTest:

 @Test
  public void primitiveBoolean() throws Exception {
    Fields booleanField = new Fields("A", boolean.class);
    SearchArgumentFactory.Builder.checkValueTypes(booleanField, true);
  }

It will fail because the primitive will be autoboxed in all operator methods of SearchArgumentFactory to an Object. Making the checkValueTypes(...) throw an exception. It works if you use hive's search args directly (probably because it is less strict in the checking).

Same holds for other primitive types.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant