| 748 | return None, None |
| 749 | |
| 750 | def warn(self, stmt_type="SELECT"): |
| 751 | the_rest, start_with = self.lint() |
| 752 | |
| 753 | # FROMS left over? boom |
| 754 | if the_rest: |
| 755 | froms = the_rest |
| 756 | if froms: |
| 757 | template = ( |
| 758 | "{stmt_type} statement has a cartesian product between " |
| 759 | "FROM element(s) {froms} and " |
| 760 | 'FROM element "{start}". Apply join condition(s) ' |
| 761 | "between each element to resolve." |
| 762 | ) |
| 763 | froms_str = ", ".join( |
| 764 | f'"{self.froms[from_]}"' for from_ in froms |
| 765 | ) |
| 766 | message = template.format( |
| 767 | stmt_type=stmt_type, |
| 768 | froms=froms_str, |
| 769 | start=self.froms[start_with], |
| 770 | ) |
| 771 | |
| 772 | util.warn(message) |
| 773 | |
| 774 | |
| 775 | class Compiled: |