Skip to content

Instantly share code, notes, and snippets.

@d
Created April 19, 2017 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d/4831630abd8287420942e7efd074260d to your computer and use it in GitHub Desktop.
Save d/4831630abd8287420942e7efd074260d to your computer and use it in GitHub Desktop.
A reading of GPDB before a big bang merge of SEMI JOIN from 84 (e006a24ad152b3faec748afe8c1ff0829699b2e6)

We need to keep our diff here, maybe?

  1. costsize.c
  • join_in_selectivity
  • set_joinrel_size_estimates

Things changed here: joinpath.c

  • hash_inner_and_outer is split into two: 0. hashclauses_for_join which takes the bulk of the upstream code; AND 0. hash_inner_and_outer which takes as input an extra list, originating from hashclauses_for_join

Non-trivial divergence:

  • adjust_appendrel_attrs_mutator
	modified:   src/backend/optimizer/prep/prepunion.c
	modified:   src/backend/optimizer/util/relnode.c
	modified:   src/backend/utils/adt/selfuncs.c
	modified:   src/include/nodes/nodes.h
	modified:   src/include/nodes/pg_list.h
	modified:   src/include/nodes/relation.h
	modified:   src/include/optimizer/subselect.h
	modified:   src/include/utils/selfuncs.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment