File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,27 @@ def test_groupby(assert_query_gives_same_result):
111111 """
112112 )
113113
114+ assert_query_gives_same_result (
115+ """
116+ SELECT AVG(c)
117+ FROM df2
118+ """
119+ )
120+
121+
122+ def test_calc (assert_query_gives_same_result ):
123+ assert_query_gives_same_result (
124+ """
125+ SELECT
126+ a + b,
127+ a*b,
128+ a*5,
129+ a / user_id,
130+ user_id / a
131+ FROM df1
132+ """
133+ )
134+
114135
115136def test_filter (assert_query_gives_same_result ):
116137 assert_query_gives_same_result (
@@ -132,3 +153,43 @@ def test_filter(assert_query_gives_same_result):
132153 d NOT LIKE '%c'
133154 """
134155 )
156+
157+ assert_query_gives_same_result (
158+ """
159+ SELECT
160+ d
161+ FROM df2
162+ WHERE
163+ d = 'a'
164+ """
165+ )
166+
167+ assert_query_gives_same_result (
168+ """
169+ SELECT
170+ *
171+ FROM df1
172+ WHERE
173+ 1 < a AND a < 5
174+ """
175+ )
176+
177+ assert_query_gives_same_result (
178+ """
179+ SELECT
180+ *
181+ FROM df1
182+ WHERE
183+ a < 5 AND b < 5
184+ """
185+ )
186+
187+ assert_query_gives_same_result (
188+ """
189+ SELECT
190+ *
191+ FROM df1
192+ WHERE
193+ a + b > 5
194+ """
195+ )
You can’t perform that action at this time.
0 commit comments