示例#1
0
 /** Creates a byte array literal. */
 public RexLiteral makeBinaryLiteral(ByteString byteString) {
   return makeLiteral(
       byteString,
       typeFactory.createSqlType(SqlTypeName.BINARY, byteString.length()),
       SqlTypeName.BINARY);
 }
示例#2
0
 /** Returns a byte-string padded with zero bytes to make it at least a given length, */
 private static ByteString padRight(ByteString s, int length) {
   if (s.length() >= length) {
     return s;
   }
   return new ByteString(Arrays.copyOf(s.getBytes(), length));
 }