I had a tomato grow on the edge of the pond, just a seed dropped by a bird I guess, it did grow not as well as garden ones, it started too late in the season to produce flowers or fruit. Its roots were fully in the water, though some of them started above the water. They were anchored among the stones on the shore. I guess some of those dwarf, tumbler varieties could work, they are hungry plants though, it could look cool, sounds worth a try. I guess if you had the tumbler types they would need some support to stop it falling out.