@@ -11788,6 +11788,10 @@ select * from t1 except (
1178811788 "insert into names values ('john', 'smith'), ('bob','burger')" ,
1178911789 },
1179011790 Assertions : []ScriptTestAssertion {
11791+ {
11792+ Query : "select true || false" ,
11793+ Expected : []sql.Row {{true }},
11794+ },
1179111795 {
1179211796 Query : "select '0' || '0'" ,
1179311797 Expected : []sql.Row {{false }},
@@ -11804,10 +11808,38 @@ select * from t1 except (
1180411808 Query : "select first_name || ' ' || last_name as full_name from names order by full_name" ,
1180511809 Expected : []sql.Row {{false }, {false }},
1180611810 },
11811+ {
11812+ Query : "select 1 + 2 || 3 + 4" ,
11813+ Expected : []sql.Row {{true }},
11814+ },
11815+ {
11816+ Query : "select true || 1 || 'abc'" ,
11817+ Expected : []sql.Row {{true }},
11818+ },
11819+ {
11820+ Query : "select (1 || 2) || (3 || 4)" ,
11821+ Expected : []sql.Row {{true }},
11822+ },
11823+ {
11824+ Query : "select (1 + 2) || (3 + 4)" ,
11825+ Expected : []sql.Row {{true }},
11826+ },
11827+ {
11828+ Query : "select ((1 || 2) || 3) || 4" ,
11829+ Expected : []sql.Row {{true }},
11830+ },
11831+ {
11832+ Query : "select ((1 + 2) || 3) + 4" ,
11833+ Expected : []sql.Row {{5 }},
11834+ },
1180711835 {
1180811836 Query : "SET SESSION sql_mode = CONCAT(@@SESSION.sql_mode, ',PIPES_AS_CONCAT');" ,
1180911837 Expected : []sql.Row {{types .NewOkResult (0 )}},
1181011838 },
11839+ {
11840+ Query : "select true || false" ,
11841+ Expected : []sql.Row {{"10" }},
11842+ },
1181111843 {
1181211844 Query : "select '0' || '0'" ,
1181311845 Expected : []sql.Row {{"00" }},
@@ -11824,6 +11856,30 @@ select * from t1 except (
1182411856 Query : "select first_name || ' ' || last_name as full_name from names order by full_name" ,
1182511857 Expected : []sql.Row {{"bob burger" }, {"john smith" }},
1182611858 },
11859+ {
11860+ Query : "select 1 + 2 || 3 + 4" ,
11861+ Expected : []sql.Row {{float64 (28 )}},
11862+ },
11863+ {
11864+ Query : "select true || 1 || 'abc'" ,
11865+ Expected : []sql.Row {{"11abc" }},
11866+ },
11867+ {
11868+ Query : "select (1 || 2) || (3 || 4)" ,
11869+ Expected : []sql.Row {{"1234" }},
11870+ },
11871+ {
11872+ Query : "select (1 + 2) || (3 + 4)" ,
11873+ Expected : []sql.Row {{"37" }},
11874+ },
11875+ {
11876+ Query : "select ((1 || 2) || 3) || 4" ,
11877+ Expected : []sql.Row {{"1234" }},
11878+ },
11879+ {
11880+ Query : "select ((1 + 2) || 3) + 4" ,
11881+ Expected : []sql.Row {{float64 (37 )}},
11882+ },
1182711883 },
1182811884 },
1182911885}
0 commit comments