(
self,
text,
select,
compile_state,
inner_columns,
froms,
byfrom,
toplevel,
kwargs,
)
| 5258 | return froms |
| 5259 | |
| 5260 | def _compose_select_body( |
| 5261 | self, |
| 5262 | text, |
| 5263 | select, |
| 5264 | compile_state, |
| 5265 | inner_columns, |
| 5266 | froms, |
| 5267 | byfrom, |
| 5268 | toplevel, |
| 5269 | kwargs, |
| 5270 | ): |
| 5271 | text += ", ".join(inner_columns) |
| 5272 | |
| 5273 | if self.linting & COLLECT_CARTESIAN_PRODUCTS: |
| 5274 | from_linter = FromLinter({}, set()) |
| 5275 | warn_linting = self.linting & WARN_LINTING |
| 5276 | if toplevel: |
| 5277 | self.from_linter = from_linter |
| 5278 | else: |
| 5279 | from_linter = None |
| 5280 | warn_linting = False |
| 5281 | |
| 5282 | # adjust the whitespace for no inner columns, part of #9440, |
| 5283 | # so that a no-col SELECT comes out as "SELECT WHERE..." or |
| 5284 | # "SELECT FROM ...". |
| 5285 | # while it would be better to have built the SELECT starting string |
| 5286 | # without trailing whitespace first, then add whitespace only if inner |
| 5287 | # cols were present, this breaks compatibility with various custom |
| 5288 | # compilation schemes that are currently being tested. |
| 5289 | if not inner_columns: |
| 5290 | text = text.rstrip() |
| 5291 | |
| 5292 | if froms: |
| 5293 | text += " \nFROM " |
| 5294 | |
| 5295 | if select._hints: |
| 5296 | text += ", ".join( |
| 5297 | [ |
| 5298 | f._compiler_dispatch( |
| 5299 | self, |
| 5300 | asfrom=True, |
| 5301 | fromhints=byfrom, |
| 5302 | from_linter=from_linter, |
| 5303 | **kwargs, |
| 5304 | ) |
| 5305 | for f in froms |
| 5306 | ] |
| 5307 | ) |
| 5308 | else: |
| 5309 | text += ", ".join( |
| 5310 | [ |
| 5311 | f._compiler_dispatch( |
| 5312 | self, |
| 5313 | asfrom=True, |
| 5314 | from_linter=from_linter, |
| 5315 | **kwargs, |
| 5316 | ) |
| 5317 | for f in froms |
no test coverage detected