22 smallest and 46 tallest is pretty risky unless you know exactly what you're doing. That's a difference of 24T
You need to keep into account that the rear mech has a limited capability. For most long cage mechs it's 43T.
If you have a 24T difference between the extremes at the front, that leaves only 19T difference at the back (43-24=19).
Most cassettes however have a 21 or 23T difference, which would push your total to 45 or 47T, or more than a long cage mech can handle.
Sure, you could ride it perfectly fine, but if you aren't careful and put it on too extreme of a gear, you run the risk of destroying the mech.