Pumps are designed and manufactured to pump liquids.
Compressors are designed and manufactured to compress gases and vapors – which contributes a driving force and allows gas/vapor flow.
Pumps will never “pump” gas or vapor. Compresors cannot compress liquids without suffering mechanical damage.
If vapors are formed in a pump, cavitation DOES NOT OCCUR. You have an erroneous idea of what cavitation is and how it behaves. Cavitation is a sequence of actions: a liquid is vaporized into bubbles these are subsequently “imploded” by a downstream increase (or recovery) in pressure. Physical damage and noise are the result of these implosions. What you are asking has nothing to do with cavitation in a pump.
Additionally, a centrifugal compressor is certainly not like a centrifugal pump. They may look alike on the outside, but their design and mechanical actions are totally different. A centrifugal pump does not employ a diffuser. A centrifugal compressor depends on a diffuser.
You want to know “what will happen if only gas enters a centrifugal pump”? Absolutely nothing --- as it should.