Fix java.lang.ArrayIndexOutOfBoundsException for ValueSchema

Fix the java.lang.ArrayIndexOutOfBoundsException for ValueSchema and KeyValueSchema.
Apply this path,the select min or select max return the correct values,mabye this is helpful.
Thanks.