@@ -173,9 +173,9 @@ void querySummaryIsTruncated() {
173173 String result = SqlStatementSanitizer .create (true ).sanitize (sql .toString ()).getQuerySummary ();
174174 assertThat (result ).isNotNull ();
175175 assertThat (result .length ()).isLessThanOrEqualTo (255 );
176- // For implicit join (comma-separated tables), mainIdentifier is null so only first table is in
177- // summary
178- assertThat (result ).isEqualTo ("SELECT very_long_table_name_0" );
176+ // Implicit join (comma-separated tables) should include all table names in the summary
177+ // but truncated at 255 characters
178+ assertThat (result ).startsWith ("SELECT very_long_table_name_0 very_long_table_name_1 " );
179179 }
180180
181181 private static Stream <Arguments > sqlArgs () {
@@ -341,11 +341,21 @@ private static Stream<Arguments> simplifyArgs() {
341341 Arguments .of (
342342 "select col from table where col in (select * from anotherTable)" ,
343343 expect ("SELECT" , null , "SELECT table SELECT anotherTable" )),
344- Arguments .of ("select col from table1, table2" , expect ("SELECT" , null , "SELECT table1" )),
345344 Arguments .of (
346- "select col from table1 t1 , table2 t2 " , expect ("SELECT" , null , "SELECT table1" )),
345+ "select col from table1, table2" , expect ("SELECT" , null , "SELECT table1 table2 " )),
347346 Arguments .of (
348- "select col from table1 as t1, table2 as t2" , expect ("SELECT" , null , "SELECT table1" )),
347+ "select col from table1 t1, table2 t2" , expect ("SELECT" , null , "SELECT table1 table2" )),
348+ Arguments .of (
349+ "select col from table1 as t1, table2 as t2" ,
350+ expect ("SELECT" , null , "SELECT table1 table2" )),
351+ // Example from semantic conventions: multiple tables in FROM clause
352+ Arguments .of (
353+ "SELECT * FROM songs, artists WHERE songs.artist_id = artists.id" ,
354+ expect (
355+ "SELECT * FROM songs, artists WHERE songs.artist_id = artists.id" ,
356+ "SELECT" ,
357+ null ,
358+ "SELECT songs artists" )),
349359 Arguments .of (
350360 "select col from table where col in (1, 2, 3)" ,
351361 expect ("select col from table where col in (?)" , "SELECT" , "table" , "SELECT table" )),
0 commit comments