I missed this before, but you'll want to:
* use PDataType.BINARY if the child expressions data type is fixed width, otherwise use PDataType.VARBINARY.
* implement getByteSize() and getMaxLength() by having them return getExpression().getByteSize().

The PDataType.BINARY is for fixed width data, so the expression impl has to tell Phoenix what the fixed width is through those methods.