@@ -2322,4 +2322,60 @@ var FunctionQueryTests = []QueryTest{
23222322 Query : "select extract(hour_minute from true)" ,
23232323 Expected : []sql.Row {{0 }},
23242324 },
2325+ {
2326+ Query : "select extract(microsecond from 0)" ,
2327+ Expected : []sql.Row {{0 }},
2328+ },
2329+ {
2330+ Query : "select extract(microsecond from false)" ,
2331+ Expected : []sql.Row {{0 }},
2332+ },
2333+ {
2334+ // https://github.com/dolthub/dolt/issues/10087
2335+ Skip : true ,
2336+ Query : "select extract(microsecond from true)" ,
2337+ Expected : []sql.Row {{0 }},
2338+ },
2339+ {
2340+ Query : "select extract(second from 0)" ,
2341+ Expected : []sql.Row {{0 }},
2342+ },
2343+ {
2344+ Query : "select extract(second from false)" ,
2345+ Expected : []sql.Row {{0 }},
2346+ },
2347+ {
2348+ // https://github.com/dolthub/dolt/issues/10087
2349+ Skip : true ,
2350+ Query : "select extract(second from true)" ,
2351+ Expected : []sql.Row {{1 }},
2352+ },
2353+ {
2354+ Query : "select extract(minute from 0)" ,
2355+ Expected : []sql.Row {{0 }},
2356+ },
2357+ {
2358+ Query : "select extract(minute from false)" ,
2359+ Expected : []sql.Row {{0 }},
2360+ },
2361+ {
2362+ // https://github.com/dolthub/dolt/issues/10087
2363+ Skip : true ,
2364+ Query : "select extract(minute from true)" ,
2365+ Expected : []sql.Row {{0 }},
2366+ },
2367+ {
2368+ Query : "select extract(hour from 0)" ,
2369+ Expected : []sql.Row {{0 }},
2370+ },
2371+ {
2372+ Query : "select extract(hour from false)" ,
2373+ Expected : []sql.Row {{0 }},
2374+ },
2375+ {
2376+ // https://github.com/dolthub/dolt/issues/10087
2377+ Skip : true ,
2378+ Query : "select extract(hour from true)" ,
2379+ Expected : []sql.Row {{0 }},
2380+ },
23252381}
0 commit comments