@@ -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,22 @@ 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" ,
348+ expect ("SELECT" , null , "SELECT table1 table2" )),
349+ Arguments .of (
350+ "select col from table1 as t1, table2 as t2" ,
351+ expect ("SELECT" , null , "SELECT table1 table2" )),
352+ // Example from semantic conventions: multiple tables in FROM clause
353+ Arguments .of (
354+ "SELECT * FROM songs, artists WHERE songs.artist_id = artists.id" ,
355+ expect (
356+ "SELECT * FROM songs, artists WHERE songs.artist_id = artists.id" ,
357+ "SELECT" ,
358+ null ,
359+ "SELECT songs artists" )),
349360 Arguments .of (
350361 "select col from table where col in (1, 2, 3)" ,
351362 expect ("select col from table where col in (?)" , "SELECT" , "table" , "SELECT table" )),
0 commit comments