Skip to content

Commit

Permalink
tp: Ban SELECT IMPORT in stdlib and metrics
Browse files Browse the repository at this point in the history
Bug:296397580
Bug:296388363
Change-Id: I4bf7d7b713b6f7abf916e0b80703515e59ff648d
  • Loading branch information
aMayzner committed Aug 29, 2023
1 parent 3500f14 commit 10dc645
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/generators/sql_processing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ def check_banned_words(sql: str, path: str) -> List[str]:
errors.append('CREATE_FUNCTION is deprecated in trace processor. '
'Use CREATE PERFETTO FUNCTION instead.\n'
f'Offending file: {path}')

if 'import(' in line.casefold():
errors.append('SELECT IMPORT is deprecated in trace processor. '
'Use INCLUDE PERFETTO MODULE instead.\n'
f'Offending file: {path}')
return errors


Expand Down

0 comments on commit 10dc645

Please sign in to comment.