fixed schema inference
adde groupby test