Examples of asTextBytes()


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

                outputStream.write(Base64.encodeBase64(tuple.getBytes(i).asByteArray(), false));
                break;
              case CHAR:
                CharDatum charDatum = tuple.getChar(i);
                byte[] pad = new byte[col.getDataType().getLength() - datum.size()];
                outputStream.write(charDatum.asTextBytes());
                outputStream.write(pad);
                break;
              case TEXT:
                outputStream.write(tuple.getText(i).asTextBytes());
                break;
View Full Code Here

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

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

              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

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

          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.