The fixedWidth needs to passed into this function, as you can't always get it from the type. For example, a CHAR(5) is fixedWidth, but the type can't know what the width is. Instead, the expression knows - you can get it by doing a expression.getByteSize() and passing that in here.