add support for full outer join (fixes #15095)

This commit is contained in:
Benjamin Dauvergne 2017-02-22 01:36:38 +01:00
parent 09fc7cee35
commit 2634a2ade5
2 changed files with 4 additions and 3 deletions

View File

@ -108,7 +108,7 @@ def build_table_expression(join_tree, table_name, alias=None, top=True, other_co
if alias:
sql += ' AS "%s"' % alias
add_paren = False
for kind in ['left', 'inner', 'right']:
for kind in ['left', 'inner', 'right', 'full']:
joins = join_tree.get(table_name, {}).get(kind)
if not joins:
continue
@ -117,6 +117,7 @@ def build_table_expression(join_tree, table_name, alias=None, top=True, other_co
'inner': 'INNER JOIN',
'left': 'LEFT OUTER JOIN',
'right': 'RIGHT OUTER JOIN',
'full': 'FULL OUTER JOIN',
}
sql += ' %s ' % join_kinds[kind]
sub_joins = []

View File

@ -247,8 +247,8 @@ class Dimension(Base):
def join_kind(kind):
if kind not in ('inner', 'left', 'right'):
raise ValueError('bad joind kind: %s' % kind)
if kind not in ('inner', 'left', 'right', 'full'):
raise ValueError('bad join kind: %s' % kind)
return kind