Only full water blocks will freeze. However, flowing water will still hydrate nearby crops. So you can place a single block of water at one end of your trench, and it will hydrate all your crops, and it will never freeze because of the torch.
A pumpkin torch placed under a water block will also prevent it from freezing.
An added benefit of this system is that any items which fall in the water will be swept to one end for easy collection.
Taken to the logical conclusion you get this:
Only the four full water blocks (two in the middle of each row) can possibly freeze, and the pumpkin torches underneath them prevent that. The normal torches are only to prevent monsters spawning. The stone paths prevent animal spawns and are sunken so that you can wall-strafe to quickly harvest without accidentally walking on the crops.
This isn't a space-efficient or material-efficient farm layout, but once built it is very time-efficient and low-maintenance.