@@ -162,22 +162,22 @@ def single_distinct_select_statement?(o)
162162 ( ( p1 . respond_to? ( :distinct ) && p1 . distinct ) ||
163163 p1 . respond_to? ( :include? ) && p1 . include? ( 'DISTINCT' ) )
164164 end
165-
165+
166166 def windowed_single_distinct_select_statement? ( o )
167-
168- o . limit &&
169- o . offset &&
167+
168+ o . limit &&
169+ o . offset &&
170170 single_distinct_select_statement? ( o )
171171 end
172-
172+
173173 def single_distinct_select_everything_statement? ( o , a )
174- single_distinct_select_statement? ( o ) &&
174+ single_distinct_select_statement? ( o ) &&
175175 visit ( o . cores . first . projections . first , a ) . ends_with? ( ".*" )
176176 end
177-
177+
178178 def top_one_everything_for_through_join? ( o , a )
179- single_distinct_select_everything_statement? ( o , a ) &&
180- ( o . limit && !o . offset ) &&
179+ single_distinct_select_everything_statement? ( o , a ) &&
180+ ( o . limit && !o . offset ) &&
181181 join_in_select_statement? ( o )
182182 end
183183
@@ -195,9 +195,9 @@ def function_select_statement?(o)
195195
196196 def eager_limiting_select_statement? ( o , a )
197197 core = o . cores . first
198- single_distinct_select_statement? ( o ) &&
199- ( o . limit && !o . offset ) &&
200- core . groups . empty? &&
198+ single_distinct_select_statement? ( o ) &&
199+ ( o . limit && !o . offset ) &&
200+ core . groups . empty? &&
201201 !single_distinct_select_everything_statement? ( o , a )
202202 end
203203
@@ -213,7 +213,7 @@ def complex_count_sql?(o)
213213 o . limit &&
214214 !join_in_select_statement? ( o )
215215 end
216-
216+
217217 def select_primary_key_sql? ( o )
218218 core = o . cores . first
219219 return false if core . projections . size != 1
0 commit comments