@Override public boolean isNullable() { return getChildren().get(0).isNullable(); } }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression expression = getChildren().get(0); if (!expression.evaluate(tuple, ptr)) { return false; } String inputString = (String) PVarchar.INSTANCE.toObject(ptr, expression.getSortOrder()); if (LOG.isTraceEnabled()) { LOG.trace("CollationKey inputString: " + inputString); } if (inputString == null) { return true; } byte[] collationKeyByteArray = collator.getCollationKey(inputString).toByteArray(); if (LOG.isTraceEnabled()) { LOG.trace("CollationKey bytes: " + VarBinaryFormatter.INSTANCE.format(collationKeyByteArray)); } ptr.set(collationKeyByteArray); return true; }
@Override public boolean isNullable() { return getChildren().get(0).isNullable(); } }
@Override public boolean isNullable() { return getChildren().get(0).isNullable(); } }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression expression = getChildren().get(0); if (!expression.evaluate(tuple, ptr)) { return false; } String inputString = (String) PVarchar.INSTANCE.toObject(ptr, expression.getSortOrder()); if (LOG.isTraceEnabled()) { LOG.trace("CollationKey inputString: " + inputString); } if (inputString == null) { return true; } byte[] collationKeyByteArray = collator.getCollationKey(inputString).toByteArray(); if (LOG.isTraceEnabled()) { LOG.trace("CollationKey bytes: " + VarBinaryFormatter.INSTANCE.format(collationKeyByteArray)); } ptr.set(collationKeyByteArray); return true; }
@Override public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression expression = getChildren().get(0); if (!expression.evaluate(tuple, ptr)) { return false; } String inputString = (String) PVarchar.INSTANCE.toObject(ptr, expression.getSortOrder()); if (LOG.isTraceEnabled()) { LOG.trace("CollationKey inputString: " + inputString); } if (inputString == null) { return true; } byte[] collationKeyByteArray = collator.getCollationKey(inputString).toByteArray(); if (LOG.isTraceEnabled()) { LOG.trace("CollationKey bytes: " + VarBinaryFormatter.INSTANCE.format(collationKeyByteArray)); } ptr.set(collationKeyByteArray); return true; }