The characters combine literally and powerfully: “On the verge of being thirsty, (one starts to) dig a well.” The sequence of events is illogical—the preparation (digging) should come long before the need (thirst). This makes the metaphorical meaning immediately clear.