Fix FIXME in is_dummy_plan_walker() and also refactor the code a bit. (#6830)
Fix FIXME in is_dummy_plan_walker() and also refactor the code a bit. (#6830)

For LockRows node, if its outer plan is dummy then there will be no
row for locking and thus it could be dummy.

Reviewed-by: Heikki Linnakangas <9304c20251d03f4d84fc732cc8196e9ef6638e64@pivotal.io>
xinzweb/gpdb,xinzweb/gpdb,xinzweb/gpdb,jmcatamney/gpdb,xinzweb/gpdb,xinzweb/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,lisakowen/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,adam8157/gpdb,jmcatamney/gpdb,adam8157/gpdb,ashwinstar/gpdb,50wu/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,lisakowen/gpdb,xinzweb/gpdb,adam8157/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,lisakowen/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,50wu/gpdb,jmcatamney/gpdb,50wu/gpdb,50wu/gpdb