Examples of writeNull()


Examples of org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol.writeNull()

      Object key = it.getKey();
      Object value = it.getValue();
      keyType.serialize(key, koi, oprot);
      if (value == null) {
        assert (nullProtocol != null);
        nullProtocol.writeNull();
      } else {
        valueType.serialize(value, voi, oprot);
      }
    }
    // in theory, the below call isn't needed in non thrift_mode, but let's not
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol.writeNull()

      List<?> list = (List<?>) o;
      oprot.writeListBegin(new TList(mt.getType(), list.size()));
      for (Object element : list) {
        if (element == null) {
          assert (nullProtocol != null);
          nullProtocol.writeNull();
        } else {
          mt.serialize(element, elementObjectInspector, oprot);
        }
      }
    } else {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol.writeNull()

      Object[] list = (Object[]) o;
      oprot.writeListBegin(new TList(mt.getType(), list.length));
      for (Object element : list) {
        if (element == null && nullProtocol != null) {
          assert (nullProtocol != null);
          nullProtocol.writeNull();
        } else {
          mt.serialize(element, elementObjectInspector, oprot);
        }
      }
    }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol.writeNull()

      Object key = it.getKey();
      Object value = it.getValue();
      keyType.serialize(key, koi, oprot);
      if (value == null) {
        assert (nullProtocol != null);
        nullProtocol.writeNull();
      } else {
        valueType.serialize(value, voi, oprot);
      }
    }
    // in theory, the below call isn't needed in non thrift_mode, but let's not
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol.writeNull()

      List<?> list = (List<?>) o;
      oprot.writeListBegin(new TList(mt.getType(), list.size()));
      for (Object element : list) {
        if (element == null) {
          assert (nullProtocol != null);
          nullProtocol.writeNull();
        } else {
          mt.serialize(element, elementObjectInspector, oprot);
        }
      }
    } else {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol.writeNull()

      Object[] list = (Object[]) o;
      oprot.writeListBegin(new TList(mt.getType(), list.length));
      for (Object element : list) {
        if (element == null && nullProtocol != null) {
          assert (nullProtocol != null);
          nullProtocol.writeNull();
        } else {
          mt.serialize(element, elementObjectInspector, oprot);
        }
      }
    }
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeNull()

    public void testWrapppingNull() throws Exception {
        StringWriter sw = new StringWriter();
        JsonGenerator g = (new JsonFactory()).createJsonGenerator(sw);
        JsonGenerator awg = JacksonArrayWrapperGenerator.createArrayWrapperGenerator(g);
        awg.writeNull();
        awg.close();
        assertEquals("[]",sw.toString());
    }

    public void testWrapppingDoubleNull() throws Exception {
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeNull()

    public void testWrapppingDoubleNull() throws Exception {
        StringWriter sw = new StringWriter();
        JsonGenerator g = (new JsonFactory()).createJsonGenerator(sw);
        JsonGenerator awg = JacksonArrayWrapperGenerator.createArrayWrapperGenerator(g);
        awg.writeNull();
        awg.writeNull();
        awg.close();
        assertEquals("[null,null]",sw.toString());
    }
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeNull()

    public void testWrapppingDoubleNull() throws Exception {
        StringWriter sw = new StringWriter();
        JsonGenerator g = (new JsonFactory()).createJsonGenerator(sw);
        JsonGenerator awg = JacksonArrayWrapperGenerator.createArrayWrapperGenerator(g);
        awg.writeNull();
        awg.writeNull();
        awg.close();
        assertEquals("[null,null]",sw.toString());
    }

    public void testWrapppingString() throws Exception {
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeNull()

            generator.writeFieldName(ExpressionEditorMessageTokens.OPERATOR_TOKEN);
            if (message.getExpression().getOperator() != null) {
                generator.writeString(message.getExpression().getOperator());
            } else {
                generator.writeNull();
            }

            generator.writeArrayFieldStart(ExpressionEditorMessageTokens.CONDITIONS_TOKEN);
            if (message.getExpression().getConditions().size() > 0) {
                for (Condition condition : message.getExpression().getConditions()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.