| 799 | ) |
| 800 | |
| 801 | def self_group(self, against: Optional[OperatorType] = None) -> ClauseElement: # type: ignore[override] # noqa E501 |
| 802 | # for the moment, we are parenthesizing all array-returning |
| 803 | # expressions against getitem. This may need to be made |
| 804 | # more portable if in the future we support other DBs |
| 805 | # besides postgresql. |
| 806 | if against is operators.getitem and isinstance( |
| 807 | self.type, sqltypes.ARRAY |
| 808 | ): |
| 809 | return Grouping(self) |
| 810 | else: |
| 811 | return super().self_group(against=against) |
| 812 | |
| 813 | @property |
| 814 | def entity_namespace(self) -> _EntityNamespace: |