Merge pull request #16442 from rohitwaghchaure/pos_query_code_cleanup

fix: Code cleanup