return full sample if size is less than k
added test for Query return size