Support changing SQL join type in smart joins