I guess you would still get some buds, but you wouldn't be able to see the plants real potential due to it being very stressed. You'd probably get like 2-4 grams of low quality bud, it's worth having space for the roots as it would probably be better at showing you the desirable traits you're looking for. The root system is what enables the plant to grow nice "flowers or fruit", if you've ever kept a tomato plant in a tiny pot it'll produce stunted weird-colored tomatoes that taste like crap lol.