Package org.apache.tajo.datum

Examples of org.apache.tajo.datum.Datum.asTextBytes()


            case TEXT: {
              datum = tuple.get(i);
              if (datum instanceof NullDatum) {
                outputStream.write(nullChars);
              } else {
                outputStream.write(datum.asTextBytes());
              }
              break;
            }
            case CHAR: {
              datum = tuple.get(i);
View Full Code Here


              datum = tuple.get(i);
              if (datum instanceof NullDatum) {
                outputStream.write(nullChars);
              } else {
                byte[] pad = new byte[dataType.getLength() - datum.size()];
                outputStream.write(datum.asTextBytes());
                outputStream.write(pad);
              }
              break;
            }
            case BOOLEAN: {
View Full Code Here

          for (int j = lasti; j <= i; j++) {
            datum = tuple.get(j);

            switch (schema.getColumn(j).getDataType().getType()) {
              case TEXT:
                Bytes.writeVLong(os, datum.asTextBytes().length);
                break;
              case PROTOBUF:
                ProtobufDatum protobufDatum = (ProtobufDatum) datum;
                Bytes.writeVLong(os, protobufDatum.asByteArray().length);
                break;
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.