Sayyiduna Umar (may Allah be pleased with him) said from the pulpit: I consider the person who asks about hypothetical issues to be sinful, because Allah Almighty has already explained that which is going to occur.
Hadith Takhrijاس اثر کی سند صحیح ہے۔ دیکھئے: [جامع بيان العلم 1807] ، [الفقيه والمتفقه 7/2] ، [فتح الباري 266/13]
Brief Explanation
(Commentary on Hadiths 123 to 126) The preceding narrations are from the eminent Companions (Sahabah kiram), and from them the censure of asking hypothetical questions becomes evident. From this narration, the certainty, trust, and understanding and insight (fahm wa firasat) of Sayyiduna Umar radi Allahu anhu are apparent: whatever is destined to occur, Allah Ta'ala has explained it clearly, and regarding that about which He remained silent and did not clarify, one should not even ask about it. This very point is made clear from «﴿يَاأَيُّهَاالَّذِينَآمَنُوالَاتَسْأَلُواعَنْأَشْيَاءَ﴾ [المائده : 101]» and the noble hadith: «دَعُونِيْمَاتَرَكْتُكُمْعَلَيْهِ.».