BUG/FIX: Fix dtype inference issue in query