Doesnt exactly work that way
Unplugged will have extremely high resistance as its open loop circuit.
Plugged in if the knock sensor is faulty will give an abnormal reading also.
The ecu needs to see ~517kohm resistance otherwise it will think there is knock or a faulty sensor and trigger a safe mode or
Knock map