Mostly you don't. If the process is "fast" (i.e., elapsed time less than a couple of seconds), then you can use the ideal gas law to calculate a new pressure and the adiabatic heat of compression to calculate the gas temperature. The problem is the water is such an enormous heat sink that you will be dumping heat from the gas from the first micro-second. That rate of heat transfer is indeterminate.
If the process takes more than a few seconds, then you can calculate the heat of compression, convert that to energy using the specific heat of the gas, transfer that heat in its entirety to the water and calculate a new water temp. Water temp will most likely go up by a small fraction of a degree.
In my GasBuster, I use inflow of water to compress gas about 5 compression ratios, and the CFD models that I had run do not show a measurable temperature increase because of the heat transfer into the water. In the field we cannot detect any temperature change during the process (and it is really fast).
David Simpson, PE
MuleShoe Engineering
"Belief" is the acceptance of an hypotheses in the absence of data.
"Prejudice" is having an opinion not supported by the preponderance of the data.
"Knowledge" is only found through the accumulation and analysis of data.
The plural of anecdote is not "data"