So add another constructor that is a copy constructor (just so you don't have to re-create the array again) where you pass in the PhooenixArray to clone and the byteSize. Then in UpsertCompiler, there's a coerce call that should pass through the maxLength from the column. In that case, you'll want to clone the array you have and include the maxLength. In addition, in the isCoercible check (or maybe it's something like isSizeCompatible) you'd want to confirm that you don't have any values longer than the maxLength. Then you can use the maxLength when you serialize the array.