Pls check my latest pull request.  I have added a test for CAST from VARCHAR to CHAR.  But i think in that case the neither coerceExpression has the maxLength nor the CHAR.getByteSize is not null.  We get NPE in that case.  How to handle then? I have handled all other cases and generally value would be null and we need to create the array object once again. 
Could you pls take a look at it?