diff --git a/tools/check_sql_modules.py b/tools/check_sql_modules.py index 0911e64162..222266748b 100755 --- a/tools/check_sql_modules.py +++ b/tools/check_sql_modules.py @@ -86,10 +86,6 @@ def main(): f"{len(parsed.table_views)} tables/views, " f"{len(parsed.macros)} macros.") - tables_with_id_cols = {} - for _, _, m in modules: - tables_with_id_cols.update(m.id_columns) - all_errors = 0 for path, sql, parsed in modules: errors = [] @@ -130,22 +126,6 @@ def main(): f"Modules from package 'android' can't include '{include.module}' " f"from package 'chrome'") - # Validate JOINID type. - # Verify if the JOINID references an ID column of a table. - for o in parsed.table_views: - for c, arg in o.joinid_cols.items(): - [tab, id_col] = arg.joinid_column.split('.') - if tab not in tables_with_id_cols.keys(): - errors.append( - f"JOINID column '{c}' of '{o.name}' references table '{tab}' that doesn't exist." - ) - continue - if id_col not in tables_with_id_cols[tab]: - errors.append( - f"JOINID column '{c}' of '{o.name}' references ID column '{id_col}' in '{tab}' that doesn't exist." - ) - continue - errors += [ *parsed.errors, *check_banned_words(sql), *check_banned_create_table_as(sql), *check_banned_create_view_as(sql),