Skip to content

Commit 2e7e24a

Browse files
authored
Merge pull request #4 from mindsdb/fix-render-frame
Window function: add frame options to to_tree
2 parents 2adf8c8 + f8cbbba commit 2e7e24a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mindsdb_sql_parser/ast/select/operation.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,18 @@ def to_tree(self, *args, level=0, **kwargs):
123123
alias_str = f'\n{ind1}alias=' + self.alias.to_string()
124124
else:
125125
alias_str = ''
126+
127+
if self.modifier is not None:
128+
modifier_str = f'\n{ind1}modifier=' + self.modifier
129+
else:
130+
modifier_str = ''
131+
126132
return f'{ind}WindowFunction(\n' \
127133
f'{ind1}function=\n{fnc_str}' \
128134
f'{partition_str}' \
129135
f'{order_str}' \
130136
f'{alias_str}' \
137+
f'{modifier_str}' \
131138
f'\n{ind})'
132139

133140
def to_string(self, *args, **kwargs):

0 commit comments

Comments
 (0)