diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query01.ans b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query01.ans index 17fdb82069..eef777c71d 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query01.ans +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query01.ans @@ -26,79 +26,79 @@ SET gp_external_enable_filter_pushdown = true; SET -- control - no predicates -SELECT * FROM test_filter; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - | 0 | t | 0.01 | AA | AA | No filter - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + | 0 | t | 0.01 | AA | AA | No filter + B | | f | 1.11 | BB | BB | No filter + C | 2 | | 2.21 | CC | CC | No filter + D | 3 | f | | DD | DD | No filter + E | 4 | t | 4.41 | | EE | No filter + F | 5 | f | 5.51 | FF | | No filter + G | 6 | t | 6.61 | GG | GG | No filter + H | 7 | f | 7.71 | HH | HH | No filter + I | 8 | t | 8.81 | II | II | No filter + J | 9 | f | 9.91 | JJ | JJ | No filter (10 rows) SET optimizer = off; SET -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------- - B | | f | 1.11 | BB | BB | a1o8a0c25s1dBo5l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------- + B | | f | 1.11 | BB | BB | a0c25s1dBo5a1o8l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o3a0c25s1dCo5l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o3l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------------------------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o5a1c23s2d10o5l1a0c25s1dCo5l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+--------------------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 - | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+--------------------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 + | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 (2 rows) -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 - D | 3 | f | | DD | DD | a2c16s4dtrueo0l2 - F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2 - H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2 - J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 + D | 3 | f | | DD | DD | a2c16s4dtrueo0l2 + F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2 + H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2 + J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2 (5 rows) SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; - t0 | a1 | filtervalue + t0 | a1 | filtervalue ----+----+------------------------------- D | 3 | a1c23s1d5o1a2c16s4dtrueo0l2l0 (1 row) SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; - round | filtervalue + round | filtervalue ---------+------------------------------- 1.73205 | a1c23s1d5o1a2c16s4dtrueo0l2l0 (1 row) SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; - round | filtervalue + round | filtervalue ---------+------------------ | a2c16s4dtrueo0l2 1.73205 | a2c16s4dtrueo0l2 @@ -107,674 +107,3341 @@ SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false 3.00000 | a2c16s4dtrueo0l2 (5 rows) -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+----+-----+----+--------------------------------------------- - D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 -(1 row) - -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------------------------- - B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - C | 2 | | 2.21 | CC | CC | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - | 0 | t | 0.01 | AA | AA | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+----+----+----+--------------------------------------------- + D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------------------------- + B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + C | 2 | | 2.21 | CC | CC | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + | 0 | t | 0.01 | AA | AA | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 (7 rows) -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0c25s1dCo1 -(1 row) - -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0c25s1dCo3 - C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 -(2 rows) - -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | a0c25s1dCo2 - E | 4 | t | 4.41 | | EE | a0c25s1dCo2 - F | 5 | f | 5.51 | FF | | a0c25s1dCo2 - G | 6 | t | 6.61 | GG | GG | a0c25s1dCo2 - H | 7 | f | 7.71 | HH | HH | a0c25s1dCo2 - I | 8 | t | 8.81 | II | II | a0c25s1dCo2 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0c25s1dCo1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0c25s1dCo3 + C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + D | 3 | f | | DD | DD | a0c25s1dCo2 + E | 4 | t | 4.41 | | EE | a0c25s1dCo2 + F | 5 | f | 5.51 | FF | | a0c25s1dCo2 + G | 6 | t | 6.61 | GG | GG | a0c25s1dCo2 + H | 7 | f | 7.71 | HH | HH | a0c25s1dCo2 + I | 8 | t | 8.81 | II | II | a0c25s1dCo2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 (7 rows) -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 - D | 3 | f | | DD | DD | a0c25s1dCo4 - E | 4 | t | 4.41 | | EE | a0c25s1dCo4 - F | 5 | f | 5.51 | FF | | a0c25s1dCo4 - G | 6 | t | 6.61 | GG | GG | a0c25s1dCo4 - H | 7 | f | 7.71 | HH | HH | a0c25s1dCo4 - I | 8 | t | 8.81 | II | II | a0c25s1dCo4 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 -(8 rows) - -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0c25s1dCo6 - D | 3 | f | | DD | DD | a0c25s1dCo6 - E | 4 | t | 4.41 | | EE | a0c25s1dCo6 - F | 5 | f | 5.51 | FF | | a0c25s1dCo6 - G | 6 | t | 6.61 | GG | GG | a0c25s1dCo6 - H | 7 | f | 7.71 | HH | HH | a0c25s1dCo6 - I | 8 | t | 8.81 | II | II | a0c25s1dCo6 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 -(8 rows) - -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 -(1 row) - -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter -(8 rows) - -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------- - C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 - D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 -(2 rows) - -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 + D | 3 | f | | DD | DD | a0c25s1dCo4 + E | 4 | t | 4.41 | | EE | a0c25s1dCo4 + F | 5 | f | 5.51 | FF | | a0c25s1dCo4 + G | 6 | t | 6.61 | GG | GG | a0c25s1dCo4 + H | 7 | f | 7.71 | HH | HH | a0c25s1dCo4 + I | 8 | t | 8.81 | II | II | a0c25s1dCo4 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0c25s1dCo6 + D | 3 | f | | DD | DD | a0c25s1dCo6 + E | 4 | t | 4.41 | | EE | a0c25s1dCo6 + F | 5 | f | 5.51 | FF | | a0c25s1dCo6 + G | 6 | t | 6.61 | GG | GG | a0c25s1dCo6 + H | 7 | f | 7.71 | HH | HH | a0c25s1dCo6 + I | 8 | t | 8.81 | II | II | a0c25s1dCo6 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a0c25s2dC%o7l2 + D | 3 | f | | DD | DD | a0c25s2dC%o7l2 + E | 4 | t | 4.41 | | EE | a0c25s2dC%o7l2 + F | 5 | f | 5.51 | FF | | a0c25s2dC%o7l2 + G | 6 | t | 6.61 | GG | GG | a0c25s2dC%o7l2 + H | 7 | f | 7.71 | HH | HH | a0c25s2dC%o7l2 + I | 8 | t | 8.81 | II | II | a0c25s2dC%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s2dC%o7l2 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------- + C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 + D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a0m1009s1dCs1dDo10l2 + E | 4 | t | 4.41 | | EE | a0m1009s1dCs1dDo10l2 + F | 5 | f | 5.51 | FF | | a0m1009s1dCs1dDo10l2 + G | 6 | t | 6.61 | GG | GG | a0m1009s1dCs1dDo10l2 + H | 7 | f | 7.71 | HH | HH | a0m1009s1dCs1dDo10l2 + I | 8 | t | 8.81 | II | II | a0m1009s1dCs1dDo10l2 + J | 9 | f | 9.91 | JJ | JJ | a0m1009s1dCs1dDo10l2 (7 rows) -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 - C | 2 | | 2.21 | CC | CC | a0c25s1dBo4a0c25s1dDo3l0 - D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 + C | 2 | | 2.21 | CC | CC | a0c25s1dBo4a0c25s1dDo3l0 + D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 (3 rows) -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 - F | 5 | f | 5.51 | FF | | a0c25s1dBo1a0c25s1dDo2l1 - G | 6 | t | 6.61 | GG | GG | a0c25s1dBo1a0c25s1dDo2l1 - H | 7 | f | 7.71 | HH | HH | a0c25s1dBo1a0c25s1dDo2l1 - I | 8 | t | 8.81 | II | II | a0c25s1dBo1a0c25s1dDo2l1 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 + F | 5 | f | 5.51 | FF | | a0c25s1dBo1a0c25s1dDo2l1 + G | 6 | t | 6.61 | GG | GG | a0c25s1dBo1a0c25s1dDo2l1 + H | 7 | f | 7.71 | HH | HH | a0c25s1dBo1a0c25s1dDo2l1 + I | 8 | t | 8.81 | II | II | a0c25s1dBo1a0c25s1dDo2l1 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 (6 rows) -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - | 0 | t | 0.01 | AA | AA | a0o8 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + | 0 | t | 0.01 | AA | AA | a0o8 (1 row) -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0o9 - C | 2 | | 2.21 | CC | CC | a0o9 - D | 3 | f | | DD | DD | a0o9 - E | 4 | t | 4.41 | | EE | a0o9 - F | 5 | f | 5.51 | FF | | a0o9 - G | 6 | t | 6.61 | GG | GG | a0o9 - H | 7 | f | 7.71 | HH | HH | a0o9 - I | 8 | t | 8.81 | II | II | a0o9 - J | 9 | f | 9.91 | JJ | JJ | a0o9 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0o9 + C | 2 | | 2.21 | CC | CC | a0o9 + D | 3 | f | | DD | DD | a0o9 + E | 4 | t | 4.41 | | EE | a0o9 + F | 5 | f | 5.51 | FF | | a0o9 + G | 6 | t | 6.61 | GG | GG | a0o9 + H | 7 | f | 7.71 | HH | HH | a0o9 + I | 8 | t | 8.81 | II | II | a0o9 + J | 9 | f | 9.91 | JJ | JJ | a0o9 (9 rows) -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 -(1 row) - -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 -(1 row) - -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 - | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 -(2 rows) - -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | a1c23s1d2o2 - E | 4 | t | 4.41 | | EE | a1c23s1d2o2 - F | 5 | f | 5.51 | FF | | a1c23s1d2o2 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o2 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o2 - I | 8 | t | 8.81 | II | II | a1c23s1d2o2 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 + | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + D | 3 | f | | DD | DD | a1c23s1d2o2 + E | 4 | t | 4.41 | | EE | a1c23s1d2o2 + F | 5 | f | 5.51 | FF | | a1c23s1d2o2 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o2 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o2 + I | 8 | t | 8.81 | II | II | a1c23s1d2o2 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 (7 rows) -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 - D | 3 | f | | DD | DD | a1c23s1d2o4 - E | 4 | t | 4.41 | | EE | a1c23s1d2o4 - F | 5 | f | 5.51 | FF | | a1c23s1d2o4 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o4 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o4 - I | 8 | t | 8.81 | II | II | a1c23s1d2o4 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 -(8 rows) - -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | a1c23s1d2o6 - E | 4 | t | 4.41 | | EE | a1c23s1d2o6 - F | 5 | f | 5.51 | FF | | a1c23s1d2o6 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o6 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o6 - I | 8 | t | 8.81 | II | II | a1c23s1d2o6 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o6 - | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 -(8 rows) - -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------- - C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 - D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 -(2 rows) - -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 + D | 3 | f | | DD | DD | a1c23s1d2o4 + E | 4 | t | 4.41 | | EE | a1c23s1d2o4 + F | 5 | f | 5.51 | FF | | a1c23s1d2o4 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o4 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o4 + I | 8 | t | 8.81 | II | II | a1c23s1d2o4 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + D | 3 | f | | DD | DD | a1c23s1d2o6 + E | 4 | t | 4.41 | | EE | a1c23s1d2o6 + F | 5 | f | 5.51 | FF | | a1c23s1d2o6 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o6 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o6 + I | 8 | t | 8.81 | II | II | a1c23s1d2o6 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o6 + | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------- + C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 + D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + E | 4 | t | 4.41 | | EE | a1m1007s1d2s1d3o10l2 + F | 5 | f | 5.51 | FF | | a1m1007s1d2s1d3o10l2 + G | 6 | t | 6.61 | GG | GG | a1m1007s1d2s1d3o10l2 + H | 7 | f | 7.71 | HH | HH | a1m1007s1d2s1d3o10l2 + I | 8 | t | 8.81 | II | II | a1m1007s1d2s1d3o10l2 + J | 9 | f | 9.91 | JJ | JJ | a1m1007s1d2s1d3o10l2 + | 0 | t | 0.01 | AA | AA | a1m1007s1d2s1d3o10l2 (7 rows) -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 - D | 3 | f | | DD | DD | a1c23s1d2o4a1c23s1d4o3l0 - E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 + D | 3 | f | | DD | DD | a1c23s1d2o4a1c23s1d4o3l0 + E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 (3 rows) -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o1a1c23s1d4o2l1 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o1a1c23s1d4o2l1 - I | 8 | t | 8.81 | II | II | a1c23s1d2o1a1c23s1d4o2l1 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o1a1c23s1d4o2l1 - | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o1a1c23s1d4o2l1 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o1a1c23s1d4o2l1 + I | 8 | t | 8.81 | II | II | a1c23s1d2o1a1c23s1d4o2l1 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o1a1c23s1d4o2l1 + | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 (6 rows) -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a1o8 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a1o8 (1 row) -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1o9 - D | 3 | f | | DD | DD | a1o9 - E | 4 | t | 4.41 | | EE | a1o9 - F | 5 | f | 5.51 | FF | | a1o9 - G | 6 | t | 6.61 | GG | GG | a1o9 - H | 7 | f | 7.71 | HH | HH | a1o9 - I | 8 | t | 8.81 | II | II | a1o9 - J | 9 | f | 9.91 | JJ | JJ | a1o9 - | 0 | t | 0.01 | AA | AA | a1o9 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1o9 + D | 3 | f | | DD | DD | a1o9 + E | 4 | t | 4.41 | | EE | a1o9 + F | 5 | f | 5.51 | FF | | a1o9 + G | 6 | t | 6.61 | GG | GG | a1o9 + H | 7 | f | 7.71 | HH | HH | a1o9 + I | 8 | t | 8.81 | II | II | a1o9 + J | 9 | f | 9.91 | JJ | JJ | a1o9 + | 0 | t | 0.01 | AA | AA | a1o9 (9 rows) -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 -(1 row) - -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 -(1 row) - -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 -(2 rows) - -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o2 - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o2 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o2 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o2 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o2 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o2 + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o2 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o2 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o2 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o2 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 (7 rows) -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4 - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o4 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o4 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o4 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o4 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 -(8 rows) - -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o6 - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o6 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o6 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o6 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o6 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o6 - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 -(8 rows) - -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter -(2 rows) - -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4 + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o4 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o4 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o4 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o4 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o6 + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o6 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o6 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o6 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o6 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o6 + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a3m1231s4d1.11s4d2.21o10 + C | 2 | | 2.21 | CC | CC | a3m1231s4d1.11s4d2.21o10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + E | 4 | t | 4.41 | | EE | a3m1231s4d1.11s4d2.21o10l2 + F | 5 | f | 5.51 | FF | | a3m1231s4d1.11s4d2.21o10l2 + G | 6 | t | 6.61 | GG | GG | a3m1231s4d1.11s4d2.21o10l2 + H | 7 | f | 7.71 | HH | HH | a3m1231s4d1.11s4d2.21o10l2 + I | 8 | t | 8.81 | II | II | a3m1231s4d1.11s4d2.21o10l2 + J | 9 | f | 9.91 | JJ | JJ | a3m1231s4d1.11s4d2.21o10l2 + | 0 | t | 0.01 | AA | AA | a3m1231s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------------------------ - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------------------ + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+----+-----+----+------------- - D | 3 | f | | DD | DD | a3o8 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+----+----+----+------------- + D | 3 | f | | DD | DD | a3o8 (1 row) -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a3o9 - C | 2 | | 2.21 | CC | CC | a3o9 - E | 4 | t | 4.41 | | EE | a3o9 - F | 5 | f | 5.51 | FF | | a3o9 - G | 6 | t | 6.61 | GG | GG | a3o9 - H | 7 | f | 7.71 | HH | HH | a3o9 - I | 8 | t | 8.81 | II | II | a3o9 - J | 9 | f | 9.91 | JJ | JJ | a3o9 - | 0 | t | 0.01 | AA | AA | a3o9 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a3o9 + C | 2 | | 2.21 | CC | CC | a3o9 + E | 4 | t | 4.41 | | EE | a3o9 + F | 5 | f | 5.51 | FF | | a3o9 + G | 6 | t | 6.61 | GG | GG | a3o9 + H | 7 | f | 7.71 | HH | HH | a3o9 + I | 8 | t | 8.81 | II | II | a3o9 + J | 9 | f | 9.91 | JJ | JJ | a3o9 + | 0 | t | 0.01 | AA | AA | a3o9 (9 rows) -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+----------------- - B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+----------------- + B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 (1 row) -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 - | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 + | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 - D | 3 | f | | DD | DD | a4c1042s2dBBo2 - F | 5 | f | 5.51 | FF | | a4c1042s2dBBo2 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo2 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo2 - I | 8 | t | 8.81 | II | II | a4c1042s2dBBo2 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 + D | 3 | f | | DD | DD | a4c1042s2dBBo2 + F | 5 | f | 5.51 | FF | | a4c1042s2dBBo2 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo2 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo2 + I | 8 | t | 8.81 | II | II | a4c1042s2dBBo2 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 - C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo4 - D | 3 | f | | DD | DD | a4c1042s2dBBo4 - F | 5 | f | 5.51 | FF | | a4c1042s2dBBo4 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo4 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo4 - I | 8 | t | 8.81 | II | II | a4c1042s2dBBo4 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 -(8 rows) - -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 - D | 3 | f | | DD | DD | a4c1042s2dBBo6 - F | 5 | f | 5.51 | FF | | a4c1042s2dBBo6 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo6 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo6 - I | 8 | t | 8.81 | II | II | a4c1042s2dBBo6 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo6 - | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 -(8 rows) - -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter -(1 row) - -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter -(8 rows) - -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter -(2 rows) - -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 + C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo4 + D | 3 | f | | DD | DD | a4c1042s2dBBo4 + F | 5 | f | 5.51 | FF | | a4c1042s2dBBo4 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo4 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo4 + I | 8 | t | 8.81 | II | II | a4c1042s2dBBo4 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 + D | 3 | f | | DD | DD | a4c1042s2dBBo6 + F | 5 | f | 5.51 | FF | | a4c1042s2dBBo6 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo6 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo6 + I | 8 | t | 8.81 | II | II | a4c1042s2dBBo6 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo6 + | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a4c25s2dB%o7 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c25s2dB%o7l2 + D | 3 | f | | DD | DD | a4c25s2dB%o7l2 + F | 5 | f | 5.51 | FF | | a4c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a4c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a4c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a4c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a4c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a4c25s2dB%o7l2 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a4m1014s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a4m1014s2dBBs2dCCo10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a4m1014s2dBBs2dCCo10l2 + F | 5 | f | 5.51 | FF | | a4m1014s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a4m1014s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a4m1014s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a4m1014s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a4m1014s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a4m1014s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------------- - B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 - C | 2 | | 2.21 | CC | CC | a4c1042s2dAAo4a4c1042s2dCCo3l0 - | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------------- + B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 + C | 2 | | 2.21 | CC | CC | a4c1042s2dAAo4a4c1042s2dCCo3l0 + | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------------- - D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 - F | 5 | f | 5.51 | FF | | a4c1042s2dAAo1a4c1042s2dCCo2l1 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dAAo1a4c1042s2dCCo2l1 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dAAo1a4c1042s2dCCo2l1 - I | 8 | t | 8.81 | II | II | a4c1042s2dAAo1a4c1042s2dCCo2l1 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------------- + D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 + F | 5 | f | 5.51 | FF | | a4c1042s2dAAo1a4c1042s2dCCo2l1 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dAAo1a4c1042s2dCCo2l1 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dAAo1a4c1042s2dCCo2l1 + I | 8 | t | 8.81 | II | II | a4c1042s2dAAo1a4c1042s2dCCo2l1 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- E | 4 | t | 4.41 | | EE | a4o8 (1 row) -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a4o9 - C | 2 | | 2.21 | CC | CC | a4o9 - D | 3 | f | | DD | DD | a4o9 - F | 5 | f | 5.51 | FF | | a4o9 - G | 6 | t | 6.61 | GG | GG | a4o9 - H | 7 | f | 7.71 | HH | HH | a4o9 - I | 8 | t | 8.81 | II | II | a4o9 - J | 9 | f | 9.91 | JJ | JJ | a4o9 - | 0 | t | 0.01 | AA | AA | a4o9 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a4o9 + C | 2 | | 2.21 | CC | CC | a4o9 + D | 3 | f | | DD | DD | a4o9 + F | 5 | f | 5.51 | FF | | a4o9 + G | 6 | t | 6.61 | GG | GG | a4o9 + H | 7 | f | 7.71 | HH | HH | a4o9 + I | 8 | t | 8.81 | II | II | a4o9 + J | 9 | f | 9.91 | JJ | JJ | a4o9 + | 0 | t | 0.01 | AA | AA | a4o9 (9 rows) -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dBBo5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 -(1 row) - -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dBBo3 - | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 -(2 rows) - -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 - D | 3 | f | | DD | DD | a5c25s2dBBo2 - E | 4 | t | 4.41 | | EE | a5c25s2dBBo2 - G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo2 - H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo2 - I | 8 | t | 8.81 | II | II | a5c25s2dBBo2 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dBBo3 + | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 + D | 3 | f | | DD | DD | a5c25s2dBBo2 + E | 4 | t | 4.41 | | EE | a5c25s2dBBo2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo2 + I | 8 | t | 8.81 | II | II | a5c25s2dBBo2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 +(7 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dBBo4 + C | 2 | | 2.21 | CC | CC | a5c25s2dBBo4 + D | 3 | f | | DD | DD | a5c25s2dBBo4 + E | 4 | t | 4.41 | | EE | a5c25s2dBBo4 + G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo4 + H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo4 + I | 8 | t | 8.81 | II | II | a5c25s2dBBo4 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 + D | 3 | f | | DD | DD | a5c25s2dBBo6 + E | 4 | t | 4.41 | | EE | a5c25s2dBBo6 + G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo6 + H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo6 + I | 8 | t | 8.81 | II | II | a5c25s2dBBo6 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo6 + | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dB%o7 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dB%o7l2 + D | 3 | f | | DD | DD | a5c25s2dB%o7l2 + E | 4 | t | 4.41 | | EE | a5c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a5c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a5c25s2dB%o7l2 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a5m1009s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a5m1009s2dBBs2dCCo10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a5m1009s2dBBs2dCCo10l2 + E | 4 | t | 4.41 | | EE | a5m1009s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a5m1009s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a5m1009s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a5m1009s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a5m1009s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a5m1009s2dBBs2dCCo10l2 +(7 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 + C | 2 | | 2.21 | CC | CC | a5c25s2dAAo4a5c25s2dCCo3l0 + | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 +(3 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 + E | 4 | t | 4.41 | | EE | a5c25s2dAAo1a5c25s2dCCo2l1 + G | 6 | t | 6.61 | GG | GG | a5c25s2dAAo1a5c25s2dCCo2l1 + H | 7 | f | 7.71 | HH | HH | a5c25s2dAAo1a5c25s2dCCo2l1 + I | 8 | t | 8.81 | II | II | a5c25s2dAAo1a5c25s2dCCo2l1 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 +(6 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + F | 5 | f | 5.51 | FF | | a5o8 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a5o9 + C | 2 | | 2.21 | CC | CC | a5o9 + D | 3 | f | | DD | DD | a5o9 + E | 4 | t | 4.41 | | EE | a5o9 + G | 6 | t | 6.61 | GG | GG | a5o9 + H | 7 | f | 7.71 | HH | HH | a5o9 + I | 8 | t | 8.81 | II | II | a5o9 + J | 9 | f | 9.91 | JJ | JJ | a5o9 + | 0 | t | 0.01 | AA | AA | a5o9 +(9 rows) + +-- test newly supported types +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; + x1 | filtervalue +----+----------------- + BB | a6c1042s3dBB o5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBCo1 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo3 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo2 + DD | a6c1042s2dBBo2 + EE | a6c1042s2dBBo2 + FF | a6c1042s2dBBo2 + GG | a6c1042s2dBBo2 + HH | a6c1042s2dBBo2 + II | a6c1042s2dBBo2 + JJ | a6c1042s2dBBo2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo4 + CC | a6c1042s2dBBo4 + DD | a6c1042s2dBBo4 + EE | a6c1042s2dBBo4 + FF | a6c1042s2dBBo4 + GG | a6c1042s2dBBo4 + HH | a6c1042s2dBBo4 + II | a6c1042s2dBBo4 + JJ | a6c1042s2dBBo4 +(9 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo6 + DD | a6c1042s2dBBo6 + EE | a6c1042s2dBBo6 + FF | a6c1042s2dBBo6 + GG | a6c1042s2dBBo6 + HH | a6c1042s2dBBo6 + II | a6c1042s2dBBo6 + JJ | a6c1042s2dBBo6 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+-------------- + BB | a6c25s2dB%o7 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c25s2dB%o7l2 + DD | a6c25s2dB%o7l2 + EE | a6c25s2dB%o7l2 + FF | a6c25s2dB%o7l2 + GG | a6c25s2dB%o7l2 + HH | a6c25s2dB%o7l2 + II | a6c25s2dB%o7l2 + JJ | a6c25s2dB%o7l2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+---------------------- + BB | a6m1014s2dBBs2dCCo10 + CC | a6m1014s2dBBs2dCCo10 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+------------------------ + DD | a6m1014s2dBBs2dCCo10l2 + EE | a6m1014s2dBBs2dCCo10l2 + FF | a6m1014s2dBBs2dCCo10l2 + GG | a6m1014s2dBBs2dCCo10l2 + HH | a6m1014s2dBBs2dCCo10l2 + II | a6m1014s2dBBs2dCCo10l2 + JJ | a6m1014s2dBBs2dCCo10l2 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + BB | a6c1042s2dAAo4a6c1042s2dCCo3l0 + CC | a6c1042s2dAAo4a6c1042s2dCCo3l0 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + DD | a6c1042s2dAAo1a6c1042s2dCCo2l1 + EE | a6c1042s2dAAo1a6c1042s2dCCo2l1 + FF | a6c1042s2dAAo1a6c1042s2dCCo2l1 + GG | a6c1042s2dAAo1a6c1042s2dCCo2l1 + HH | a6c1042s2dAAo1a6c1042s2dCCo2l1 + II | a6c1042s2dAAo1a6c1042s2dCCo2l1 + JJ | a6c1042s2dAAo1a6c1042s2dCCo2l1 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + | a6o8 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + BB | a6o9 + CC | a6o9 + DD | a6o9 + EE | a6o9 + FF | a6o9 + GG | a6o9 + HH | a6o9 + II | a6o9 + JJ | a6o9 +(9 rows) + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o5 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 0 | a7c21s1d2o1 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o3 + 0 | a7c21s1d2o3 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o2 + 4 | a7c21s1d2o2 + 5 | a7c21s1d2o2 + 6 | a7c21s1d2o2 + 7 | a7c21s1d2o2 + 8 | a7c21s1d2o2 + 9 | a7c21s1d2o2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o4 + 3 | a7c21s1d2o4 + 4 | a7c21s1d2o4 + 5 | a7c21s1d2o4 + 6 | a7c21s1d2o4 + 7 | a7c21s1d2o4 + 8 | a7c21s1d2o4 + 9 | a7c21s1d2o4 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o6 + 4 | a7c21s1d2o6 + 5 | a7c21s1d2o6 + 6 | a7c21s1d2o6 + 7 | a7c21s1d2o6 + 8 | a7c21s1d2o6 + 9 | a7c21s1d2o6 + 0 | a7c21s1d2o6 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+-------------------- + 2 | a7m1007s1d2s1d3o10 + 3 | a7m1007s1d2s1d3o10 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+---------------------- + 4 | a7m1005s1d2s1d3o10l2 + 5 | a7m1005s1d2s1d3o10l2 + 6 | a7m1005s1d2s1d3o10l2 + 7 | a7m1005s1d2s1d3o10l2 + 8 | a7m1005s1d2s1d3o10l2 + 9 | a7m1005s1d2s1d3o10l2 + 0 | a7m1005s1d2s1d3o10l2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 2 | a7c21s1d2o4a7c21s1d4o3l0 + 3 | a7c21s1d2o4a7c21s1d4o3l0 + 4 | a7c21s1d2o4a7c21s1d4o3l0 +(3 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 5 | a7c21s1d2o1a7c21s1d4o2l1 + 6 | a7c21s1d2o1a7c21s1d4o2l1 + 7 | a7c21s1d2o1a7c21s1d4o2l1 + 8 | a7c21s1d2o1a7c21s1d4o2l1 + 9 | a7c21s1d2o1a7c21s1d4o2l1 + 0 | a7c21s1d2o1a7c21s1d4o2l1 +(6 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + | a7o8 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7o9 + 3 | a7o9 + 4 | a7o9 + 5 | a7o9 + 6 | a7o9 + 7 | a7o9 + 8 | a7o9 + 9 | a7o9 + 0 | a7o9 +(9 rows) + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d1o5 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o1 + 0 | a8c20s1d2o1 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o3 + 0 | a8c20s1d2o3 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o2 + 4 | a8c20s1d2o2 + 5 | a8c20s1d2o2 + 6 | a8c20s1d2o2 + 7 | a8c20s1d2o2 + 8 | a8c20s1d2o2 + 9 | a8c20s1d2o2 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o4 + 4 | a8c20s1d2o4 + 5 | a8c20s1d2o4 + 6 | a8c20s1d2o4 + 7 | a8c20s1d2o4 + 8 | a8c20s1d2o4 + 9 | a8c20s1d2o4 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o6 + 3 | a8c20s1d2o6 + 4 | a8c20s1d2o6 + 5 | a8c20s1d2o6 + 6 | a8c20s1d2o6 + 7 | a8c20s1d2o6 + 8 | a8c20s1d2o6 + 9 | a8c20s1d2o6 + 0 | a8c20s1d2o6 +(9 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+-------------------- + 3 | a8m1016s1d2s1d3o10 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+---------------------- + 1 | a8m1016s1d2s1d3o10l2 + 4 | a8m1016s1d2s1d3o10l2 + 5 | a8m1016s1d2s1d3o10l2 + 6 | a8m1016s1d2s1d3o10l2 + 7 | a8m1016s1d2s1d3o10l2 + 8 | a8m1016s1d2s1d3o10l2 + 9 | a8m1016s1d2s1d3o10l2 + 0 | a8m1016s1d2s1d3o10l2 +(8 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 3 | a8c20s1d2o4a8c20s1d4o3l0 + 4 | a8c20s1d2o4a8c20s1d4o3l0 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 1 | a8c20s1d2o1a8c20s1d4o2l1 + 5 | a8c20s1d2o1a8c20s1d4o2l1 + 6 | a8c20s1d2o1a8c20s1d4o2l1 + 7 | a8c20s1d2o1a8c20s1d4o2l1 + 8 | a8c20s1d2o1a8c20s1d4o2l1 + 9 | a8c20s1d2o1a8c20s1d4o2l1 + 0 | a8c20s1d2o1a8c20s1d4o2l1 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + | a8o8 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8o9 + 3 | a8o9 + 4 | a8o9 + 5 | a8o9 + 6 | a8o9 + 7 | a8o9 + 8 | a8o9 + 9 | a8o9 + 0 | a8o9 +(9 rows) + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o5 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 0.01 | a9c700s4d1.11o1 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o3 + 0.01 | a9c700s4d1.11o3 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o2 + 4.41 | a9c700s4d1.11o2 + 5.51 | a9c700s4d1.11o2 + 6.61 | a9c700s4d1.11o2 + 7.71 | a9c700s4d1.11o2 + 8.81 | a9c700s4d1.11o2 + 9.91 | a9c700s4d1.11o2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o4 + 2.21 | a9c700s4d1.11o4 + 4.41 | a9c700s4d1.11o4 + 5.51 | a9c700s4d1.11o4 + 6.61 | a9c700s4d1.11o4 + 7.71 | a9c700s4d1.11o4 + 8.81 | a9c700s4d1.11o4 + 9.91 | a9c700s4d1.11o4 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o6 + 4.41 | a9c700s4d1.11o6 + 5.51 | a9c700s4d1.11o6 + 6.61 | a9c700s4d1.11o6 + 7.71 | a9c700s4d1.11o6 + 8.81 | a9c700s4d1.11o6 + 9.91 | a9c700s4d1.11o6 + 0.01 | a9c700s4d1.11o6 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+-------------------------- + 1.11 | a9m1021s4d1.11s4d2.21o10 + 2.21 | a9m1021s4d1.11s4d2.21o10 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------- + 4.41 | a9m1021s4d1.11s4d2.21o10l2 + 5.51 | a9m1021s4d1.11s4d2.21o10l2 + 6.61 | a9m1021s4d1.11s4d2.21o10l2 + 7.71 | a9m1021s4d1.11s4d2.21o10l2 + 8.81 | a9m1021s4d1.11s4d2.21o10l2 + 9.91 | a9m1021s4d1.11s4d2.21o10l2 + 0.01 | a9m1021s4d1.11s4d2.21o10l2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 1.11 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 2.21 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 4.41 | a9c700s4d1.11o4a9c700s4d4.41o3l0 +(3 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 5.51 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 6.61 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 7.71 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 8.81 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 9.91 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 0.01 | a9c700s4d1.11o1a9c700s4d4.41o2l1 +(6 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; + x4 | filtervalue +----+------------- + | a9o8 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + x4 | filtervalue +------+------------- + 1.11 | a9o9 + 2.21 | a9o9 + 4.41 | a9o9 + 5.51 | a9o9 + 6.61 | a9o9 + 7.71 | a9o9 + 8.81 | a9o9 + 9.91 | a9o9 + 0.01 | a9o9 +(9 rows) + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o5 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 0.01 | a10c701s4d1.11o1 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o3 + 0.01 | a10c701s4d1.11o3 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o2 + 3.31 | a10c701s4d1.11o2 + 5.51 | a10c701s4d1.11o2 + 6.61 | a10c701s4d1.11o2 + 7.71 | a10c701s4d1.11o2 + 8.81 | a10c701s4d1.11o2 + 9.91 | a10c701s4d1.11o2 (7 rows) -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dBBo4 - C | 2 | | 2.21 | CC | CC | a5c25s2dBBo4 - D | 3 | f | | DD | DD | a5c25s2dBBo4 - E | 4 | t | 4.41 | | EE | a5c25s2dBBo4 - G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo4 - H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo4 - I | 8 | t | 8.81 | II | II | a5c25s2dBBo4 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 -(8 rows) - -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 - D | 3 | f | | DD | DD | a5c25s2dBBo6 - E | 4 | t | 4.41 | | EE | a5c25s2dBBo6 - G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo6 - H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo6 - I | 8 | t | 8.81 | II | II | a5c25s2dBBo6 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo6 - | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 -(8 rows) - -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dB%o7 -(1 row) - -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter -(8 rows) - -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter -(2 rows) - -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o4 + 2.21 | a10c701s4d1.11o4 + 3.31 | a10c701s4d1.11o4 + 5.51 | a10c701s4d1.11o4 + 6.61 | a10c701s4d1.11o4 + 7.71 | a10c701s4d1.11o4 + 8.81 | a10c701s4d1.11o4 + 9.91 | a10c701s4d1.11o4 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o6 + 3.31 | a10c701s4d1.11o6 + 5.51 | a10c701s4d1.11o6 + 6.61 | a10c701s4d1.11o6 + 7.71 | a10c701s4d1.11o6 + 8.81 | a10c701s4d1.11o6 + 9.91 | a10c701s4d1.11o6 + 0.01 | a10c701s4d1.11o6 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+--------------------------- + 1.11 | a10m1022s4d1.11s4d2.21o10 + 2.21 | a10m1022s4d1.11s4d2.21o10 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+----------------------------- + 3.31 | a10m1022s4d1.11s4d2.21o10l2 + 5.51 | a10m1022s4d1.11s4d2.21o10l2 + 6.61 | a10m1022s4d1.11s4d2.21o10l2 + 7.71 | a10m1022s4d1.11s4d2.21o10l2 + 8.81 | a10m1022s4d1.11s4d2.21o10l2 + 9.91 | a10m1022s4d1.11s4d2.21o10l2 + 0.01 | a10m1022s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------------------- - B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 - C | 2 | | 2.21 | CC | CC | a5c25s2dAAo4a5c25s2dCCo3l0 - | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 1.11 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 2.21 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 3.31 | a10c701s4d1.11o4a10c701s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------------------- - D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 - E | 4 | t | 4.41 | | EE | a5c25s2dAAo1a5c25s2dCCo2l1 - G | 6 | t | 6.61 | GG | GG | a5c25s2dAAo1a5c25s2dCCo2l1 - H | 7 | f | 7.71 | HH | HH | a5c25s2dAAo1a5c25s2dCCo2l1 - I | 8 | t | 8.81 | II | II | a5c25s2dAAo1a5c25s2dCCo2l1 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 5.51 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 6.61 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 7.71 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 8.81 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 9.91 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 0.01 | a10c701s4d1.11o1a10c701s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - F | 5 | f | 5.51 | FF | | a5o8 +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; + x5 | filtervalue +----+------------- + | a10o8 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + x5 | filtervalue +------+------------- + 1.11 | a10o9 + 2.21 | a10o9 + 3.31 | a10o9 + 5.51 | a10o9 + 6.61 | a10o9 + 7.71 | a10o9 + 8.81 | a10o9 + 9.91 | a10o9 + 0.01 | a10o9 +(9 rows) + +-- bytea +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------------ + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------- + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------- + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------ + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; + x6 | filtervalue +----+------------- + | a11o8 (1 row) -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a5o9 - C | 2 | | 2.21 | CC | CC | a5o9 - D | 3 | f | | DD | DD | a5o9 - E | 4 | t | 4.41 | | EE | a5o9 - G | 6 | t | 6.61 | GG | GG | a5o9 - H | 7 | f | 7.71 | HH | HH | a5o9 - I | 8 | t | 8.81 | II | II | a5o9 - J | 9 | f | 9.91 | JJ | JJ | a5o9 - | 0 | t | 0.01 | AA | AA | a5o9 +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------- + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 (9 rows) +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-11o5 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-12o1 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-12o3 + 2023-01-12 | a12c1082s10d2023-01-12o3 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-12 | a12c1082s10d2023-01-11o2 + 2023-01-13 | a12c1082s10d2023-01-11o2 + 2023-01-14 | a12c1082s10d2023-01-11o2 + 2023-01-15 | a12c1082s10d2023-01-11o2 + 2023-01-16 | a12c1082s10d2023-01-11o2 + 2023-01-17 | a12c1082s10d2023-01-11o2 + 2023-01-18 | a12c1082s10d2023-01-11o2 + 2023-01-19 | a12c1082s10d2023-01-11o2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-12 | a12c1082s10d2023-01-12o4 + 2023-01-13 | a12c1082s10d2023-01-12o4 + 2023-01-14 | a12c1082s10d2023-01-12o4 + 2023-01-15 | a12c1082s10d2023-01-12o4 + 2023-01-16 | a12c1082s10d2023-01-12o4 + 2023-01-17 | a12c1082s10d2023-01-12o4 + 2023-01-18 | a12c1082s10d2023-01-12o4 + 2023-01-19 | a12c1082s10d2023-01-12o4 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-15o6 + 2023-01-12 | a12c1082s10d2023-01-15o6 + 2023-01-13 | a12c1082s10d2023-01-15o6 + 2023-01-14 | a12c1082s10d2023-01-15o6 + 2023-01-16 | a12c1082s10d2023-01-15o6 + 2023-01-17 | a12c1082s10d2023-01-15o6 + 2023-01-18 | a12c1082s10d2023-01-15o6 + 2023-01-19 | a12c1082s10d2023-01-15o6 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+----------------------------------------- + 2023-01-12 | a12m1182s10d2023-01-12s10d2023-01-15o10 + 2023-01-15 | a12m1182s10d2023-01-12s10d2023-01-15o10 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+------------------------------------------- + 2023-01-11 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-12 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-13 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-14 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-16 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-17 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-18 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-19 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 2023-01-11 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-12 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-13 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-14 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-15 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-16 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-17 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-18 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-19 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 +(9 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 2023-01-14 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-15 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-16 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-17 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-18 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-19 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 +(6 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; + x7 | filtervalue +----+------------- + | a12o8 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + x7 | filtervalue +------------+------------- + 2023-01-11 | a12o9 + 2023-01-12 | a12o9 + 2023-01-13 | a12o9 + 2023-01-14 | a12o9 + 2023-01-15 | a12o9 + 2023-01-16 | a12o9 + 2023-01-17 | a12o9 + 2023-01-18 | a12o9 + 2023-01-19 | a12o9 +(9 rows) + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:50o5 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:52o1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o3 + 12:34:50 | a13c1083s8d12:34:52o3 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:51o2 + 12:34:53 | a13c1083s8d12:34:51o2 + 12:34:54 | a13c1083s8d12:34:51o2 + 12:34:55 | a13c1083s8d12:34:51o2 + 12:34:56 | a13c1083s8d12:34:51o2 + 12:34:57 | a13c1083s8d12:34:51o2 + 12:34:58 | a13c1083s8d12:34:51o2 + 12:34:59 | a13c1083s8d12:34:51o2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o4 + 12:34:53 | a13c1083s8d12:34:52o4 + 12:34:54 | a13c1083s8d12:34:52o4 + 12:34:55 | a13c1083s8d12:34:52o4 + 12:34:56 | a13c1083s8d12:34:52o4 + 12:34:57 | a13c1083s8d12:34:52o4 + 12:34:58 | a13c1083s8d12:34:52o4 + 12:34:59 | a13c1083s8d12:34:52o4 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:55o6 + 12:34:53 | a13c1083s8d12:34:55o6 + 12:34:54 | a13c1083s8d12:34:55o6 + 12:34:56 | a13c1083s8d12:34:55o6 + 12:34:57 | a13c1083s8d12:34:55o6 + 12:34:58 | a13c1083s8d12:34:55o6 + 12:34:59 | a13c1083s8d12:34:55o6 + 12:34:50 | a13c1083s8d12:34:55o6 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------------------- + 12:34:52 | a13m1183s8d12:34:52s8d12:34:55o10 + 12:34:55 | a13m1183s8d12:34:52s8d12:34:55o10 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+------------------------------------- + 12:34:52 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:53 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:54 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:56 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:57 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:58 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:59 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:50 | a13m1183s8d12:34:55s8d12:34:55o10l2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:52 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:53 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:54 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:55 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:56 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:57 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:58 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:59 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:50 | a13c1083s8d12:34:51o1a13c1083s8d12:34:59o2l1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; + x8 | filtervalue +----+------------- + | a13o8 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + x8 | filtervalue +----------+------------- + 12:34:52 | a13o9 + 12:34:53 | a13o9 + 12:34:54 | a13o9 + 12:34:55 | a13o9 + 12:34:56 | a13o9 + 12:34:57 | a13o9 + 12:34:58 | a13o9 + 12:34:59 | a13o9 + 12:34:50 | a13o9 +(9 rows) + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:50o5 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:52o1 + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:52o1 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:52o3 + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:52o3 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:55 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:51o2 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:55 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:52o4 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:55o6 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------------------------------- + 2023-01-01 12:34:55 | a14m1115s19d2023-01-01 12:34:52s19d2023-01-01 12:34:55o10 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +---------------------+------------------------------------------------------------- + 2023-01-01 12:34:51 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:53 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:54 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:56 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:57 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:58 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:59 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:50 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+---------------------------------------------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:55 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+---------------------------------------------------------------------- + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:51o1a14c1114s19d2023-01-01 12:34:59o2l1 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; + x9 | filtervalue +----+------------- + | a14o8 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + x9 | filtervalue +---------------------+------------- + 2023-01-01 12:34:51 | a14o9 + 2023-01-01 12:34:53 | a14o9 + 2023-01-01 12:34:54 | a14o9 + 2023-01-01 12:34:55 | a14o9 + 2023-01-01 12:34:56 | a14o9 + 2023-01-01 12:34:57 | a14o9 + 2023-01-01 12:34:58 | a14o9 + 2023-01-01 12:34:59 | a14o9 + 2023-01-01 12:34:50 | a14o9 +(9 rows) + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:30:00 | a16c1186s8d01:30:00o5 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:31:00 | a16c1186s8d01:35:00o1 + 01:32:00 | a16c1186s8d01:35:00o1 + 01:33:00 | a16c1186s8d01:35:00o1 + 01:30:00 | a16c1186s8d01:35:00o1 +(4 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:31:00 | a16c1186s8d01:36:00o3 + 01:32:00 | a16c1186s8d01:36:00o3 + 01:33:00 | a16c1186s8d01:36:00o3 + 01:35:00 | a16c1186s8d01:36:00o3 + 01:36:00 | a16c1186s8d01:36:00o3 + 01:30:00 | a16c1186s8d01:36:00o3 +(6 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:35:00 | a16c1186s8d01:33:00o2 + 01:36:00 | a16c1186s8d01:33:00o2 + 01:37:00 | a16c1186s8d01:33:00o2 + 01:38:00 | a16c1186s8d01:33:00o2 + 01:39:00 | a16c1186s8d01:33:00o2 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:35:00 | a16c1186s8d01:35:00o4 + 01:36:00 | a16c1186s8d01:35:00o4 + 01:37:00 | a16c1186s8d01:35:00o4 + 01:38:00 | a16c1186s8d01:35:00o4 + 01:39:00 | a16c1186s8d01:35:00o4 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:32:00 | a16c1186s8d01:31:00o6 + 01:33:00 | a16c1186s8d01:31:00o6 + 01:35:00 | a16c1186s8d01:31:00o6 + 01:36:00 | a16c1186s8d01:31:00o6 + 01:37:00 | a16c1186s8d01:31:00o6 + 01:38:00 | a16c1186s8d01:31:00o6 + 01:39:00 | a16c1186s8d01:31:00o6 + 01:30:00 | a16c1186s8d01:31:00o6 +(8 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------------------- + 01:33:00 | a16m1187s8d01:30:00s8d01:33:00o10 + 01:30:00 | a16m1187s8d01:30:00s8d01:33:00o10 +(2 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +----------+------------------------------------- + 01:31:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:32:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:35:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:36:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:37:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:38:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:39:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+---------------------------------------------- + 01:31:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:32:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:33:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:35:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:30:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+---------------------------------------------- + 01:32:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:33:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:35:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:36:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:37:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:38:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:39:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; + x11 | filtervalue +-----+------------- + | a16o8 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + x11 | filtervalue +----------+------------- + 01:31:00 | a16o9 + 01:32:00 | a16o9 + 01:33:00 | a16o9 + 01:35:00 | a16o9 + 01:36:00 | a16o9 + 01:37:00 | a16o9 + 01:38:00 | a16o9 + 01:39:00 | a16o9 + 01:30:00 | a16o9 +(9 rows) + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o5 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 +(8 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+--------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 +(2 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+----------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; + x12 | filtervalue +-----+------------- + | a17o8 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17o9 +(9 rows) + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; + x13 | filtervalue +-----+------------- + | a18o8 +(1 row) + +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + x13 | filtervalue +---------+------------- + {"a":1} | a18o9 + {"a":2} | a18o9 + {"a":3} | a18o9 + {"a":4} | a18o9 + {"a":5} | a18o9 + {"a":6} | a18o9 + {"a":7} | a18o9 + {"a":8} | a18o9 + {"a":9} | a18o9 +(9 rows) + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 0} | a19c3802s8d{a: 0}o5 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o1 + {"a": 0} | a19c3802s8d{a: 3}o1 +(2 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o3 + {"a": 3} | a19c3802s8d{a: 3}o3 + {"a": 0} | a19c3802s8d{a: 3}o3 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 1}o2 + {"a": 3} | a19c3802s8d{a: 1}o2 + {"a": 4} | a19c3802s8d{a: 1}o2 + {"a": 5} | a19c3802s8d{a: 1}o2 + {"a": 6} | a19c3802s8d{a: 1}o2 + {"a": 7} | a19c3802s8d{a: 1}o2 + {"a": 8} | a19c3802s8d{a: 1}o2 + {"a": 9} | a19c3802s8d{a: 1}o2 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 4} | a19c3802s8d{a: 4}o4 + {"a": 5} | a19c3802s8d{a: 4}o4 + {"a": 6} | a19c3802s8d{a: 4}o4 + {"a": 7} | a19c3802s8d{a: 4}o4 + {"a": 8} | a19c3802s8d{a: 4}o4 + {"a": 9} | a19c3802s8d{a: 4}o4 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 5}o6 + {"a": 3} | a19c3802s8d{a: 5}o6 + {"a": 4} | a19c3802s8d{a: 5}o6 + {"a": 6} | a19c3802s8d{a: 5}o6 + {"a": 7} | a19c3802s8d{a: 5}o6 + {"a": 8} | a19c3802s8d{a: 5}o6 + {"a": 9} | a19c3802s8d{a: 5}o6 + {"a": 0} | a19c3802s8d{a: 5}o6 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------- + {"a": 6} | a19m3807s8d{a: 6}s8d{a: 1}o10 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------------------- + {"a": 2} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 3} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 5} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 6} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 7} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 9} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 0} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 +(7 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 2} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 3} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 4} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 5} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 6} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 7} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 8} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 9} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 0} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; + x14 | filtervalue +-----+------------- + | a19o8 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + x14 | filtervalue +----------+------------- + {"a": 2} | a19o9 + {"a": 3} | a19o9 + {"a": 4} | a19o9 + {"a": 5} | a19o9 + {"a": 6} | a19o9 + {"a": 7} | a19o9 + {"a": 8} | a19o9 + {"a": 9} | a19o9 + {"a": 0} | a19o9 +(9 rows) + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; + x15 | filtervalue +-------+-------------------- + {0,1} | a20m1005s1d0s1d1o5 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; + x15 | filtervalue +--------+--------------------------- + {1,2} | a20m1005s1d0s1d1s4dNULLo6 + {3,4} | a20m1005s1d0s1d1s4dNULLo6 + {4,5} | a20m1005s1d0s1d1s4dNULLo6 + {5,6} | a20m1005s1d0s1d1s4dNULLo6 + {6,7} | a20m1005s1d0s1d1s4dNULLo6 + {7,8} | a20m1005s1d0s1d1s4dNULLo6 + {8,9} | a20m1005s1d0s1d1s4dNULLo6 + {9,10} | a20m1005s1d0s1d1s4dNULLo6 + {0,1} | a20m1005s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; + x15 | filtervalue +-----+------------- + | a20o8 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; + x15 | filtervalue +--------+------------- + {1,2} | a20o9 + {3,4} | a20o9 + {4,5} | a20o9 + {5,6} | a20o9 + {6,7} | a20o9 + {7,8} | a20o9 + {8,9} | a20o9 + {9,10} | a20o9 + {0,1} | a20o9 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); + x15 | filtervalue +-------+---------------------------------------- + {1,2} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 + {5,6} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 +(2 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + x15 | filtervalue +--------+---------------------------------------- + {0,1} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {1,2} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {3,4} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {6,7} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {7,8} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {8,9} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {9,10} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 +(7 rows) + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; + x16 | filtervalue +-------+-------------------- + {2,3} | a21m1007s1d2s1d3o5 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; + x16 | filtervalue +---------+--------------------------- + {3,4} | a21m1007s1d0s1d1s4dNULLo6 + {4,5} | a21m1007s1d0s1d1s4dNULLo6 + {6,7} | a21m1007s1d0s1d1s4dNULLo6 + {7,8} | a21m1007s1d0s1d1s4dNULLo6 + {8,9} | a21m1007s1d0s1d1s4dNULLo6 + {9,10} | a21m1007s1d0s1d1s4dNULLo6 + {10,11} | a21m1007s1d0s1d1s4dNULLo6 + {11,12} | a21m1007s1d0s1d1s4dNULLo6 + {2,3} | a21m1007s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; + x16 | filtervalue +-----+------------- + | a21o8 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; + x16 | filtervalue +---------+------------- + {3,4} | a21o9 + {4,5} | a21o9 + {6,7} | a21o9 + {7,8} | a21o9 + {8,9} | a21o9 + {9,10} | a21o9 + {10,11} | a21o9 + {11,12} | a21o9 + {2,3} | a21o9 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); + x16 | filtervalue +-------+---------------------------------------- + {2,3} | a21m1007s1d2s1d3o5a21m1007s1d5s1d6o5l1 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + x16 | filtervalue +---------+---------------------------------------- + {2,3} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {3,4} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {6,7} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {7,8} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {8,9} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {9,10} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {10,11} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {11,12} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 +(8 rows) + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; + x17 | filtervalue +-------+-------------------- + {4,5} | a22m1016s1d4s1d5o5 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; + x17 | filtervalue +---------+--------------------------- + {5,6} | a22m1016s1d5s1d4s4dNULLo6 + {6,7} | a22m1016s1d5s1d4s4dNULLo6 + {7,8} | a22m1016s1d5s1d4s4dNULLo6 + {9,10} | a22m1016s1d5s1d4s4dNULLo6 + {10,11} | a22m1016s1d5s1d4s4dNULLo6 + {11,12} | a22m1016s1d5s1d4s4dNULLo6 + {12,13} | a22m1016s1d5s1d4s4dNULLo6 + {13,14} | a22m1016s1d5s1d4s4dNULLo6 + {4,5} | a22m1016s1d5s1d4s4dNULLo6 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; + x17 | filtervalue +-----+------------- + | a22o8 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; + x17 | filtervalue +---------+------------- + {5,6} | a22o9 + {6,7} | a22o9 + {7,8} | a22o9 + {9,10} | a22o9 + {10,11} | a22o9 + {11,12} | a22o9 + {12,13} | a22o9 + {13,14} | a22o9 + {4,5} | a22o9 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +-------+---------------------------------------- + {4,5} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 + {5,6} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 +(2 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +---------+---------------------------------------- + {6,7} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {7,8} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {9,10} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {10,11} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {11,12} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {12,13} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {13,14} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 +(7 rows) + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 +(4 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; + x18 | filtervalue +-----+------------- + | a23o8 +(1 row) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; + x18 | filtervalue +------------+------------- + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 +(9 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 +(4 rows) + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; + x19 | filtervalue +-------+-------------------- + {B,B} | a24m1009s1dBs1dBo5 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; + x19 | filtervalue +-------+--------------------------- + {B,B} | a24m1009s1dAs1dAs4dNULLo6 + {C,C} | a24m1009s1dAs1dAs4dNULLo6 + {D,D} | a24m1009s1dAs1dAs4dNULLo6 + {E,E} | a24m1009s1dAs1dAs4dNULLo6 + {F,F} | a24m1009s1dAs1dAs4dNULLo6 + {G,G} | a24m1009s1dAs1dAs4dNULLo6 + {H,H} | a24m1009s1dAs1dAs4dNULLo6 + {I,I} | a24m1009s1dAs1dAs4dNULLo6 + {J,J} | a24m1009s1dAs1dAs4dNULLo6 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; + x19 | filtervalue +-----+------------- + | a24o8 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; + x19 | filtervalue +-------+------------- + {B,B} | a24o9 + {C,C} | a24o9 + {D,D} | a24o9 + {E,E} | a24o9 + {F,F} | a24o9 + {G,G} | a24o9 + {H,H} | a24o9 + {I,I} | a24o9 + {J,J} | a24o9 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dBs1dBo5a24m1009s1dAs1dAs4dNULLo5l1 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {C,C} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {D,D} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {E,E} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {F,F} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {G,G} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {H,H} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {I,I} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {J,J} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; + x20 | filtervalue +-----------+------------------------ + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; + x20 | filtervalue +-------------+--------------------------- + {3.1,4.1} | a25m1021s1d0s1d1s4dNULLo6 + {4.1,5.1} | a25m1021s1d0s1d1s4dNULLo6 + {5.1,6.1} | a25m1021s1d0s1d1s4dNULLo6 + {6.1,7.1} | a25m1021s1d0s1d1s4dNULLo6 + {7.1,8.1} | a25m1021s1d0s1d1s4dNULLo6 + {8.1,9.1} | a25m1021s1d0s1d1s4dNULLo6 + {9.1,10.1} | a25m1021s1d0s1d1s4dNULLo6 + {10.1,11.1} | a25m1021s1d0s1d1s4dNULLo6 + {1.1,2.1} | a25m1021s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; + x20 | filtervalue +-----+------------- + | a25o8 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; + x20 | filtervalue +-------------+------------- + {3.1,4.1} | a25o9 + {4.1,5.1} | a25o9 + {5.1,6.1} | a25o9 + {6.1,7.1} | a25o9 + {7.1,8.1} | a25o9 + {8.1,9.1} | a25o9 + {9.1,10.1} | a25o9 + {10.1,11.1} | a25o9 + {1.1,2.1} | a25o9 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5a25m1021s1d5s1d6o5l1 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {3.1,4.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {4.1,5.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {5.1,6.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {6.1,7.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {7.1,8.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {8.1,9.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {9.1,10.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {10.1,11.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 +(9 rows) + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; + x21 | filtervalue +-----------+------------------------ + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; + x21 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a26m1022s1d0s1d1s4dNULLo6 + {4.1,5.1} | a26m1022s1d0s1d1s4dNULLo6 + {5.1,6.1} | a26m1022s1d0s1d1s4dNULLo6 + {6.1,7.1} | a26m1022s1d0s1d1s4dNULLo6 + {7.1,8.1} | a26m1022s1d0s1d1s4dNULLo6 + {8.1,9.1} | a26m1022s1d0s1d1s4dNULLo6 + {9.1,10.1} | a26m1022s1d0s1d1s4dNULLo6 + {10.1,11.1} | a26m1022s1d0s1d1s4dNULLo6 + {1.1,2.1} | a26m1022s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; + x21 | filtervalue +-----+------------- + | a26o8 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; + x21 | filtervalue +-------------+------------- + {2.1,3.1} | a26o9 + {4.1,5.1} | a26o9 + {5.1,6.1} | a26o9 + {6.1,7.1} | a26o9 + {7.1,8.1} | a26o9 + {8.1,9.1} | a26o9 + {9.1,10.1} | a26o9 + {10.1,11.1} | a26o9 + {1.1,2.1} | a26o9 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5a26m1022s1d5s1d6o5l1 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {2.1,3.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {4.1,5.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {5.1,6.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {6.1,7.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {7.1,8.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {8.1,9.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {9.1,10.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {10.1,11.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 +(9 rows) + +-- bytea array +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+---------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+--------------------------------------------------------------- + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; + x22 | filtervalue +-----+------------- + | a27o8 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+------------- + {"\\x78343242","\\x78343342"} | a27o9 + {"\\x78343342","\\x78343442"} | a27o9 + {"\\x78343542","\\x78343642"} | a27o9 + {"\\x78343642","\\x78343742"} | a27o9 + {"\\x78343742","\\x78343842"} | a27o9 + {"\\x78343842","\\x78343942"} | a27o9 + {"\\x78343942","\\x78346142"} | a27o9 + {"\\x78346142","\\x78346242"} | a27o9 + {"\\x78343142","\\x78343242"} | a27o9 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+-------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5a27m1001s12d\x736461735ao5l1 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+------------------------------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 +(9 rows) + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; + x23 | filtervalue +---------+---------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; + x23 | filtervalue +---------+----------------------------- + {BB,BB} | a28m1014s2dABs2dABs4dNULLo6 + {CC,CC} | a28m1014s2dABs2dABs4dNULLo6 + {DD,DD} | a28m1014s2dABs2dABs4dNULLo6 + {FF,FF} | a28m1014s2dABs2dABs4dNULLo6 + {GG,GG} | a28m1014s2dABs2dABs4dNULLo6 + {HH,HH} | a28m1014s2dABs2dABs4dNULLo6 + {II,II} | a28m1014s2dABs2dABs4dNULLo6 + {JJ,JJ} | a28m1014s2dABs2dABs4dNULLo6 + {AA,AA} | a28m1014s2dABs2dABs4dNULLo6 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; + x23 | filtervalue +-----+------------- + | a28o8 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; + x23 | filtervalue +---------+------------- + {BB,BB} | a28o9 + {CC,CC} | a28o9 + {DD,DD} | a28o9 + {FF,FF} | a28o9 + {GG,GG} | a28o9 + {HH,HH} | a28o9 + {II,II} | a28o9 + {JJ,JJ} | a28o9 + {AA,AA} | a28o9 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5a28m1014s2dAAs2dABs4dNULLo5l1 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {BB,BB} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {CC,CC} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {DD,DD} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {FF,FF} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {GG,GG} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {HH,HH} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {II,II} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {JJ,JJ} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 +(9 rows) + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------- + {AA,66} | a29m1015s2dAAs2d66o5 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------------- + {BB,67} | a29m1015s2dBBs1dCs4dNULLo6 + {CC,68} | a29m1015s2dBBs1dCs4dNULLo6 + {DD,69} | a29m1015s2dBBs1dCs4dNULLo6 + {EE,70} | a29m1015s2dBBs1dCs4dNULLo6 + {GG,72} | a29m1015s2dBBs1dCs4dNULLo6 + {HH,73} | a29m1015s2dBBs1dCs4dNULLo6 + {II,74} | a29m1015s2dBBs1dCs4dNULLo6 + {JJ,75} | a29m1015s2dBBs1dCs4dNULLo6 + {AA,66} | a29m1015s2dBBs1dCs4dNULLo6 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; + x24 | filtervalue +-----+------------- + | a29o8 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; + x24 | filtervalue +---------+------------- + {BB,67} | a29o9 + {CC,68} | a29o9 + {DD,69} | a29o9 + {EE,70} | a29o9 + {GG,72} | a29o9 + {HH,73} | a29o9 + {II,74} | a29o9 + {JJ,75} | a29o9 + {AA,66} | a29o9 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); + x24 | filtervalue +---------+-------------------------------------------------- + {AA,66} | a29m1015s2dAAs2d66o5a29m1015s2dBBs1dBs4dNULLo5l1 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + x24 | filtervalue +---------+----------------------------------------------- + {AA,66} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {BB,67} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {CC,68} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {DD,69} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {EE,70} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {GG,72} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {HH,73} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {II,74} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {JJ,75} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+---------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+----------------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; + x25 | filtervalue +-----+------------- + | a30o8 +(1 row) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; + x25 | filtervalue +-------------------------+------------- + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 +(9 rows) + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; + x26 | filtervalue +-----+------------- + | a31o8 +(1 row) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 +(9 rows) + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; + x27 | filtervalue +-----------+------------------------ + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; + x27 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a32m1231s1d0s1d1s4dNULLo6 + {4.1,5.1} | a32m1231s1d0s1d1s4dNULLo6 + {5.1,6.1} | a32m1231s1d0s1d1s4dNULLo6 + {6.1,7.1} | a32m1231s1d0s1d1s4dNULLo6 + {7.1,8.1} | a32m1231s1d0s1d1s4dNULLo6 + {8.1,9.1} | a32m1231s1d0s1d1s4dNULLo6 + {9.1,10.1} | a32m1231s1d0s1d1s4dNULLo6 + {10.1,11.1} | a32m1231s1d0s1d1s4dNULLo6 + {1.1,2.1} | a32m1231s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; + x27 | filtervalue +-----+------------- + | a32o8 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; + x27 | filtervalue +-------------+------------- + {2.1,3.1} | a32o9 + {4.1,5.1} | a32o9 + {5.1,6.1} | a32o9 + {6.1,7.1} | a32o9 + {7.1,8.1} | a32o9 + {8.1,9.1} | a32o9 + {9.1,10.1} | a32o9 + {10.1,11.1} | a32o9 + {1.1,2.1} | a32o9 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5a32m1231s1d5s1d6o5l1 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {2.1,3.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {4.1,5.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {5.1,6.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {6.1,7.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {7.1,8.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {8.1,9.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {9.1,10.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {10.1,11.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 +(9 rows) + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; + x28 | filtervalue +---------------------+---------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; + x28 | filtervalue +---------------------+----------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; + x28 | filtervalue +-----+------------- + | a33o8 +(1 row) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; + x28 | filtervalue +---------------------+------------- + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); + x28 | filtervalue +---------------------+--------------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + x28 | filtervalue +---------------------+-------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 +(9 rows) + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; + x29 | filtervalue +-----------------------------------------------+---------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; + x29 | filtervalue +-----------------------------------------------+----------------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; + x29 | filtervalue +-----+------------- + | a34o8 +(1 row) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; + x29 | filtervalue +-----------------------------------------------+------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); + x29 | filtervalue +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + x29 | filtervalue +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 +(9 rows) + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; + x31 | filtervalue +---------------------+---------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; + x31 | filtervalue +---------------------+----------------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; + x31 | filtervalue +-----+------------- + | a36o8 +(1 row) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; + x31 | filtervalue +---------------------+------------- + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); + x31 | filtervalue +---------------------+--------------------------------------------------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + x31 | filtervalue +---------------------+--------------------------------------------------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 +(9 rows) + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; + x32 | filtervalue +-----+------------- + | a37o8 +(1 row) + +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + x32 | filtervalue +-----------------------------------------------+------------- + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 +(9 rows) + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; + x33 | filtervalue +----------------+--------------------- + {"{\"a\": 0}"} | a38m3807s8d{a: 0}o5 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; + x33 | filtervalue +----------------+---------------------------- + {"{\"a\": 1}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 0}"} | a38m3807s8d{a: 2}s4dNULLo6 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; + x33 | filtervalue +-----+------------- + | a38o8 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; + x33 | filtervalue +----------------+------------- + {"{\"a\": 1}"} | a38o9 + {"{\"a\": 3}"} | a38o9 + {"{\"a\": 4}"} | a38o9 + {"{\"a\": 5}"} | a38o9 + {"{\"a\": 6}"} | a38o9 + {"{\"a\": 7}"} | a38o9 + {"{\"a\": 8}"} | a38o9 + {"{\"a\": 9}"} | a38o9 + {"{\"a\": 0}"} | a38o9 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 0}"} | a38m3807s8d{a: 2}o5a38m3807s8d{a: 0}o5l1 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 1}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 +(8 rows) diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query02.ans b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query02.ans index 40697bc0bf..908d2fb385 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query02.ans +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/expected/query02.ans @@ -26,63 +26,63 @@ SET gp_external_enable_filter_pushdown = true; SET -- control - no predicates -SELECT * FROM test_filter; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - | 0 | t | 0.01 | AA | AA | No filter - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + | 0 | t | 0.01 | AA | AA | No filter + B | | f | 1.11 | BB | BB | No filter + C | 2 | | 2.21 | CC | CC | No filter + D | 3 | f | | DD | DD | No filter + E | 4 | t | 4.41 | | EE | No filter + F | 5 | f | 5.51 | FF | | No filter + G | 6 | t | 6.61 | GG | GG | No filter + H | 7 | f | 7.71 | HH | HH | No filter + I | 8 | t | 8.81 | II | II | No filter + J | 9 | f | 9.91 | JJ | JJ | No filter (10 rows) SET optimizer = on; SET -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------- - B | | f | 1.11 | BB | BB | a0c25s1dBo5a1o8l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------- + B | | f | 1.11 | BB | BB | a0c25s1dBo5a1o8l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o3l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+--------------------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 - | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+--------------------------------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 + | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 (2 rows) -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 - D | 3 | f | | DD | DD | a2c16s4dtrueo0l2 - F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2 - H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2 - J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 + D | 3 | f | | DD | DD | a2c16s4dtrueo0l2 + F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2 + H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2 + J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2 (5 rows) SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; @@ -107,674 +107,3341 @@ SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false 3.00000 | a2c16s4dtrueo0l2 (5 rows) -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+----+-----+----+--------------------------------------------- - D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 -(1 row) - -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------------------------- - B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - C | 2 | | 2.21 | CC | CC | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 - | 0 | t | 0.01 | AA | AA | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+----+----+----+--------------------------------------------- + D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------------------------- + B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + C | 2 | | 2.21 | CC | CC | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + F | 5 | f | 5.51 | FF | | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + H | 7 | f | 7.71 | HH | HH | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 + | 0 | t | 0.01 | AA | AA | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 (7 rows) -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0c25s1dCo1 -(1 row) - -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0c25s1dCo3 - C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 -(2 rows) - -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | a0c25s1dCo2 - E | 4 | t | 4.41 | | EE | a0c25s1dCo2 - F | 5 | f | 5.51 | FF | | a0c25s1dCo2 - G | 6 | t | 6.61 | GG | GG | a0c25s1dCo2 - H | 7 | f | 7.71 | HH | HH | a0c25s1dCo2 - I | 8 | t | 8.81 | II | II | a0c25s1dCo2 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0c25s1dCo1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0c25s1dCo3 + C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + D | 3 | f | | DD | DD | a0c25s1dCo2 + E | 4 | t | 4.41 | | EE | a0c25s1dCo2 + F | 5 | f | 5.51 | FF | | a0c25s1dCo2 + G | 6 | t | 6.61 | GG | GG | a0c25s1dCo2 + H | 7 | f | 7.71 | HH | HH | a0c25s1dCo2 + I | 8 | t | 8.81 | II | II | a0c25s1dCo2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 (7 rows) -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 - D | 3 | f | | DD | DD | a0c25s1dCo4 - E | 4 | t | 4.41 | | EE | a0c25s1dCo4 - F | 5 | f | 5.51 | FF | | a0c25s1dCo4 - G | 6 | t | 6.61 | GG | GG | a0c25s1dCo4 - H | 7 | f | 7.71 | HH | HH | a0c25s1dCo4 - I | 8 | t | 8.81 | II | II | a0c25s1dCo4 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 -(8 rows) - -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0c25s1dCo6 - D | 3 | f | | DD | DD | a0c25s1dCo6 - E | 4 | t | 4.41 | | EE | a0c25s1dCo6 - F | 5 | f | 5.51 | FF | | a0c25s1dCo6 - G | 6 | t | 6.61 | GG | GG | a0c25s1dCo6 - H | 7 | f | 7.71 | HH | HH | a0c25s1dCo6 - I | 8 | t | 8.81 | II | II | a0c25s1dCo6 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 -(8 rows) - -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 -(1 row) - -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter -(8 rows) - -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------- - C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 - D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 -(2 rows) - -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 + D | 3 | f | | DD | DD | a0c25s1dCo4 + E | 4 | t | 4.41 | | EE | a0c25s1dCo4 + F | 5 | f | 5.51 | FF | | a0c25s1dCo4 + G | 6 | t | 6.61 | GG | GG | a0c25s1dCo4 + H | 7 | f | 7.71 | HH | HH | a0c25s1dCo4 + I | 8 | t | 8.81 | II | II | a0c25s1dCo4 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0c25s1dCo6 + D | 3 | f | | DD | DD | a0c25s1dCo6 + E | 4 | t | 4.41 | | EE | a0c25s1dCo6 + F | 5 | f | 5.51 | FF | | a0c25s1dCo6 + G | 6 | t | 6.61 | GG | GG | a0c25s1dCo6 + H | 7 | f | 7.71 | HH | HH | a0c25s1dCo6 + I | 8 | t | 8.81 | II | II | a0c25s1dCo6 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a0c25s2dC%o7l2 + D | 3 | f | | DD | DD | a0c25s2dC%o7l2 + E | 4 | t | 4.41 | | EE | a0c25s2dC%o7l2 + F | 5 | f | 5.51 | FF | | a0c25s2dC%o7l2 + G | 6 | t | 6.61 | GG | GG | a0c25s2dC%o7l2 + H | 7 | f | 7.71 | HH | HH | a0c25s2dC%o7l2 + I | 8 | t | 8.81 | II | II | a0c25s2dC%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s2dC%o7l2 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------- + C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 + D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a0m1009s1dCs1dDo10l2 + E | 4 | t | 4.41 | | EE | a0m1009s1dCs1dDo10l2 + F | 5 | f | 5.51 | FF | | a0m1009s1dCs1dDo10l2 + G | 6 | t | 6.61 | GG | GG | a0m1009s1dCs1dDo10l2 + H | 7 | f | 7.71 | HH | HH | a0m1009s1dCs1dDo10l2 + I | 8 | t | 8.81 | II | II | a0m1009s1dCs1dDo10l2 + J | 9 | f | 9.91 | JJ | JJ | a0m1009s1dCs1dDo10l2 (7 rows) -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 - C | 2 | | 2.21 | CC | CC | a0c25s1dBo4a0c25s1dDo3l0 - D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 + C | 2 | | 2.21 | CC | CC | a0c25s1dBo4a0c25s1dDo3l0 + D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 (3 rows) -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 - F | 5 | f | 5.51 | FF | | a0c25s1dBo1a0c25s1dDo2l1 - G | 6 | t | 6.61 | GG | GG | a0c25s1dBo1a0c25s1dDo2l1 - H | 7 | f | 7.71 | HH | HH | a0c25s1dBo1a0c25s1dDo2l1 - I | 8 | t | 8.81 | II | II | a0c25s1dBo1a0c25s1dDo2l1 - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 + F | 5 | f | 5.51 | FF | | a0c25s1dBo1a0c25s1dDo2l1 + G | 6 | t | 6.61 | GG | GG | a0c25s1dBo1a0c25s1dDo2l1 + H | 7 | f | 7.71 | HH | HH | a0c25s1dBo1a0c25s1dDo2l1 + I | 8 | t | 8.81 | II | II | a0c25s1dBo1a0c25s1dDo2l1 + J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 (6 rows) -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - | 0 | t | 0.01 | AA | AA | a0o8 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + | 0 | t | 0.01 | AA | AA | a0o8 (1 row) -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a0o8l2 - C | 2 | | 2.21 | CC | CC | a0o8l2 - D | 3 | f | | DD | DD | a0o8l2 - E | 4 | t | 4.41 | | EE | a0o8l2 - F | 5 | f | 5.51 | FF | | a0o8l2 - G | 6 | t | 6.61 | GG | GG | a0o8l2 - H | 7 | f | 7.71 | HH | HH | a0o8l2 - I | 8 | t | 8.81 | II | II | a0o8l2 - J | 9 | f | 9.91 | JJ | JJ | a0o8l2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a0o9 + C | 2 | | 2.21 | CC | CC | a0o9 + D | 3 | f | | DD | DD | a0o9 + E | 4 | t | 4.41 | | EE | a0o9 + F | 5 | f | 5.51 | FF | | a0o9 + G | 6 | t | 6.61 | GG | GG | a0o9 + H | 7 | f | 7.71 | HH | HH | a0o9 + I | 8 | t | 8.81 | II | II | a0o9 + J | 9 | f | 9.91 | JJ | JJ | a0o9 (9 rows) -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 -(1 row) - -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 -(1 row) - -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 - | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 -(2 rows) - -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | a1c23s1d2o2 - E | 4 | t | 4.41 | | EE | a1c23s1d2o2 - F | 5 | f | 5.51 | FF | | a1c23s1d2o2 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o2 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o2 - I | 8 | t | 8.81 | II | II | a1c23s1d2o2 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 + | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + D | 3 | f | | DD | DD | a1c23s1d2o2 + E | 4 | t | 4.41 | | EE | a1c23s1d2o2 + F | 5 | f | 5.51 | FF | | a1c23s1d2o2 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o2 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o2 + I | 8 | t | 8.81 | II | II | a1c23s1d2o2 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 (7 rows) -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 - D | 3 | f | | DD | DD | a1c23s1d2o4 - E | 4 | t | 4.41 | | EE | a1c23s1d2o4 - F | 5 | f | 5.51 | FF | | a1c23s1d2o4 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o4 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o4 - I | 8 | t | 8.81 | II | II | a1c23s1d2o4 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 -(8 rows) - -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | a1c23s1d2o6 - E | 4 | t | 4.41 | | EE | a1c23s1d2o6 - F | 5 | f | 5.51 | FF | | a1c23s1d2o6 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o6 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o6 - I | 8 | t | 8.81 | II | II | a1c23s1d2o6 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o6 - | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 -(8 rows) - -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------- - C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 - D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 -(2 rows) - -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 + D | 3 | f | | DD | DD | a1c23s1d2o4 + E | 4 | t | 4.41 | | EE | a1c23s1d2o4 + F | 5 | f | 5.51 | FF | | a1c23s1d2o4 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o4 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o4 + I | 8 | t | 8.81 | II | II | a1c23s1d2o4 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + D | 3 | f | | DD | DD | a1c23s1d2o6 + E | 4 | t | 4.41 | | EE | a1c23s1d2o6 + F | 5 | f | 5.51 | FF | | a1c23s1d2o6 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o6 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o6 + I | 8 | t | 8.81 | II | II | a1c23s1d2o6 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o6 + | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------- + C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 + D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + E | 4 | t | 4.41 | | EE | a1m1007s1d2s1d3o10l2 + F | 5 | f | 5.51 | FF | | a1m1007s1d2s1d3o10l2 + G | 6 | t | 6.61 | GG | GG | a1m1007s1d2s1d3o10l2 + H | 7 | f | 7.71 | HH | HH | a1m1007s1d2s1d3o10l2 + I | 8 | t | 8.81 | II | II | a1m1007s1d2s1d3o10l2 + J | 9 | f | 9.91 | JJ | JJ | a1m1007s1d2s1d3o10l2 + | 0 | t | 0.01 | AA | AA | a1m1007s1d2s1d3o10l2 (7 rows) -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 - D | 3 | f | | DD | DD | a1c23s1d2o4a1c23s1d4o3l0 - E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 + D | 3 | f | | DD | DD | a1c23s1d2o4a1c23s1d4o3l0 + E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 (3 rows) -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------- - F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 - G | 6 | t | 6.61 | GG | GG | a1c23s1d2o1a1c23s1d4o2l1 - H | 7 | f | 7.71 | HH | HH | a1c23s1d2o1a1c23s1d4o2l1 - I | 8 | t | 8.81 | II | II | a1c23s1d2o1a1c23s1d4o2l1 - J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o1a1c23s1d4o2l1 - | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 + G | 6 | t | 6.61 | GG | GG | a1c23s1d2o1a1c23s1d4o2l1 + H | 7 | f | 7.71 | HH | HH | a1c23s1d2o1a1c23s1d4o2l1 + I | 8 | t | 8.81 | II | II | a1c23s1d2o1a1c23s1d4o2l1 + J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o1a1c23s1d4o2l1 + | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 (6 rows) -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a1o8 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a1o8 (1 row) -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | a1o8l2 - D | 3 | f | | DD | DD | a1o8l2 - E | 4 | t | 4.41 | | EE | a1o8l2 - F | 5 | f | 5.51 | FF | | a1o8l2 - G | 6 | t | 6.61 | GG | GG | a1o8l2 - H | 7 | f | 7.71 | HH | HH | a1o8l2 - I | 8 | t | 8.81 | II | II | a1o8l2 - J | 9 | f | 9.91 | JJ | JJ | a1o8l2 - | 0 | t | 0.01 | AA | AA | a1o8l2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + C | 2 | | 2.21 | CC | CC | a1o9 + D | 3 | f | | DD | DD | a1o9 + E | 4 | t | 4.41 | | EE | a1o9 + F | 5 | f | 5.51 | FF | | a1o9 + G | 6 | t | 6.61 | GG | GG | a1o9 + H | 7 | f | 7.71 | HH | HH | a1o9 + I | 8 | t | 8.81 | II | II | a1o9 + J | 9 | f | 9.91 | JJ | JJ | a1o9 + | 0 | t | 0.01 | AA | AA | a1o9 (9 rows) -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 -(1 row) - -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 -(1 row) - -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 -(2 rows) - -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o2 - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o2 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o2 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o2 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o2 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o2 + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o2 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o2 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o2 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o2 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 (7 rows) -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4 - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o4 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o4 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o4 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o4 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 -(8 rows) - -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------ - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o6 - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o6 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o6 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o6 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o6 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o6 - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 -(8 rows) - -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter -(2 rows) - -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4 + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o4 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o4 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o4 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o4 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------ + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o6 + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o6 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o6 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o6 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o6 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o6 + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a3m1231s4d1.11s4d2.21o10 + C | 2 | | 2.21 | CC | CC | a3m1231s4d1.11s4d2.21o10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + E | 4 | t | 4.41 | | EE | a3m1231s4d1.11s4d2.21o10l2 + F | 5 | f | 5.51 | FF | | a3m1231s4d1.11s4d2.21o10l2 + G | 6 | t | 6.61 | GG | GG | a3m1231s4d1.11s4d2.21o10l2 + H | 7 | f | 7.71 | HH | HH | a3m1231s4d1.11s4d2.21o10l2 + I | 8 | t | 8.81 | II | II | a3m1231s4d1.11s4d2.21o10l2 + J | 9 | f | 9.91 | JJ | JJ | a3m1231s4d1.11s4d2.21o10l2 + | 0 | t | 0.01 | AA | AA | a3m1231s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------------------------ - B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 - C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 - E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------------------ + B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 + C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 + E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------------------------------ - F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 - | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------------------ + F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + G | 6 | t | 6.61 | GG | GG | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + H | 7 | f | 7.71 | HH | HH | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + I | 8 | t | 8.81 | II | II | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 + | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+----+-----+----+------------- - D | 3 | f | | DD | DD | a3o8 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+----+----+----+------------- + D | 3 | f | | DD | DD | a3o8 (1 row) -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a3o8l2 - C | 2 | | 2.21 | CC | CC | a3o8l2 - E | 4 | t | 4.41 | | EE | a3o8l2 - F | 5 | f | 5.51 | FF | | a3o8l2 - G | 6 | t | 6.61 | GG | GG | a3o8l2 - H | 7 | f | 7.71 | HH | HH | a3o8l2 - I | 8 | t | 8.81 | II | II | a3o8l2 - J | 9 | f | 9.91 | JJ | JJ | a3o8l2 - | 0 | t | 0.01 | AA | AA | a3o8l2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a3o9 + C | 2 | | 2.21 | CC | CC | a3o9 + E | 4 | t | 4.41 | | EE | a3o9 + F | 5 | f | 5.51 | FF | | a3o9 + G | 6 | t | 6.61 | GG | GG | a3o9 + H | 7 | f | 7.71 | HH | HH | a3o9 + I | 8 | t | 8.81 | II | II | a3o9 + J | 9 | f | 9.91 | JJ | JJ | a3o9 + | 0 | t | 0.01 | AA | AA | a3o9 (9 rows) -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+----------------- - B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+----------------- + B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 (1 row) -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 - | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 + | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 - D | 3 | f | | DD | DD | a4c1042s2dBBo2 - F | 5 | f | 5.51 | FF | | a4c1042s2dBBo2 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo2 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo2 - I | 8 | t | 8.81 | II | II | a4c1042s2dBBo2 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 + D | 3 | f | | DD | DD | a4c1042s2dBBo2 + F | 5 | f | 5.51 | FF | | a4c1042s2dBBo2 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo2 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo2 + I | 8 | t | 8.81 | II | II | a4c1042s2dBBo2 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 - C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo4 - D | 3 | f | | DD | DD | a4c1042s2dBBo4 - F | 5 | f | 5.51 | FF | | a4c1042s2dBBo4 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo4 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo4 - I | 8 | t | 8.81 | II | II | a4c1042s2dBBo4 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 -(8 rows) - -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------- - C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 - D | 3 | f | | DD | DD | a4c1042s2dBBo6 - F | 5 | f | 5.51 | FF | | a4c1042s2dBBo6 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo6 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo6 - I | 8 | t | 8.81 | II | II | a4c1042s2dBBo6 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo6 - | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 -(8 rows) - -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter -(1 row) - -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter -(8 rows) - -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter -(2 rows) - -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 + C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo4 + D | 3 | f | | DD | DD | a4c1042s2dBBo4 + F | 5 | f | 5.51 | FF | | a4c1042s2dBBo4 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo4 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo4 + I | 8 | t | 8.81 | II | II | a4c1042s2dBBo4 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 + D | 3 | f | | DD | DD | a4c1042s2dBBo6 + F | 5 | f | 5.51 | FF | | a4c1042s2dBBo6 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dBBo6 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dBBo6 + I | 8 | t | 8.81 | II | II | a4c1042s2dBBo6 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo6 + | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a4c25s2dB%o7 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c25s2dB%o7l2 + D | 3 | f | | DD | DD | a4c25s2dB%o7l2 + F | 5 | f | 5.51 | FF | | a4c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a4c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a4c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a4c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a4c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a4c25s2dB%o7l2 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a4m1014s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a4m1014s2dBBs2dCCo10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a4m1014s2dBBs2dCCo10l2 + F | 5 | f | 5.51 | FF | | a4m1014s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a4m1014s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a4m1014s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a4m1014s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a4m1014s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a4m1014s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------------- - B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 - C | 2 | | 2.21 | CC | CC | a4c1042s2dAAo4a4c1042s2dCCo3l0 - | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------------- + B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 + C | 2 | | 2.21 | CC | CC | a4c1042s2dAAo4a4c1042s2dCCo3l0 + | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------------------------- - D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 - F | 5 | f | 5.51 | FF | | a4c1042s2dAAo1a4c1042s2dCCo2l1 - G | 6 | t | 6.61 | GG | GG | a4c1042s2dAAo1a4c1042s2dCCo2l1 - H | 7 | f | 7.71 | HH | HH | a4c1042s2dAAo1a4c1042s2dCCo2l1 - I | 8 | t | 8.81 | II | II | a4c1042s2dAAo1a4c1042s2dCCo2l1 - J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------------- + D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 + F | 5 | f | 5.51 | FF | | a4c1042s2dAAo1a4c1042s2dCCo2l1 + G | 6 | t | 6.61 | GG | GG | a4c1042s2dAAo1a4c1042s2dCCo2l1 + H | 7 | f | 7.71 | HH | HH | a4c1042s2dAAo1a4c1042s2dCCo2l1 + I | 8 | t | 8.81 | II | II | a4c1042s2dAAo1a4c1042s2dCCo2l1 + J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- E | 4 | t | 4.41 | | EE | a4o8 (1 row) -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a4o8l2 - C | 2 | | 2.21 | CC | CC | a4o8l2 - D | 3 | f | | DD | DD | a4o8l2 - F | 5 | f | 5.51 | FF | | a4o8l2 - G | 6 | t | 6.61 | GG | GG | a4o8l2 - H | 7 | f | 7.71 | HH | HH | a4o8l2 - I | 8 | t | 8.81 | II | II | a4o8l2 - J | 9 | f | 9.91 | JJ | JJ | a4o8l2 - | 0 | t | 0.01 | AA | AA | a4o8l2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a4o9 + C | 2 | | 2.21 | CC | CC | a4o9 + D | 3 | f | | DD | DD | a4o9 + F | 5 | f | 5.51 | FF | | a4o9 + G | 6 | t | 6.61 | GG | GG | a4o9 + H | 7 | f | 7.71 | HH | HH | a4o9 + I | 8 | t | 8.81 | II | II | a4o9 + J | 9 | f | 9.91 | JJ | JJ | a4o9 + | 0 | t | 0.01 | AA | AA | a4o9 (9 rows) -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dBBo5 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 -(1 row) - -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dBBo3 - | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 -(2 rows) - -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 - D | 3 | f | | DD | DD | a5c25s2dBBo2 - E | 4 | t | 4.41 | | EE | a5c25s2dBBo2 - G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo2 - H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo2 - I | 8 | t | 8.81 | II | II | a5c25s2dBBo2 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dBBo3 + | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 + D | 3 | f | | DD | DD | a5c25s2dBBo2 + E | 4 | t | 4.41 | | EE | a5c25s2dBBo2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo2 + I | 8 | t | 8.81 | II | II | a5c25s2dBBo2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 +(7 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dBBo4 + C | 2 | | 2.21 | CC | CC | a5c25s2dBBo4 + D | 3 | f | | DD | DD | a5c25s2dBBo4 + E | 4 | t | 4.41 | | EE | a5c25s2dBBo4 + G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo4 + H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo4 + I | 8 | t | 8.81 | II | II | a5c25s2dBBo4 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 + D | 3 | f | | DD | DD | a5c25s2dBBo6 + E | 4 | t | 4.41 | | EE | a5c25s2dBBo6 + G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo6 + H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo6 + I | 8 | t | 8.81 | II | II | a5c25s2dBBo6 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo6 + | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a5c25s2dB%o7 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dB%o7l2 + D | 3 | f | | DD | DD | a5c25s2dB%o7l2 + E | 4 | t | 4.41 | | EE | a5c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a5c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a5c25s2dB%o7l2 +(8 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a5m1009s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a5m1009s2dBBs2dCCo10 +(2 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a5m1009s2dBBs2dCCo10l2 + E | 4 | t | 4.41 | | EE | a5m1009s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a5m1009s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a5m1009s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a5m1009s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a5m1009s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a5m1009s2dBBs2dCCo10l2 +(7 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 + C | 2 | | 2.21 | CC | CC | a5c25s2dAAo4a5c25s2dCCo3l0 + | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 +(3 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 + E | 4 | t | 4.41 | | EE | a5c25s2dAAo1a5c25s2dCCo2l1 + G | 6 | t | 6.61 | GG | GG | a5c25s2dAAo1a5c25s2dCCo2l1 + H | 7 | f | 7.71 | HH | HH | a5c25s2dAAo1a5c25s2dCCo2l1 + I | 8 | t | 8.81 | II | II | a5c25s2dAAo1a5c25s2dCCo2l1 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 +(6 rows) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + F | 5 | f | 5.51 | FF | | a5o8 +(1 row) + +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------- + B | | f | 1.11 | BB | BB | a5o9 + C | 2 | | 2.21 | CC | CC | a5o9 + D | 3 | f | | DD | DD | a5o9 + E | 4 | t | 4.41 | | EE | a5o9 + G | 6 | t | 6.61 | GG | GG | a5o9 + H | 7 | f | 7.71 | HH | HH | a5o9 + I | 8 | t | 8.81 | II | II | a5o9 + J | 9 | f | 9.91 | JJ | JJ | a5o9 + | 0 | t | 0.01 | AA | AA | a5o9 +(9 rows) + +-- test newly supported types +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; + x1 | filtervalue +----+----------------- + BB | a6c1042s3dBB o5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBCo1 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo3 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo2 + DD | a6c1042s2dBBo2 + EE | a6c1042s2dBBo2 + FF | a6c1042s2dBBo2 + GG | a6c1042s2dBBo2 + HH | a6c1042s2dBBo2 + II | a6c1042s2dBBo2 + JJ | a6c1042s2dBBo2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo4 + CC | a6c1042s2dBBo4 + DD | a6c1042s2dBBo4 + EE | a6c1042s2dBBo4 + FF | a6c1042s2dBBo4 + GG | a6c1042s2dBBo4 + HH | a6c1042s2dBBo4 + II | a6c1042s2dBBo4 + JJ | a6c1042s2dBBo4 +(9 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo6 + DD | a6c1042s2dBBo6 + EE | a6c1042s2dBBo6 + FF | a6c1042s2dBBo6 + GG | a6c1042s2dBBo6 + HH | a6c1042s2dBBo6 + II | a6c1042s2dBBo6 + JJ | a6c1042s2dBBo6 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+-------------- + BB | a6c25s2dB%o7 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c25s2dB%o7l2 + DD | a6c25s2dB%o7l2 + EE | a6c25s2dB%o7l2 + FF | a6c25s2dB%o7l2 + GG | a6c25s2dB%o7l2 + HH | a6c25s2dB%o7l2 + II | a6c25s2dB%o7l2 + JJ | a6c25s2dB%o7l2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+---------------------- + BB | a6m1014s2dBBs2dCCo10 + CC | a6m1014s2dBBs2dCCo10 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+------------------------ + DD | a6m1014s2dBBs2dCCo10l2 + EE | a6m1014s2dBBs2dCCo10l2 + FF | a6m1014s2dBBs2dCCo10l2 + GG | a6m1014s2dBBs2dCCo10l2 + HH | a6m1014s2dBBs2dCCo10l2 + II | a6m1014s2dBBs2dCCo10l2 + JJ | a6m1014s2dBBs2dCCo10l2 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + BB | a6c1042s2dAAo4a6c1042s2dCCo3l0 + CC | a6c1042s2dAAo4a6c1042s2dCCo3l0 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + DD | a6c1042s2dAAo1a6c1042s2dCCo2l1 + EE | a6c1042s2dAAo1a6c1042s2dCCo2l1 + FF | a6c1042s2dAAo1a6c1042s2dCCo2l1 + GG | a6c1042s2dAAo1a6c1042s2dCCo2l1 + HH | a6c1042s2dAAo1a6c1042s2dCCo2l1 + II | a6c1042s2dAAo1a6c1042s2dCCo2l1 + JJ | a6c1042s2dAAo1a6c1042s2dCCo2l1 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + | a6o8 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + BB | a6o9 + CC | a6o9 + DD | a6o9 + EE | a6o9 + FF | a6o9 + GG | a6o9 + HH | a6o9 + II | a6o9 + JJ | a6o9 +(9 rows) + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o5 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 0 | a7c21s1d2o1 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o3 + 0 | a7c21s1d2o3 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o2 + 4 | a7c21s1d2o2 + 5 | a7c21s1d2o2 + 6 | a7c21s1d2o2 + 7 | a7c21s1d2o2 + 8 | a7c21s1d2o2 + 9 | a7c21s1d2o2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o4 + 3 | a7c21s1d2o4 + 4 | a7c21s1d2o4 + 5 | a7c21s1d2o4 + 6 | a7c21s1d2o4 + 7 | a7c21s1d2o4 + 8 | a7c21s1d2o4 + 9 | a7c21s1d2o4 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o6 + 4 | a7c21s1d2o6 + 5 | a7c21s1d2o6 + 6 | a7c21s1d2o6 + 7 | a7c21s1d2o6 + 8 | a7c21s1d2o6 + 9 | a7c21s1d2o6 + 0 | a7c21s1d2o6 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+-------------------- + 2 | a7m1007s1d2s1d3o10 + 3 | a7m1007s1d2s1d3o10 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+---------------------- + 4 | a7m1005s1d2s1d3o10l2 + 5 | a7m1005s1d2s1d3o10l2 + 6 | a7m1005s1d2s1d3o10l2 + 7 | a7m1005s1d2s1d3o10l2 + 8 | a7m1005s1d2s1d3o10l2 + 9 | a7m1005s1d2s1d3o10l2 + 0 | a7m1005s1d2s1d3o10l2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 2 | a7c21s1d2o4a7c21s1d4o3l0 + 3 | a7c21s1d2o4a7c21s1d4o3l0 + 4 | a7c21s1d2o4a7c21s1d4o3l0 +(3 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 5 | a7c21s1d2o1a7c21s1d4o2l1 + 6 | a7c21s1d2o1a7c21s1d4o2l1 + 7 | a7c21s1d2o1a7c21s1d4o2l1 + 8 | a7c21s1d2o1a7c21s1d4o2l1 + 9 | a7c21s1d2o1a7c21s1d4o2l1 + 0 | a7c21s1d2o1a7c21s1d4o2l1 +(6 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + | a7o8 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7o9 + 3 | a7o9 + 4 | a7o9 + 5 | a7o9 + 6 | a7o9 + 7 | a7o9 + 8 | a7o9 + 9 | a7o9 + 0 | a7o9 +(9 rows) + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d1o5 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o1 + 0 | a8c20s1d2o1 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o3 + 0 | a8c20s1d2o3 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o2 + 4 | a8c20s1d2o2 + 5 | a8c20s1d2o2 + 6 | a8c20s1d2o2 + 7 | a8c20s1d2o2 + 8 | a8c20s1d2o2 + 9 | a8c20s1d2o2 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o4 + 4 | a8c20s1d2o4 + 5 | a8c20s1d2o4 + 6 | a8c20s1d2o4 + 7 | a8c20s1d2o4 + 8 | a8c20s1d2o4 + 9 | a8c20s1d2o4 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o6 + 3 | a8c20s1d2o6 + 4 | a8c20s1d2o6 + 5 | a8c20s1d2o6 + 6 | a8c20s1d2o6 + 7 | a8c20s1d2o6 + 8 | a8c20s1d2o6 + 9 | a8c20s1d2o6 + 0 | a8c20s1d2o6 +(9 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+-------------------- + 3 | a8m1016s1d2s1d3o10 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+---------------------- + 1 | a8m1016s1d2s1d3o10l2 + 4 | a8m1016s1d2s1d3o10l2 + 5 | a8m1016s1d2s1d3o10l2 + 6 | a8m1016s1d2s1d3o10l2 + 7 | a8m1016s1d2s1d3o10l2 + 8 | a8m1016s1d2s1d3o10l2 + 9 | a8m1016s1d2s1d3o10l2 + 0 | a8m1016s1d2s1d3o10l2 +(8 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 3 | a8c20s1d2o4a8c20s1d4o3l0 + 4 | a8c20s1d2o4a8c20s1d4o3l0 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 1 | a8c20s1d2o1a8c20s1d4o2l1 + 5 | a8c20s1d2o1a8c20s1d4o2l1 + 6 | a8c20s1d2o1a8c20s1d4o2l1 + 7 | a8c20s1d2o1a8c20s1d4o2l1 + 8 | a8c20s1d2o1a8c20s1d4o2l1 + 9 | a8c20s1d2o1a8c20s1d4o2l1 + 0 | a8c20s1d2o1a8c20s1d4o2l1 (7 rows) -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dBBo4 - C | 2 | | 2.21 | CC | CC | a5c25s2dBBo4 - D | 3 | f | | DD | DD | a5c25s2dBBo4 - E | 4 | t | 4.41 | | EE | a5c25s2dBBo4 - G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo4 - H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo4 - I | 8 | t | 8.81 | II | II | a5c25s2dBBo4 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 -(8 rows) - -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 - D | 3 | f | | DD | DD | a5c25s2dBBo6 - E | 4 | t | 4.41 | | EE | a5c25s2dBBo6 - G | 6 | t | 6.61 | GG | GG | a5c25s2dBBo6 - H | 7 | f | 7.71 | HH | HH | a5c25s2dBBo6 - I | 8 | t | 8.81 | II | II | a5c25s2dBBo6 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo6 - | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 -(8 rows) - -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+-------------- - B | | f | 1.11 | BB | BB | a5c25s2dB%o7 -(1 row) - -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter -(8 rows) - -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter -(2 rows) - -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + | a8o8 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8o9 + 3 | a8o9 + 4 | a8o9 + 5 | a8o9 + 6 | a8o9 + 7 | a8o9 + 8 | a8o9 + 9 | a8o9 + 0 | a8o9 +(9 rows) + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o5 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 0.01 | a9c700s4d1.11o1 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o3 + 0.01 | a9c700s4d1.11o3 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o2 + 4.41 | a9c700s4d1.11o2 + 5.51 | a9c700s4d1.11o2 + 6.61 | a9c700s4d1.11o2 + 7.71 | a9c700s4d1.11o2 + 8.81 | a9c700s4d1.11o2 + 9.91 | a9c700s4d1.11o2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o4 + 2.21 | a9c700s4d1.11o4 + 4.41 | a9c700s4d1.11o4 + 5.51 | a9c700s4d1.11o4 + 6.61 | a9c700s4d1.11o4 + 7.71 | a9c700s4d1.11o4 + 8.81 | a9c700s4d1.11o4 + 9.91 | a9c700s4d1.11o4 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o6 + 4.41 | a9c700s4d1.11o6 + 5.51 | a9c700s4d1.11o6 + 6.61 | a9c700s4d1.11o6 + 7.71 | a9c700s4d1.11o6 + 8.81 | a9c700s4d1.11o6 + 9.91 | a9c700s4d1.11o6 + 0.01 | a9c700s4d1.11o6 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+-------------------------- + 1.11 | a9m1021s4d1.11s4d2.21o10 + 2.21 | a9m1021s4d1.11s4d2.21o10 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------- + 4.41 | a9m1021s4d1.11s4d2.21o10l2 + 5.51 | a9m1021s4d1.11s4d2.21o10l2 + 6.61 | a9m1021s4d1.11s4d2.21o10l2 + 7.71 | a9m1021s4d1.11s4d2.21o10l2 + 8.81 | a9m1021s4d1.11s4d2.21o10l2 + 9.91 | a9m1021s4d1.11s4d2.21o10l2 + 0.01 | a9m1021s4d1.11s4d2.21o10l2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 1.11 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 2.21 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 4.41 | a9c700s4d1.11o4a9c700s4d4.41o3l0 +(3 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 5.51 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 6.61 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 7.71 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 8.81 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 9.91 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 0.01 | a9c700s4d1.11o1a9c700s4d4.41o2l1 +(6 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; + x4 | filtervalue +----+------------- + | a9o8 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + x4 | filtervalue +------+------------- + 1.11 | a9o9 + 2.21 | a9o9 + 4.41 | a9o9 + 5.51 | a9o9 + 6.61 | a9o9 + 7.71 | a9o9 + 8.81 | a9o9 + 9.91 | a9o9 + 0.01 | a9o9 +(9 rows) + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o5 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 0.01 | a10c701s4d1.11o1 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o3 + 0.01 | a10c701s4d1.11o3 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o2 + 3.31 | a10c701s4d1.11o2 + 5.51 | a10c701s4d1.11o2 + 6.61 | a10c701s4d1.11o2 + 7.71 | a10c701s4d1.11o2 + 8.81 | a10c701s4d1.11o2 + 9.91 | a10c701s4d1.11o2 +(7 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o4 + 2.21 | a10c701s4d1.11o4 + 3.31 | a10c701s4d1.11o4 + 5.51 | a10c701s4d1.11o4 + 6.61 | a10c701s4d1.11o4 + 7.71 | a10c701s4d1.11o4 + 8.81 | a10c701s4d1.11o4 + 9.91 | a10c701s4d1.11o4 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o6 + 3.31 | a10c701s4d1.11o6 + 5.51 | a10c701s4d1.11o6 + 6.61 | a10c701s4d1.11o6 + 7.71 | a10c701s4d1.11o6 + 8.81 | a10c701s4d1.11o6 + 9.91 | a10c701s4d1.11o6 + 0.01 | a10c701s4d1.11o6 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+--------------------------- + 1.11 | a10m1022s4d1.11s4d2.21o10 + 2.21 | a10m1022s4d1.11s4d2.21o10 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+----------------------------- + 3.31 | a10m1022s4d1.11s4d2.21o10l2 + 5.51 | a10m1022s4d1.11s4d2.21o10l2 + 6.61 | a10m1022s4d1.11s4d2.21o10l2 + 7.71 | a10m1022s4d1.11s4d2.21o10l2 + 8.81 | a10m1022s4d1.11s4d2.21o10l2 + 9.91 | a10m1022s4d1.11s4d2.21o10l2 + 0.01 | a10m1022s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------------------- - B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 - C | 2 | | 2.21 | CC | CC | a5c25s2dAAo4a5c25s2dCCo3l0 - | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 1.11 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 2.21 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 3.31 | a10c701s4d1.11o4a10c701s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+---------------------------- - D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 - E | 4 | t | 4.41 | | EE | a5c25s2dAAo1a5c25s2dCCo2l1 - G | 6 | t | 6.61 | GG | GG | a5c25s2dAAo1a5c25s2dCCo2l1 - H | 7 | f | 7.71 | HH | HH | a5c25s2dAAo1a5c25s2dCCo2l1 - I | 8 | t | 8.81 | II | II | a5c25s2dAAo1a5c25s2dCCo2l1 - J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 5.51 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 6.61 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 7.71 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 8.81 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 9.91 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 0.01 | a10c701s4d1.11o1a10c701s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - F | 5 | f | 5.51 | FF | | a5o8 +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; + x5 | filtervalue +----+------------- + | a10o8 (1 row) -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+-----+----+------------- - B | | f | 1.11 | BB | BB | a5o8l2 - C | 2 | | 2.21 | CC | CC | a5o8l2 - D | 3 | f | | DD | DD | a5o8l2 - E | 4 | t | 4.41 | | EE | a5o8l2 - G | 6 | t | 6.61 | GG | GG | a5o8l2 - H | 7 | f | 7.71 | HH | HH | a5o8l2 - I | 8 | t | 8.81 | II | II | a5o8l2 - J | 9 | f | 9.91 | JJ | JJ | a5o8l2 - | 0 | t | 0.01 | AA | AA | a5o8l2 +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + x5 | filtervalue +------+------------- + 1.11 | a10o9 + 2.21 | a10o9 + 3.31 | a10o9 + 5.51 | a10o9 + 6.61 | a10o9 + 7.71 | a10o9 + 8.81 | a10o9 + 9.91 | a10o9 + 0.01 | a10o9 +(9 rows) + +-- bytea +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------------ + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------- + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------- + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------ + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 (9 rows) +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; + x6 | filtervalue +----+------------- + | a11o8 +(1 row) + +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------- + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 +(9 rows) + +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-11o5 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-12o1 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-12o3 + 2023-01-12 | a12c1082s10d2023-01-12o3 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-12 | a12c1082s10d2023-01-11o2 + 2023-01-13 | a12c1082s10d2023-01-11o2 + 2023-01-14 | a12c1082s10d2023-01-11o2 + 2023-01-15 | a12c1082s10d2023-01-11o2 + 2023-01-16 | a12c1082s10d2023-01-11o2 + 2023-01-17 | a12c1082s10d2023-01-11o2 + 2023-01-18 | a12c1082s10d2023-01-11o2 + 2023-01-19 | a12c1082s10d2023-01-11o2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-12 | a12c1082s10d2023-01-12o4 + 2023-01-13 | a12c1082s10d2023-01-12o4 + 2023-01-14 | a12c1082s10d2023-01-12o4 + 2023-01-15 | a12c1082s10d2023-01-12o4 + 2023-01-16 | a12c1082s10d2023-01-12o4 + 2023-01-17 | a12c1082s10d2023-01-12o4 + 2023-01-18 | a12c1082s10d2023-01-12o4 + 2023-01-19 | a12c1082s10d2023-01-12o4 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 2023-01-11 | a12c1082s10d2023-01-15o6 + 2023-01-12 | a12c1082s10d2023-01-15o6 + 2023-01-13 | a12c1082s10d2023-01-15o6 + 2023-01-14 | a12c1082s10d2023-01-15o6 + 2023-01-16 | a12c1082s10d2023-01-15o6 + 2023-01-17 | a12c1082s10d2023-01-15o6 + 2023-01-18 | a12c1082s10d2023-01-15o6 + 2023-01-19 | a12c1082s10d2023-01-15o6 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+----------------------------------------- + 2023-01-12 | a12m1182s10d2023-01-12s10d2023-01-15o10 + 2023-01-15 | a12m1182s10d2023-01-12s10d2023-01-15o10 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+------------------------------------------- + 2023-01-11 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-12 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-13 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-14 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-16 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-17 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-18 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 + 2023-01-19 | a12m1182s10d2023-01-15s10d2023-01-15o10l2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 2023-01-11 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-12 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-13 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-14 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-15 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-16 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-17 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-18 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 + 2023-01-19 | a12c1082s10d2023-01-11o4a12c1082s10d2023-01-19o3l0 +(9 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 2023-01-14 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-15 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-16 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-17 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-18 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 + 2023-01-19 | a12c1082s10d2023-01-10o1a12c1082s10d2023-01-13o2l1 +(6 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; + x7 | filtervalue +----+------------- + | a12o8 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + x7 | filtervalue +------------+------------- + 2023-01-11 | a12o9 + 2023-01-12 | a12o9 + 2023-01-13 | a12o9 + 2023-01-14 | a12o9 + 2023-01-15 | a12o9 + 2023-01-16 | a12o9 + 2023-01-17 | a12o9 + 2023-01-18 | a12o9 + 2023-01-19 | a12o9 +(9 rows) + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:50o5 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:52o1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o3 + 12:34:50 | a13c1083s8d12:34:52o3 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:51o2 + 12:34:53 | a13c1083s8d12:34:51o2 + 12:34:54 | a13c1083s8d12:34:51o2 + 12:34:55 | a13c1083s8d12:34:51o2 + 12:34:56 | a13c1083s8d12:34:51o2 + 12:34:57 | a13c1083s8d12:34:51o2 + 12:34:58 | a13c1083s8d12:34:51o2 + 12:34:59 | a13c1083s8d12:34:51o2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o4 + 12:34:53 | a13c1083s8d12:34:52o4 + 12:34:54 | a13c1083s8d12:34:52o4 + 12:34:55 | a13c1083s8d12:34:52o4 + 12:34:56 | a13c1083s8d12:34:52o4 + 12:34:57 | a13c1083s8d12:34:52o4 + 12:34:58 | a13c1083s8d12:34:52o4 + 12:34:59 | a13c1083s8d12:34:52o4 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:55o6 + 12:34:53 | a13c1083s8d12:34:55o6 + 12:34:54 | a13c1083s8d12:34:55o6 + 12:34:56 | a13c1083s8d12:34:55o6 + 12:34:57 | a13c1083s8d12:34:55o6 + 12:34:58 | a13c1083s8d12:34:55o6 + 12:34:59 | a13c1083s8d12:34:55o6 + 12:34:50 | a13c1083s8d12:34:55o6 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------------------- + 12:34:52 | a13m1183s8d12:34:52s8d12:34:55o10 + 12:34:55 | a13m1183s8d12:34:52s8d12:34:55o10 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+------------------------------------- + 12:34:52 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:53 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:54 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:56 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:57 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:58 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:59 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:50 | a13m1183s8d12:34:55s8d12:34:55o10l2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:52 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:53 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:54 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:55 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:56 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:57 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:58 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:59 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:50 | a13c1083s8d12:34:51o1a13c1083s8d12:34:59o2l1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; + x8 | filtervalue +----+------------- + | a13o8 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + x8 | filtervalue +----------+------------- + 12:34:52 | a13o9 + 12:34:53 | a13o9 + 12:34:54 | a13o9 + 12:34:55 | a13o9 + 12:34:56 | a13o9 + 12:34:57 | a13o9 + 12:34:58 | a13o9 + 12:34:59 | a13o9 + 12:34:50 | a13o9 +(9 rows) + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:50o5 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:52o1 + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:52o1 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:52o3 + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:52o3 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:55 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:51o2 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:51o2 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:55 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:52o4 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:52o4 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:55o6 + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:55o6 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +---------------------+----------------------------------------------------------- + 2023-01-01 12:34:55 | a14m1115s19d2023-01-01 12:34:52s19d2023-01-01 12:34:55o10 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +---------------------+------------------------------------------------------------- + 2023-01-01 12:34:51 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:53 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:54 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:56 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:57 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:58 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:59 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 + 2023-01-01 12:34:50 | a14m1115s19d2023-01-01 12:34:55s19d2023-01-01 12:34:55o10l2 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+---------------------------------------------------------------------- + 2023-01-01 12:34:51 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:53 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:54 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:55 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:56 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:57 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:58 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 + 2023-01-01 12:34:59 | a14c1114s19d2023-01-01 12:34:51o4a14c1114s19d2023-01-01 12:34:59o3l0 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +---------------------+---------------------------------------------------------------------- + 2023-01-01 12:34:50 | a14c1114s19d2023-01-01 12:34:51o1a14c1114s19d2023-01-01 12:34:59o2l1 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; + x9 | filtervalue +----+------------- + | a14o8 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + x9 | filtervalue +---------------------+------------- + 2023-01-01 12:34:51 | a14o9 + 2023-01-01 12:34:53 | a14o9 + 2023-01-01 12:34:54 | a14o9 + 2023-01-01 12:34:55 | a14o9 + 2023-01-01 12:34:56 | a14o9 + 2023-01-01 12:34:57 | a14o9 + 2023-01-01 12:34:58 | a14o9 + 2023-01-01 12:34:59 | a14o9 + 2023-01-01 12:34:50 | a14o9 +(9 rows) + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:30:00 | a16c1186s8d01:30:00o5 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:31:00 | a16c1186s8d01:35:00o1 + 01:32:00 | a16c1186s8d01:35:00o1 + 01:33:00 | a16c1186s8d01:35:00o1 + 01:30:00 | a16c1186s8d01:35:00o1 +(4 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:31:00 | a16c1186s8d01:36:00o3 + 01:32:00 | a16c1186s8d01:36:00o3 + 01:33:00 | a16c1186s8d01:36:00o3 + 01:35:00 | a16c1186s8d01:36:00o3 + 01:36:00 | a16c1186s8d01:36:00o3 + 01:30:00 | a16c1186s8d01:36:00o3 +(6 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:35:00 | a16c1186s8d01:33:00o2 + 01:36:00 | a16c1186s8d01:33:00o2 + 01:37:00 | a16c1186s8d01:33:00o2 + 01:38:00 | a16c1186s8d01:33:00o2 + 01:39:00 | a16c1186s8d01:33:00o2 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:35:00 | a16c1186s8d01:35:00o4 + 01:36:00 | a16c1186s8d01:35:00o4 + 01:37:00 | a16c1186s8d01:35:00o4 + 01:38:00 | a16c1186s8d01:35:00o4 + 01:39:00 | a16c1186s8d01:35:00o4 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------- + 01:32:00 | a16c1186s8d01:31:00o6 + 01:33:00 | a16c1186s8d01:31:00o6 + 01:35:00 | a16c1186s8d01:31:00o6 + 01:36:00 | a16c1186s8d01:31:00o6 + 01:37:00 | a16c1186s8d01:31:00o6 + 01:38:00 | a16c1186s8d01:31:00o6 + 01:39:00 | a16c1186s8d01:31:00o6 + 01:30:00 | a16c1186s8d01:31:00o6 +(8 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +----------+----------------------------------- + 01:33:00 | a16m1187s8d01:30:00s8d01:33:00o10 + 01:30:00 | a16m1187s8d01:30:00s8d01:33:00o10 +(2 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +----------+------------------------------------- + 01:31:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:32:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:35:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:36:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:37:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:38:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 + 01:39:00 | a16m1187s8d01:30:00s8d01:33:00o10l2 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+---------------------------------------------- + 01:31:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:32:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:33:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:35:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 + 01:30:00 | a16c1186s8d01:30:00o4a16c1186s8d01:35:00o3l0 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +----------+---------------------------------------------- + 01:32:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:33:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:35:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:36:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:37:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:38:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 + 01:39:00 | a16c1186s8d01:30:00o1a16c1186s8d01:31:00o2l1 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; + x11 | filtervalue +-----+------------- + | a16o8 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + x11 | filtervalue +----------+------------- + 01:31:00 | a16o9 + 01:32:00 | a16o9 + 01:33:00 | a16o9 + 01:35:00 | a16o9 + 01:36:00 | a16o9 + 01:37:00 | a16o9 + 01:38:00 | a16o9 + 01:39:00 | a16o9 + 01:30:00 | a16o9 +(9 rows) + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o5 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 +(8 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+--------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 +(2 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+----------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; + x12 | filtervalue +-----+------------- + | a17o8 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17o9 +(9 rows) + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; + x13 | filtervalue +-----+------------- + | a18o8 +(1 row) + +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + x13 | filtervalue +---------+------------- + {"a":1} | a18o9 + {"a":2} | a18o9 + {"a":3} | a18o9 + {"a":4} | a18o9 + {"a":5} | a18o9 + {"a":6} | a18o9 + {"a":7} | a18o9 + {"a":8} | a18o9 + {"a":9} | a18o9 +(9 rows) + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 0} | a19c3802s8d{a: 0}o5 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o1 + {"a": 0} | a19c3802s8d{a: 3}o1 +(2 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o3 + {"a": 3} | a19c3802s8d{a: 3}o3 + {"a": 0} | a19c3802s8d{a: 3}o3 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 1}o2 + {"a": 3} | a19c3802s8d{a: 1}o2 + {"a": 4} | a19c3802s8d{a: 1}o2 + {"a": 5} | a19c3802s8d{a: 1}o2 + {"a": 6} | a19c3802s8d{a: 1}o2 + {"a": 7} | a19c3802s8d{a: 1}o2 + {"a": 8} | a19c3802s8d{a: 1}o2 + {"a": 9} | a19c3802s8d{a: 1}o2 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 4} | a19c3802s8d{a: 4}o4 + {"a": 5} | a19c3802s8d{a: 4}o4 + {"a": 6} | a19c3802s8d{a: 4}o4 + {"a": 7} | a19c3802s8d{a: 4}o4 + {"a": 8} | a19c3802s8d{a: 4}o4 + {"a": 9} | a19c3802s8d{a: 4}o4 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 5}o6 + {"a": 3} | a19c3802s8d{a: 5}o6 + {"a": 4} | a19c3802s8d{a: 5}o6 + {"a": 6} | a19c3802s8d{a: 5}o6 + {"a": 7} | a19c3802s8d{a: 5}o6 + {"a": 8} | a19c3802s8d{a: 5}o6 + {"a": 9} | a19c3802s8d{a: 5}o6 + {"a": 0} | a19c3802s8d{a: 5}o6 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------- + {"a": 6} | a19m3807s8d{a: 6}s8d{a: 1}o10 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------------------- + {"a": 2} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 3} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 5} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 6} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 7} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 9} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 0} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 +(7 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 2} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 3} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 4} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 5} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 6} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 7} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 8} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 9} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 0} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; + x14 | filtervalue +-----+------------- + | a19o8 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + x14 | filtervalue +----------+------------- + {"a": 2} | a19o9 + {"a": 3} | a19o9 + {"a": 4} | a19o9 + {"a": 5} | a19o9 + {"a": 6} | a19o9 + {"a": 7} | a19o9 + {"a": 8} | a19o9 + {"a": 9} | a19o9 + {"a": 0} | a19o9 +(9 rows) + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; + x15 | filtervalue +-------+-------------------- + {0,1} | a20m1005s1d0s1d1o5 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; + x15 | filtervalue +--------+--------------------------- + {1,2} | a20m1005s1d0s1d1s4dNULLo6 + {3,4} | a20m1005s1d0s1d1s4dNULLo6 + {4,5} | a20m1005s1d0s1d1s4dNULLo6 + {5,6} | a20m1005s1d0s1d1s4dNULLo6 + {6,7} | a20m1005s1d0s1d1s4dNULLo6 + {7,8} | a20m1005s1d0s1d1s4dNULLo6 + {8,9} | a20m1005s1d0s1d1s4dNULLo6 + {9,10} | a20m1005s1d0s1d1s4dNULLo6 + {0,1} | a20m1005s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; + x15 | filtervalue +-----+------------- + | a20o8 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; + x15 | filtervalue +--------+------------- + {1,2} | a20o9 + {3,4} | a20o9 + {4,5} | a20o9 + {5,6} | a20o9 + {6,7} | a20o9 + {7,8} | a20o9 + {8,9} | a20o9 + {9,10} | a20o9 + {0,1} | a20o9 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); + x15 | filtervalue +-------+---------------------------------------- + {1,2} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 + {5,6} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 +(2 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + x15 | filtervalue +--------+---------------------------------------- + {0,1} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {1,2} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {3,4} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {6,7} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {7,8} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {8,9} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {9,10} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 +(7 rows) + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; + x16 | filtervalue +-------+-------------------- + {2,3} | a21m1007s1d2s1d3o5 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; + x16 | filtervalue +---------+--------------------------- + {3,4} | a21m1007s1d0s1d1s4dNULLo6 + {4,5} | a21m1007s1d0s1d1s4dNULLo6 + {6,7} | a21m1007s1d0s1d1s4dNULLo6 + {7,8} | a21m1007s1d0s1d1s4dNULLo6 + {8,9} | a21m1007s1d0s1d1s4dNULLo6 + {9,10} | a21m1007s1d0s1d1s4dNULLo6 + {10,11} | a21m1007s1d0s1d1s4dNULLo6 + {11,12} | a21m1007s1d0s1d1s4dNULLo6 + {2,3} | a21m1007s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; + x16 | filtervalue +-----+------------- + | a21o8 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; + x16 | filtervalue +---------+------------- + {3,4} | a21o9 + {4,5} | a21o9 + {6,7} | a21o9 + {7,8} | a21o9 + {8,9} | a21o9 + {9,10} | a21o9 + {10,11} | a21o9 + {11,12} | a21o9 + {2,3} | a21o9 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); + x16 | filtervalue +-------+---------------------------------------- + {2,3} | a21m1007s1d2s1d3o5a21m1007s1d5s1d6o5l1 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + x16 | filtervalue +---------+---------------------------------------- + {2,3} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {3,4} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {6,7} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {7,8} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {8,9} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {9,10} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {10,11} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {11,12} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 +(8 rows) + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; + x17 | filtervalue +-------+-------------------- + {4,5} | a22m1016s1d4s1d5o5 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; + x17 | filtervalue +---------+--------------------------- + {5,6} | a22m1016s1d5s1d4s4dNULLo6 + {6,7} | a22m1016s1d5s1d4s4dNULLo6 + {7,8} | a22m1016s1d5s1d4s4dNULLo6 + {9,10} | a22m1016s1d5s1d4s4dNULLo6 + {10,11} | a22m1016s1d5s1d4s4dNULLo6 + {11,12} | a22m1016s1d5s1d4s4dNULLo6 + {12,13} | a22m1016s1d5s1d4s4dNULLo6 + {13,14} | a22m1016s1d5s1d4s4dNULLo6 + {4,5} | a22m1016s1d5s1d4s4dNULLo6 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; + x17 | filtervalue +-----+------------- + | a22o8 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; + x17 | filtervalue +---------+------------- + {5,6} | a22o9 + {6,7} | a22o9 + {7,8} | a22o9 + {9,10} | a22o9 + {10,11} | a22o9 + {11,12} | a22o9 + {12,13} | a22o9 + {13,14} | a22o9 + {4,5} | a22o9 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +-------+---------------------------------------- + {4,5} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 + {5,6} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 +(2 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +---------+---------------------------------------- + {6,7} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {7,8} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {9,10} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {10,11} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {11,12} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {12,13} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {13,14} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 +(7 rows) + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 +(4 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; + x18 | filtervalue +-----+------------- + | a23o8 +(1 row) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; + x18 | filtervalue +------------+------------- + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 +(9 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 +(4 rows) + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; + x19 | filtervalue +-------+-------------------- + {B,B} | a24m1009s1dBs1dBo5 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; + x19 | filtervalue +-------+--------------------------- + {B,B} | a24m1009s1dAs1dAs4dNULLo6 + {C,C} | a24m1009s1dAs1dAs4dNULLo6 + {D,D} | a24m1009s1dAs1dAs4dNULLo6 + {E,E} | a24m1009s1dAs1dAs4dNULLo6 + {F,F} | a24m1009s1dAs1dAs4dNULLo6 + {G,G} | a24m1009s1dAs1dAs4dNULLo6 + {H,H} | a24m1009s1dAs1dAs4dNULLo6 + {I,I} | a24m1009s1dAs1dAs4dNULLo6 + {J,J} | a24m1009s1dAs1dAs4dNULLo6 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; + x19 | filtervalue +-----+------------- + | a24o8 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; + x19 | filtervalue +-------+------------- + {B,B} | a24o9 + {C,C} | a24o9 + {D,D} | a24o9 + {E,E} | a24o9 + {F,F} | a24o9 + {G,G} | a24o9 + {H,H} | a24o9 + {I,I} | a24o9 + {J,J} | a24o9 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dBs1dBo5a24m1009s1dAs1dAs4dNULLo5l1 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {C,C} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {D,D} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {E,E} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {F,F} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {G,G} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {H,H} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {I,I} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {J,J} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; + x20 | filtervalue +-----------+------------------------ + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; + x20 | filtervalue +-------------+--------------------------- + {3.1,4.1} | a25m1021s1d0s1d1s4dNULLo6 + {4.1,5.1} | a25m1021s1d0s1d1s4dNULLo6 + {5.1,6.1} | a25m1021s1d0s1d1s4dNULLo6 + {6.1,7.1} | a25m1021s1d0s1d1s4dNULLo6 + {7.1,8.1} | a25m1021s1d0s1d1s4dNULLo6 + {8.1,9.1} | a25m1021s1d0s1d1s4dNULLo6 + {9.1,10.1} | a25m1021s1d0s1d1s4dNULLo6 + {10.1,11.1} | a25m1021s1d0s1d1s4dNULLo6 + {1.1,2.1} | a25m1021s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; + x20 | filtervalue +-----+------------- + | a25o8 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; + x20 | filtervalue +-------------+------------- + {3.1,4.1} | a25o9 + {4.1,5.1} | a25o9 + {5.1,6.1} | a25o9 + {6.1,7.1} | a25o9 + {7.1,8.1} | a25o9 + {8.1,9.1} | a25o9 + {9.1,10.1} | a25o9 + {10.1,11.1} | a25o9 + {1.1,2.1} | a25o9 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5a25m1021s1d5s1d6o5l1 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {3.1,4.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {4.1,5.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {5.1,6.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {6.1,7.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {7.1,8.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {8.1,9.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {9.1,10.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {10.1,11.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 +(9 rows) + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; + x21 | filtervalue +-----------+------------------------ + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; + x21 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a26m1022s1d0s1d1s4dNULLo6 + {4.1,5.1} | a26m1022s1d0s1d1s4dNULLo6 + {5.1,6.1} | a26m1022s1d0s1d1s4dNULLo6 + {6.1,7.1} | a26m1022s1d0s1d1s4dNULLo6 + {7.1,8.1} | a26m1022s1d0s1d1s4dNULLo6 + {8.1,9.1} | a26m1022s1d0s1d1s4dNULLo6 + {9.1,10.1} | a26m1022s1d0s1d1s4dNULLo6 + {10.1,11.1} | a26m1022s1d0s1d1s4dNULLo6 + {1.1,2.1} | a26m1022s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; + x21 | filtervalue +-----+------------- + | a26o8 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; + x21 | filtervalue +-------------+------------- + {2.1,3.1} | a26o9 + {4.1,5.1} | a26o9 + {5.1,6.1} | a26o9 + {6.1,7.1} | a26o9 + {7.1,8.1} | a26o9 + {8.1,9.1} | a26o9 + {9.1,10.1} | a26o9 + {10.1,11.1} | a26o9 + {1.1,2.1} | a26o9 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5a26m1022s1d5s1d6o5l1 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {2.1,3.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {4.1,5.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {5.1,6.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {6.1,7.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {7.1,8.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {8.1,9.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {9.1,10.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {10.1,11.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 +(9 rows) + +-- bytea array +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+---------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+--------------------------------------------------------------- + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; + x22 | filtervalue +-----+------------- + | a27o8 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+------------- + {"\\x78343242","\\x78343342"} | a27o9 + {"\\x78343342","\\x78343442"} | a27o9 + {"\\x78343542","\\x78343642"} | a27o9 + {"\\x78343642","\\x78343742"} | a27o9 + {"\\x78343742","\\x78343842"} | a27o9 + {"\\x78343842","\\x78343942"} | a27o9 + {"\\x78343942","\\x78346142"} | a27o9 + {"\\x78346142","\\x78346242"} | a27o9 + {"\\x78343142","\\x78343242"} | a27o9 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+-------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5a27m1001s12d\x736461735ao5l1 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+------------------------------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 +(9 rows) + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; + x23 | filtervalue +---------+---------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; + x23 | filtervalue +---------+----------------------------- + {BB,BB} | a28m1014s2dABs2dABs4dNULLo6 + {CC,CC} | a28m1014s2dABs2dABs4dNULLo6 + {DD,DD} | a28m1014s2dABs2dABs4dNULLo6 + {FF,FF} | a28m1014s2dABs2dABs4dNULLo6 + {GG,GG} | a28m1014s2dABs2dABs4dNULLo6 + {HH,HH} | a28m1014s2dABs2dABs4dNULLo6 + {II,II} | a28m1014s2dABs2dABs4dNULLo6 + {JJ,JJ} | a28m1014s2dABs2dABs4dNULLo6 + {AA,AA} | a28m1014s2dABs2dABs4dNULLo6 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; + x23 | filtervalue +-----+------------- + | a28o8 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; + x23 | filtervalue +---------+------------- + {BB,BB} | a28o9 + {CC,CC} | a28o9 + {DD,DD} | a28o9 + {FF,FF} | a28o9 + {GG,GG} | a28o9 + {HH,HH} | a28o9 + {II,II} | a28o9 + {JJ,JJ} | a28o9 + {AA,AA} | a28o9 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5a28m1014s2dAAs2dABs4dNULLo5l1 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {BB,BB} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {CC,CC} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {DD,DD} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {FF,FF} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {GG,GG} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {HH,HH} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {II,II} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {JJ,JJ} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 +(9 rows) + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------- + {AA,66} | a29m1015s2dAAs2d66o5 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------------- + {BB,67} | a29m1015s2dBBs1dCs4dNULLo6 + {CC,68} | a29m1015s2dBBs1dCs4dNULLo6 + {DD,69} | a29m1015s2dBBs1dCs4dNULLo6 + {EE,70} | a29m1015s2dBBs1dCs4dNULLo6 + {GG,72} | a29m1015s2dBBs1dCs4dNULLo6 + {HH,73} | a29m1015s2dBBs1dCs4dNULLo6 + {II,74} | a29m1015s2dBBs1dCs4dNULLo6 + {JJ,75} | a29m1015s2dBBs1dCs4dNULLo6 + {AA,66} | a29m1015s2dBBs1dCs4dNULLo6 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; + x24 | filtervalue +-----+------------- + | a29o8 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; + x24 | filtervalue +---------+------------- + {BB,67} | a29o9 + {CC,68} | a29o9 + {DD,69} | a29o9 + {EE,70} | a29o9 + {GG,72} | a29o9 + {HH,73} | a29o9 + {II,74} | a29o9 + {JJ,75} | a29o9 + {AA,66} | a29o9 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); + x24 | filtervalue +---------+-------------------------------------------------- + {AA,66} | a29m1015s2dAAs2d66o5a29m1015s2dBBs1dBs4dNULLo5l1 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + x24 | filtervalue +---------+----------------------------------------------- + {AA,66} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {BB,67} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {CC,68} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {DD,69} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {EE,70} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {GG,72} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {HH,73} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {II,74} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {JJ,75} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+---------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+----------------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo6 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; + x25 | filtervalue +-----+------------- + | a30o8 +(1 row) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; + x25 | filtervalue +-------------------------+------------- + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 + {2023-01-01,2023-01-02} | a30o9 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-02o5a30m1182s10d2023-01-01s10d2023-01-02s4dNULLo5l1 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 + {2023-01-01,2023-01-02} | a30m1182s10d2023-01-01s10d2023-01-03s4dNULLo6a30m1182s10d2023-01-01s10d2023-01-03o6l0 +(9 rows) + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; + x26 | filtervalue +-----+------------- + | a31o8 +(1 row) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 +(9 rows) + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; + x27 | filtervalue +-----------+------------------------ + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; + x27 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a32m1231s1d0s1d1s4dNULLo6 + {4.1,5.1} | a32m1231s1d0s1d1s4dNULLo6 + {5.1,6.1} | a32m1231s1d0s1d1s4dNULLo6 + {6.1,7.1} | a32m1231s1d0s1d1s4dNULLo6 + {7.1,8.1} | a32m1231s1d0s1d1s4dNULLo6 + {8.1,9.1} | a32m1231s1d0s1d1s4dNULLo6 + {9.1,10.1} | a32m1231s1d0s1d1s4dNULLo6 + {10.1,11.1} | a32m1231s1d0s1d1s4dNULLo6 + {1.1,2.1} | a32m1231s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; + x27 | filtervalue +-----+------------- + | a32o8 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; + x27 | filtervalue +-------------+------------- + {2.1,3.1} | a32o9 + {4.1,5.1} | a32o9 + {5.1,6.1} | a32o9 + {6.1,7.1} | a32o9 + {7.1,8.1} | a32o9 + {8.1,9.1} | a32o9 + {9.1,10.1} | a32o9 + {10.1,11.1} | a32o9 + {1.1,2.1} | a32o9 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5a32m1231s1d5s1d6o5l1 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {2.1,3.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {4.1,5.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {5.1,6.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {6.1,7.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {7.1,8.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {8.1,9.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {9.1,10.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {10.1,11.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 +(9 rows) + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; + x28 | filtervalue +---------------------+---------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; + x28 | filtervalue +---------------------+----------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; + x28 | filtervalue +-----+------------- + | a33o8 +(1 row) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; + x28 | filtervalue +---------------------+------------- + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); + x28 | filtervalue +---------------------+--------------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + x28 | filtervalue +---------------------+-------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 +(9 rows) + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; + x29 | filtervalue +-----------------------------------------------+---------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; + x29 | filtervalue +-----------------------------------------------+----------------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00s4dNULLo6 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; + x29 | filtervalue +-----+------------- + | a34o8 +(1 row) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; + x29 | filtervalue +-----------------------------------------------+------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34o9 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); + x29 | filtervalue +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00o5a34m1115s19d2023-01-01 12:00:00s19d2023-01-02 12:00:00s4dNULLo5l1 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + x29 | filtervalue +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------- + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 + {"2023-01-01 12:00:00","2023-01-02 12:00:00"} | a34m1115s19d2023-01-03 12:00:00s19d2023-01-02 12:00:00o6a34m1115s19d2023-01-02 12:00:00s19d2023-01-02 12:00:00o6l0 +(9 rows) + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; + x31 | filtervalue +---------------------+---------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; + x31 | filtervalue +---------------------+----------------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; + x31 | filtervalue +-----+------------- + | a36o8 +(1 row) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; + x31 | filtervalue +---------------------+------------- + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 + {01:00:00,02:00:00} | a36o9 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); + x31 | filtervalue +---------------------+--------------------------------------------------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00o5a36m1187s8d01:00:00s8d02:00:00s4dNULLo5l1 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + x31 | filtervalue +---------------------+--------------------------------------------------------------------------- + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 + {01:00:00,02:00:00} | a36m1187s8d01:00:00s8d02:00:00s4dNULLo6a36m1187s8d12:00:00s8d02:00:00o6l0 +(9 rows) + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; + x32 | filtervalue +-----+------------- + | a37o8 +(1 row) + +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + x32 | filtervalue +-----------------------------------------------+------------- + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 +(9 rows) + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; + x33 | filtervalue +----------------+--------------------- + {"{\"a\": 0}"} | a38m3807s8d{a: 0}o5 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; + x33 | filtervalue +----------------+---------------------------- + {"{\"a\": 1}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 0}"} | a38m3807s8d{a: 2}s4dNULLo6 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; + x33 | filtervalue +-----+------------- + | a38o8 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; + x33 | filtervalue +----------------+------------- + {"{\"a\": 1}"} | a38o9 + {"{\"a\": 3}"} | a38o9 + {"{\"a\": 4}"} | a38o9 + {"{\"a\": 5}"} | a38o9 + {"{\"a\": 6}"} | a38o9 + {"{\"a\": 7}"} | a38o9 + {"{\"a\": 8}"} | a38o9 + {"{\"a\": 9}"} | a38o9 + {"{\"a\": 0}"} | a38o9 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 0}"} | a38m3807s8d{a: 2}o5a38m3807s8d{a: 0}o5l1 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 1}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 +(8 rows) diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query01.sql b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query01.sql index 620dbc0ba4..c009110cd2 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query01.sql +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query01.sql @@ -25,98 +25,428 @@ SET gp_external_enable_filter_pushdown = true; -- control - no predicates -SELECT * FROM test_filter; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; SET optimizer = off; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; + +-- test newly supported types +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + +-- bytea +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; +--start_ignore +reset bytea_output; +--end_ignore + +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + +-- bytea array +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); +--start_ignore +reset bytea_output; +--end_ignore + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query02.sql b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query02.sql index 1622ad0869..a29f835311 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query02.sql +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDown/sql/query02.sql @@ -25,98 +25,428 @@ SET gp_external_enable_filter_pushdown = true; -- control - no predicates -SELECT * FROM test_filter; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; SET optimizer = on; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; + +-- test newly supported types +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + +-- bytea +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; +--start_ignore +reset bytea_output; +--end_ignore + +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + +-- bytea array +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); +--start_ignore +reset bytea_output; +--end_ignore + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/expected/query01.ans b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/expected/query01.ans index cfceabb107..a76f2a7bc5 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/expected/query01.ans +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/expected/query01.ans @@ -3,7 +3,7 @@ -- @description query01 for PXF filter pushdown disabled case SET gp_external_enable_filter_pushdown = off; SET -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+-----+----+------------- C | 2 | | 2.21 | CC | CC | No filter diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/sql/query01.sql b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/sql/query01.sql index 693e348a24..870d0a0688 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/sql/query01.sql +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownDisabled/sql/query01.sql @@ -1,4 +1,4 @@ -- @description query01 for PXF filter pushdown disabled case SET gp_external_enable_filter_pushdown = off; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/expected/query01.ans b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/expected/query01.ans index 0ee16d0dd3..47c488b279 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/expected/query01.ans +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/expected/query01.ans @@ -5,7 +5,7 @@ SET gp_external_enable_filter_pushdown = true; SET SET optimizer = off; SET -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+-----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 @@ -13,7 +13,7 @@ SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; SET optimizer = on; SET -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+-----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 diff --git a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/sql/query01.sql b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/sql/query01.sql index b2d292f15f..1443c6271b 100644 --- a/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/sql/query01.sql +++ b/automation/sqlrepo/features/filterpushdown/checkFilterPushDownHexDelimiter/sql/query01.sql @@ -3,8 +3,8 @@ SET gp_external_enable_filter_pushdown = true; SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; diff --git a/automation/src/test/java/org/greenplum/pxf/automation/arenadata/FragmentDistributionTest.java b/automation/src/test/java/org/greenplum/pxf/automation/arenadata/FragmentDistributionTest.java index 7956f06886..cc37ecaaff 100644 --- a/automation/src/test/java/org/greenplum/pxf/automation/arenadata/FragmentDistributionTest.java +++ b/automation/src/test/java/org/greenplum/pxf/automation/arenadata/FragmentDistributionTest.java @@ -41,12 +41,14 @@ public class FragmentDistributionTest extends BaseFeature { private String pxfHome; private String pxfLogFile; private String hdfsPath; - Table dataTable; + private Table dataTable; private Table postgresSourceTable; + private String restartCommand; @Override protected void beforeClass() throws Exception { pxfHome = cluster.getPxfHome(); + restartCommand = pxfHome + "/bin/pxf restart"; if (cluster instanceof MultiNodeCluster) { pxfNodes = ((MultiNodeCluster) cluster).getNode(SegmentNode.class, PhdCluster.EnumClusterServices.pxf); } @@ -223,8 +225,7 @@ public void testFragmentDistributionForHdfsWithSegLimit() throws Exception { } private void changeLogLevel(String level) throws Exception { - cluster.runCommandOnNodes(pxfNodes, String.format("export PXF_LOG_LEVEL=%s", level)); - cluster.restart(PhdCluster.EnumClusterServices.pxf); + cluster.runCommandOnNodes(pxfNodes, String.format("export PXF_LOG_LEVEL=%s;%s", level, restartCommand)); } private void cleanLogs() throws Exception { diff --git a/automation/src/test/java/org/greenplum/pxf/automation/arenadata/JdbcBackPressureTest.java b/automation/src/test/java/org/greenplum/pxf/automation/arenadata/JdbcBackPressureTest.java index 231d04de85..156dd3a75e 100644 --- a/automation/src/test/java/org/greenplum/pxf/automation/arenadata/JdbcBackPressureTest.java +++ b/automation/src/test/java/org/greenplum/pxf/automation/arenadata/JdbcBackPressureTest.java @@ -65,6 +65,7 @@ public class JdbcBackPressureTest extends BaseFeature { private String pxfLogFile; private List pxfNodes; private Oracle oracle; + private String restartCommand; @Override public void beforeClass() throws Exception { @@ -76,6 +77,7 @@ public void beforeClass() throws Exception { if (cluster instanceof MultiNodeCluster) { pxfNodes = ((MultiNodeCluster) cluster).getNode(SegmentNode.class, PhdCluster.EnumClusterServices.pxf); } + restartCommand = pxfHome + "/bin/pxf restart"; oracle = (Oracle) SystemManagerImpl.getInstance().getSystemObject("oracle"); prepareData(); changeLogLevel("trace"); @@ -187,8 +189,7 @@ public void checkBatchTimeoutSuccess() throws Exception { } private void changeLogLevel(String level) throws Exception { - cluster.runCommandOnNodes(pxfNodes, String.format("export PXF_LOG_LEVEL=%s", level)); - cluster.restart(PhdCluster.EnumClusterServices.pxf); + cluster.runCommandOnNodes(pxfNodes, String.format("export PXF_LOG_LEVEL=%s;%s", level, restartCommand)); } private void cleanPxfLog() throws Exception { diff --git a/automation/src/test/java/org/greenplum/pxf/automation/arenadata/PushdownPredicateInTest.java b/automation/src/test/java/org/greenplum/pxf/automation/arenadata/PushdownPredicateInTest.java index 8314c51565..39831229f9 100755 --- a/automation/src/test/java/org/greenplum/pxf/automation/arenadata/PushdownPredicateInTest.java +++ b/automation/src/test/java/org/greenplum/pxf/automation/arenadata/PushdownPredicateInTest.java @@ -51,10 +51,12 @@ public class PushdownPredicateInTest extends BaseFeature { private String pxfLogFile; private Table gpdbPredicateInSourceTable; private Table oraclePredicateInSourceTable; + private String restartCommand; @Override protected void beforeClass() throws Exception { pxfHome = cluster.getPxfHome(); + restartCommand = pxfHome + "/bin/pxf restart"; String pxfJdbcSiteConfPath = String.format(PXF_JDBC_SITE_CONF_FILE_PATH_TEMPLATE, pxfHome, PXF_ORACLE_SERVER_PROFILE); pxfJdbcSiteConfFile = pxfJdbcSiteConfPath + "/" + PXF_JDBC_SITE_CONF_FILE_NAME; String pxfJdbcSiteConfTemplate = pxfHome + "/" + PXF_JDBC_SITE_CONF_TEMPLATE_RELATIVE_PATH; @@ -150,8 +152,7 @@ public void testPredicateInOracle() throws Exception { } private void changeLogLevel(String level) throws Exception { - cluster.runCommandOnNodes(pxfNodes, String.format("export PXF_LOG_LEVEL=%s", level)); - cluster.restart(PhdCluster.EnumClusterServices.pxf); + cluster.runCommandOnNodes(pxfNodes, String.format("export PXF_LOG_LEVEL=%s;%s", level, restartCommand)); } private void cleanLogs() throws Exception { diff --git a/automation/src/test/java/org/greenplum/pxf/automation/features/filterpushdown/FilterPushDownTest.java b/automation/src/test/java/org/greenplum/pxf/automation/features/filterpushdown/FilterPushDownTest.java index 976ab72117..7909284f91 100755 --- a/automation/src/test/java/org/greenplum/pxf/automation/features/filterpushdown/FilterPushDownTest.java +++ b/automation/src/test/java/org/greenplum/pxf/automation/features/filterpushdown/FilterPushDownTest.java @@ -15,13 +15,46 @@ public class FilterPushDownTest extends BaseFeature { private static final String COMMA = ","; private static final String[] FIELDS = new String[]{ - "t0 text", - "a1 integer", - "b2 boolean", - "c3 numeric", - "d4 char(3)", - "e5 varchar(2)", - "filterValue text" + "t0 text", + "a1 integer", + "b2 boolean", + "c3 numeric", + "d4 char(2)", + "e5 varchar(2)", + "x1 bpchar(2)", + "x2 smallint", + "x3 bigint", + "x4 real", + "x5 float8", + "x6 bytea", + "x7 date", + "x8 time", + "x9 timestamp", + "x10 timestamp with time zone", + "x11 interval", + "x12 uuid", + "x13 json", + "x14 jsonb", + "x15 int2[]", + "x16 int4[]", + "x17 int8[]", + "x18 bool[]", + "x19 text[]", + "x20 float4[]", + "x21 float8[]", + "x22 bytea[]", + "x23 bpchar[]", + "x24 varchar(2)[]", + "x25 date[]", + "x26 uuid[]", + "x27 numeric[]", + "x28 time[]", + "x29 timestamp[]", + "x30 timestamp with time zone[]", + "x31 interval[]", + "x32 json[]", + "x33 jsonb[]", + "filterValue text" }; /** diff --git a/automation/src/test/java/org/greenplum/pxf/automation/features/hbase/HBaseTest.java b/automation/src/test/java/org/greenplum/pxf/automation/features/hbase/HBaseTest.java index 21c28de67c..0428f904d4 100755 --- a/automation/src/test/java/org/greenplum/pxf/automation/features/hbase/HBaseTest.java +++ b/automation/src/test/java/org/greenplum/pxf/automation/features/hbase/HBaseTest.java @@ -260,7 +260,7 @@ public void multipleQualifiersPushdownFilter() throws Exception { public void partialFilterPushdown() throws Exception { String whereClause = " WHERE \"cf1:q3\" > 6 AND \"cf1:q7\" = '42'"; - String partialfilterString = "No filter"; + String partialfilterString = "a3c23s1d6o2a7c17s2d42o5l0"; verifyFilterResults(hbaseTable, exTable, whereClause, partialfilterString, "partialFilterPushdown", false); } diff --git a/automation/src/test/java/org/greenplum/pxf/automation/features/hive/HiveOrcTest.java b/automation/src/test/java/org/greenplum/pxf/automation/features/hive/HiveOrcTest.java index af2fc7939a..502c229f60 100755 --- a/automation/src/test/java/org/greenplum/pxf/automation/features/hive/HiveOrcTest.java +++ b/automation/src/test/java/org/greenplum/pxf/automation/features/hive/HiveOrcTest.java @@ -11,6 +11,7 @@ import org.greenplum.pxf.automation.structures.tables.basic.Table; import org.greenplum.pxf.automation.structures.tables.hive.HiveTable; import org.greenplum.pxf.automation.structures.tables.utils.TableFactory; +import org.junit.Ignore; import org.testng.annotations.Test; import java.nio.charset.StandardCharsets; @@ -356,7 +357,7 @@ public void defaultAnalyze() throws Exception { // Perform Analyze on external table and check suitable Warnings. gpdb.runQueryWithExpectedWarning("ANALYZE " + exTable.getName(), - "ANALYZE for HiveRc, HiveText, and HiveOrc plugins is not supported", true); + "skipping \"" + exTable.getName() + "\"", true); runSqlTest("features/hive/default_analyze"); } @@ -402,6 +403,7 @@ public void hiveCollectionTypes() throws Exception { * @throws Exception if test fails to run */ @Test(groups = { "features", "hcatalog" }) + @Ignore public void aggregateQueries() throws Exception { createExternalTable(PXF_HIVE_SMALL_DATA_TABLE, diff --git a/external-table/src/pxffilters.c b/external-table/src/pxffilters.c index ec24164a39..3d06bd15d9 100644 --- a/external-table/src/pxffilters.c +++ b/external-table/src/pxffilters.c @@ -30,6 +30,7 @@ #include "utils/builtins.h" #include "utils/guc.h" #include "utils/lsyscache.h" +#include "utils/typcache.h" static List *pxf_make_expression_items_list(List *quals, Node *parent); static void pxf_free_filter(PxfFilterDesc * filter); @@ -41,10 +42,11 @@ static bool supported_filter_type(Oid type); static bool supported_operator_type_op_expr(Oid type, PxfFilterDesc * filter); static bool supported_operator_type_scalar_array_op_expr(Oid type, PxfFilterDesc * filter, bool useOr); static void scalar_const_to_str(Const *constval, StringInfo buf); -static void list_const_to_str(Const *constval, StringInfo buf); +static void list_const_to_str(Const *constval, StringInfo buf, bool with_nulls); static List *append_attr_from_var(Var *var, List *attrs); static void add_extra_and_expression_items(List *expressionItems, int extraAndOperatorsNum); static List *get_attrs_from_expr(Expr *expr, bool *expressionIsSupported); +static bool supported_array_type(Oid type); /* * All supported operators and their PXF operator codes. @@ -86,6 +88,7 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {667 /* text_ge */ , PXFOP_GE}, {531 /* textlt */ , PXFOP_NE}, {1209 /* textlike */ , PXFOP_LIKE}, + {1210 /* textnlike */ , PXFOP_NOTLIKE}, /* int2 to int4 */ {Int24EqualOperator /* int24eq */ , PXFOP_EQ}, @@ -167,6 +170,22 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {1125 /* float48ge */ , PXFOP_GE}, {1121 /* float48ne */ , PXFOP_NE}, + /* float84 */ + {1130 /* float84eq */ , PXFOP_EQ}, + {1132 /* float84lt */ , PXFOP_LT}, + {1133 /* float84gt */ , PXFOP_GT}, + {1134 /* float84le */ , PXFOP_LE}, + {1135 /* float84ge */ , PXFOP_GE}, + {1131 /* float84ne */ , PXFOP_NE}, + + /* float4 */ + {Float4EqualOperator /* float4eq */ , PXFOP_EQ}, + {622 /* float4lt */ , PXFOP_LT}, + {623 /* float4gt */ , PXFOP_GT}, + {624 /* float4le */ , PXFOP_LE}, + {625 /* float4ge */ , PXFOP_GE}, + {621 /* float4ne */ , PXFOP_NE}, + /* boolean */ {BooleanEqualOperator /* booleq */ , PXFOP_EQ}, {58 /* boollt */ , PXFOP_LT}, @@ -182,6 +201,8 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {1059 /* bpcharle */ , PXFOP_LE}, {1061 /* bpcharge */ , PXFOP_GE}, {1057 /* bpcharne */ , PXFOP_NE}, + {1211 /* bpcharlike */ , PXFOP_LIKE}, + {1212 /* bpcharnlike */ , PXFOP_NOTLIKE}, /* numeric */ {NumericEqualOperator /* numericeq */ , PXFOP_EQ}, @@ -190,6 +211,60 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {1755 /* numericle */ , PXFOP_LE}, {1757 /* numericge */ , PXFOP_GE}, {1753 /* numericne */ , PXFOP_NE}, + + /* generic array comparison operators */ + {ARRAY_EQ_OP /* array_eq */, PXFOP_EQ}, + {1071 /*array_ne */, PXFOP_NE}, + + /* bytea */ + {ByteaEqualOperator /* byteaeq */ , PXFOP_EQ}, + {1957 /* bytealt */ , PXFOP_LT}, + {1959 /* byteagt */ , PXFOP_GT}, + {1958 /* byteale */ , PXFOP_LE}, + {1960 /* byteage */ , PXFOP_GE}, + {1956 /* byteane */ , PXFOP_NE}, + {2016 /* bytealike */ , PXFOP_LIKE}, + {2017 /* byteanlike */ , PXFOP_NOTLIKE}, + + /* time */ + {TimeEqualOperator /* time_eq */ , PXFOP_EQ}, + {1110 /* time_lt */ , PXFOP_LT}, + {1112 /* time_gt */ , PXFOP_GT}, + {1111 /* time_le */ , PXFOP_LE}, + {1113 /* time_ge */ , PXFOP_GE}, + {1109 /* time_ne */ , PXFOP_NE}, + + /* timestamp with time zone */ + {TimestampTZEqualOperator /* timestamptz_eq */ , PXFOP_EQ}, + {1322 /* timestamptz_lt */ , PXFOP_LT}, + {1324 /* timestamptz_gt */ , PXFOP_GT}, + {1323 /* timestamptz_le */ , PXFOP_LE}, + {1325 /* timestamptz_ge */ , PXFOP_GE}, + {1321 /* timestamptz_ne */ , PXFOP_NE}, + + /* interval */ + {IntervalEqualOperator /* interval_eq */ , PXFOP_EQ}, + {1332 /* interval_lt */ , PXFOP_LT}, + {1334 /* interval_gt */ , PXFOP_GT}, + {1333 /* interval_le */ , PXFOP_LE}, + {1335 /* interval_ge */ , PXFOP_GE}, + {1331 /* interval_ne */ , PXFOP_NE}, + + /* uuid */ + {2972 /* uuid_eq */ , PXFOP_EQ}, + {2974 /* uuid_lt */ , PXFOP_LT}, + {2975 /* uuid_gt */ , PXFOP_GT}, + {2976 /* uuid_le */ , PXFOP_LE}, + {2977 /* uuid_ge */ , PXFOP_GE}, + {2973 /* uuid_ne */ , PXFOP_NE}, + + /* jsonb */ + {3240 /* jsonb_eq */ , PXFOP_EQ}, + {3242 /* jsonb_lt */ , PXFOP_LT}, + {3243 /* jsonb_gt */ , PXFOP_GT}, + {3244 /* jsonb_le */ , PXFOP_LE}, + {3245 /* jsonb_ge */ , PXFOP_GE}, + {3241 /* jsonb_ne */ , PXFOP_NE}, }; @@ -197,50 +272,151 @@ dbop_pxfop_array_map pxf_supported_opr_scalar_array_op_expr[] = { /* int2 */ {Int2EqualOperator /* int2eq */ , PXFOP_IN, true}, + {519 /* int2ne */ , PXFOP_NOTIN, false}, /* int4 */ {Int4EqualOperator /* int4eq */ , PXFOP_IN, true}, + {518 /* int4ne */ , PXFOP_NOTIN, false}, /* int8 */ {Int8EqualOperator /* int8eq */ , PXFOP_IN, true}, + {411 /* int8ne */ , PXFOP_NOTIN, false}, /* text */ {TextEqualOperator /* texteq */ , PXFOP_IN, true}, + {531 /* textne */ , PXFOP_NOTIN, false}, /* int2 to int4 */ {Int24EqualOperator /* int24eq */ , PXFOP_IN, true}, + {538 /* int24ne */ , PXFOP_NOTIN, false}, /* int4 to int2 */ {Int42EqualOperator /* int42eq */ , PXFOP_IN, true}, + {539 /* int42ne */ , PXFOP_NOTIN, false}, /* int8 to int4 */ {Int84EqualOperator /* int84eq */ , PXFOP_IN, true}, + {417 /* int84ne */ , PXFOP_NOTIN, false}, /* int4 to int8 */ {Int48EqualOperator /* int48eq */ , PXFOP_IN, true}, + {36 /* int48ne */ , PXFOP_NOTIN, false}, /* int2 to int8 */ {Int28EqualOperator /* int28eq */ , PXFOP_IN, true}, + {1863 /* int28ne */ , PXFOP_NOTIN, false}, /* int8 to int2 */ {Int82EqualOperator /* int82eq */ , PXFOP_IN, true}, + {1869 /* int82ne */ , PXFOP_NOTIN, false}, /* date */ {DateEqualOperator /* date_eq */ , PXFOP_IN, true}, + {1094 /* date_ne */ , PXFOP_NOTIN, false}, /* timestamp */ {TimestampEqualOperator /* timestamp_eq */ , PXFOP_IN, true}, + {2061 /* date_ne */ , PXFOP_NOTIN, false}, /* float8 */ {Float8EqualOperator /* float8eq */ , PXFOP_IN, true}, + {671 /* float8ne */ , PXFOP_NOTIN, false}, /* float48 */ {1120 /* float48eq */ , PXFOP_IN, true}, + {1121 /* float48ne */ , PXFOP_NOTIN, false}, + + /* float84 */ + {1130 /* float84eq */ , PXFOP_IN, true}, + {1131 /* float84ne */ , PXFOP_NOTIN, false}, + + /* float4 */ + {Float4EqualOperator /* float4eq */ , PXFOP_IN, true}, + {621 /* float4ne */ , PXFOP_NOTIN, false}, /* bpchar */ {BPCharEqualOperator /* bpchareq */ , PXFOP_IN, true}, + {1057 /* bpcharne */ , PXFOP_NOTIN, false}, + + {BooleanEqualOperator /* booleq */ , PXFOP_IN, true}, + {85 /* boolne */ , PXFOP_NOTIN, false}, + + {ByteaEqualOperator /* byteaeq */ , PXFOP_IN, true}, + {1956 /* byteane */ , PXFOP_NOTIN, false}, + + {TimeEqualOperator /* time_eq */ , PXFOP_IN, true}, + {1109 /* time_ne */ , PXFOP_NOTIN, false}, + + {TimestampTZEqualOperator /* time_eq */ , PXFOP_IN, true}, + {1321 /* timestamptz_ne */ , PXFOP_NOTIN, false}, + + {IntervalEqualOperator /* interval_eq */ , PXFOP_IN, true}, + {1331 /* interval_ne */ , PXFOP_NOTIN, false}, + + {NumericEqualOperator /* numericeq */ , PXFOP_IN, true}, + {1753 /* numericne */ , PXFOP_NOTIN, false}, + + {2972 /* uuid_eq */ , PXFOP_IN, true}, + {2973 /* uuid_ne */ , PXFOP_NOTIN, false}, + + {3240 /* jsonb_eq */ , PXFOP_IN, true}, + {3241 /* jsonb_ne */ , PXFOP_NOTIN, false}, }; +/* + * In GPDB 6 the following array macros are not defined. + */ +#ifndef BOOLARRAYOID +#define BOOLARRAYOID 1000 +#endif + +#ifndef BYTEAARRAYOID +#define BYTEAARRAYOID 1001 +#endif + +#ifndef BPCHARARRAYOID +#define BPCHARARRAYOID 1014 +#endif + +#ifndef VARCHARARRAYOID +#define VARCHARARRAYOID 1015 +#endif + +#ifndef DATEARRAYOID +#define DATEARRAYOID 1182 +#endif + +#ifndef TIMEARRAYOID +#define TIMEARRAYOID 1183 +#endif + +#ifndef TIMESTAMPARRAYOID +#define TIMESTAMPARRAYOID 1115 +#endif + +#ifndef TIMESTAMPTZARRAYOID +#define TIMESTAMPTZARRAYOID 1185 +#endif + +#ifndef INTERVALARRAYOID +#define INTERVALARRAYOID 1187 +#endif + +#ifndef NUMERICARRAYOID +#define NUMERICARRAYOID 1231 +#endif + +#ifndef UUIDARRAYOID +#define UUIDARRAYOID 2951 +#endif + +#ifndef JSONBARRAYOID +#define JSONBARRAYOID 3807 +#endif + +#ifndef JSONARRAYOID +#define JSONARRAYOID 199 +#endif Oid pxf_supported_types[] = { @@ -257,11 +433,56 @@ Oid pxf_supported_types[] = CHAROID, DATEOID, TIMESTAMPOID, + BYTEAOID, + TIMEOID, + TIMESTAMPTZOID, + INTERVALOID, + UUIDOID, + JSONBOID, + JSONOID, /* complex datatypes */ INT2ARRAYOID, INT4ARRAYOID, INT8ARRAYOID, - TEXTARRAYOID + TEXTARRAYOID, + BOOLARRAYOID, + BYTEAARRAYOID, + FLOAT4ARRAYOID, + FLOAT8ARRAYOID, + BPCHARARRAYOID, + VARCHARARRAYOID, + DATEARRAYOID, + TIMEARRAYOID, + TIMESTAMPARRAYOID, + TIMESTAMPTZARRAYOID, + INTERVALARRAYOID, + NUMERICARRAYOID, + UUIDARRAYOID, + JSONBARRAYOID, + JSONARRAYOID, +}; + +static Oid pxf_supported_array_types[] = +{ + INT2ARRAYOID, + INT4ARRAYOID, + INT8ARRAYOID, + TEXTARRAYOID, + BOOLARRAYOID, + BYTEAARRAYOID, + FLOAT4ARRAYOID, + FLOAT8ARRAYOID, + BPCHARARRAYOID, + VARCHARARRAYOID, + DATEARRAYOID, + TIMEARRAYOID, + TIMESTAMPARRAYOID, + TIMESTAMPTZARRAYOID, + INTERVALARRAYOID, + NUMERICARRAYOID, + UUIDARRAYOID, + JSONBARRAYOID, + JSONARRAYOID, }; static void @@ -563,6 +784,22 @@ pxf_serialize_filter_list(List *expressionItems) PXF_ATTR_CODE, r.attnum - 1); /* Java attrs are * 0-based */ } + else if (pxfoperand_is_attr(l) && pxfoperand_is_list_const(r)) + { + appendStringInfo(resbuf, "%c%d%c%d%s", + PXF_ATTR_CODE, l.attnum - 1, /* Java attrs are + * 0-based */ + PXF_LIST_CONST_CODE, r.consttype, + r.conststr->data); + } + else if (pxfoperand_is_list_const(l) && pxfoperand_is_attr(r)) + { + appendStringInfo(resbuf, "%c%d%s%c%d", + PXF_LIST_CONST_CODE, l.consttype, + l.conststr->data, + PXF_ATTR_CODE, r.attnum - 1); /* Java attrs are + * 0-based */ + } else { /* @@ -572,7 +809,16 @@ pxf_serialize_filter_list(List *expressionItems) elog(ERROR, "internal error in pxffilters.c:pxf_serialize_" "filter_list. Found a non const+attr filter"); } - appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); + /* + * For NOT LIKE case the negation is applied to PXFOP_LIKE. + */ + if (o == PXFOP_NOTLIKE) + { + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, PXFOP_LIKE); + appendStringInfo(resbuf, "%c%d", PXF_LOGICAL_OPERATOR_CODE, NOT_EXPR); + } + else + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); pxf_free_filter(filter); } else @@ -611,7 +857,7 @@ pxf_serialize_filter_list(List *expressionItems) else if (pxfoperand_is_list_const(l) && pxfoperand_is_attr(r)) { appendStringInfo(resbuf, "%c%d%s%c%d", - PXF_SCALAR_CONST_CODE, l.consttype, + PXF_LIST_CONST_CODE, l.consttype, l.conststr->data, PXF_ATTR_CODE, r.attnum - 1); /* Java attrs are * 0-based */ @@ -625,7 +871,16 @@ pxf_serialize_filter_list(List *expressionItems) elog(ERROR, "internal error in pxffilters.c:pxf_serialize_" "filter_list. Found a non const+attr filter"); } - appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); + /* + * For NOT IN case the negation is applied to PXFOP_IN. + */ + if (o == PXFOP_NOTIN) + { + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, PXFOP_IN); + appendStringInfo(resbuf, "%c%d", PXF_LOGICAL_OPERATOR_CODE, NOT_EXPR); + } + else + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); pxf_free_filter(filter); } else @@ -712,6 +967,8 @@ opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc * filter) Node *rightop = NULL; Oid rightop_type = InvalidOid; Oid leftop_type = InvalidOid; + TypeCacheEntry *typentry = NULL; + ArrayType *arr = NULL; if ((!expr) || (!filter)) return false; @@ -735,18 +992,6 @@ opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc * filter) rightop_type, nodeTag(rightop), expr->opno); - /* - * check if supported type - - */ - if (!supported_filter_type(rightop_type) || !supported_filter_type(leftop_type)) - return false; - - /* - * check if supported operator - - */ - if (!supported_operator_type_op_expr(expr->opno, filter)) - return false; - if (IsA(leftop, RelabelType)) { /* @@ -775,6 +1020,60 @@ opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc * filter) } } + /* + * check if GPDB supports scalar operators for the arrays elements before + * sending the read request. Otherwise GPDB will reject the query during + * ExecQual execution anyway after data is returned from pxf, because the + * filter operator is not supported (for arrays comparison this validation + * is not held during parsing stage and we have to prevent unnecessary + * manipulations). Checking the existence of equality operator for array + * element type is enough to validate other scalar operators as well. + */ + if (IsA(leftop, Var) && IsA(rightop, Const) && + supported_array_type(rightop_type)) + { + Const *right = (Const *) rightop; + + if (right->constisnull) + return false; + + arr = DatumGetArrayTypeP(right->constvalue); + } + else if (IsA(leftop, Const) && IsA(rightop, Var) && + supported_array_type(leftop_type)) + { + Const *left = (Const *) leftop; + + if (left->constisnull) + return false; + + arr = DatumGetArrayTypeP(left->constvalue); + } + + if (arr != NULL) + { + typentry = lookup_type_cache(ARR_ELEMTYPE(arr), + TYPECACHE_EQ_OPR_FINFO); + + if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) + ereport(ERROR, + (errcode(ERRCODE_UNDEFINED_FUNCTION), + errmsg("could not identify a comparison operator for type %s", + format_type_be(ARR_ELEMTYPE(arr))))); + } + + /* + * check if supported type - + */ + if (!supported_filter_type(rightop_type) || !supported_filter_type(leftop_type)) + return false; + + /* + * check if supported operator - + */ + if (!supported_operator_type_op_expr(expr->opno, filter)) + return false; + /* arguments must be VAR and CONST */ if (IsA(leftop, Var) && IsA(rightop, Const)) { @@ -784,20 +1083,42 @@ opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc * filter) if (filter->l.attnum <= InvalidAttrNumber) return false; /* system attr not supported */ - filter->r.opcode = PXF_SCALAR_CONST_CODE; filter->r.attnum = InvalidAttrNumber; filter->r.conststr = makeStringInfo(); - scalar_const_to_str((Const *) rightop, filter->r.conststr); filter->r.consttype = ((Const *) rightop)->consttype; + + /* + * If we faced the generic array comparison operator, represent + * the array through list const. + */ + if (supported_array_type(rightop_type)) + { + filter->r.opcode = PXF_LIST_CONST_CODE; + list_const_to_str((Const *) rightop, filter->r.conststr, true); + } + else + { + filter->r.opcode = PXF_SCALAR_CONST_CODE; + scalar_const_to_str((Const *) rightop, filter->r.conststr); + } } else if (IsA(leftop, Const) && IsA(rightop, Var)) { - filter->l.opcode = PXF_SCALAR_CONST_CODE; filter->l.attnum = InvalidAttrNumber; filter->l.conststr = makeStringInfo(); - scalar_const_to_str((Const *) leftop, filter->l.conststr); filter->l.consttype = ((Const *) leftop)->consttype; + if (supported_array_type(leftop_type)) + { + filter->l.opcode = PXF_LIST_CONST_CODE; + list_const_to_str((Const *) leftop, filter->l.conststr, true); + } + else + { + filter->l.opcode = PXF_SCALAR_CONST_CODE; + scalar_const_to_str((Const *) leftop, filter->l.conststr); + } + filter->r.opcode = PXF_ATTR_CODE; filter->r.attnum = ((Var *) rightop)->varattno; filter->r.consttype = InvalidOid; @@ -837,6 +1158,34 @@ scalar_array_op_expr_to_pxffilter(ScalarArrayOpExpr *expr, PxfFilterDesc * filte if (!supported_operator_type_scalar_array_op_expr(expr->opno, filter, expr->useOr)) return false; + if (IsA(leftop, RelabelType)) + { + /* + * Checks if the arg is of type Var, and if it is uses the Var as the left operator + */ + RelabelType *relabelType = (RelabelType *) leftop; + Expr *exprNode = relabelType->arg; + + if (IsA(exprNode, Var)) + { + leftop = (Node *)exprNode; + } + } + + if (IsA(rightop, RelabelType)) + { + /* + * Checks if the arg is of type Var, and if it is uses the Var as the right operator + */ + RelabelType *relabelType = (RelabelType *) rightop; + Expr *exprNode = relabelType->arg; + + if (IsA(exprNode, Var)) + { + rightop = (Node *)exprNode; + } + } + if (IsA(leftop, Var) &&IsA(rightop, Const)) { filter->l.opcode = PXF_ATTR_CODE; @@ -848,7 +1197,7 @@ scalar_array_op_expr_to_pxffilter(ScalarArrayOpExpr *expr, PxfFilterDesc * filte filter->r.opcode = PXF_LIST_CONST_CODE; filter->r.attnum = InvalidAttrNumber; filter->r.conststr = makeStringInfo(); - list_const_to_str((Const *) rightop, filter->r.conststr); + list_const_to_str((Const *) rightop, filter->r.conststr, false); filter->r.consttype = ((Const *) rightop)->consttype; } else if (IsA(leftop, Const) &&IsA(rightop, Var)) @@ -856,7 +1205,7 @@ scalar_array_op_expr_to_pxffilter(ScalarArrayOpExpr *expr, PxfFilterDesc * filte filter->l.opcode = PXF_LIST_CONST_CODE; filter->l.attnum = InvalidAttrNumber; filter->l.conststr = makeStringInfo(); - list_const_to_str((Const *) leftop, filter->l.conststr); + list_const_to_str((Const *) leftop, filter->l.conststr, false); filter->l.consttype = ((Const *) leftop)->consttype; filter->r.opcode = PXF_ATTR_CODE; @@ -1083,6 +1432,28 @@ supported_filter_type(Oid type) return false; } +/* + * supported_array_type + * + * Return true if the array type is supported by pxffilters. + * Supported defines are defined in pxf_supported_array_types. + */ +static bool +supported_array_type(Oid type) +{ + int nargs = sizeof(pxf_supported_array_types) / sizeof(Oid); + int i; + + /* is type supported? */ + for (i = 0; i < nargs; i++) + { + if (type == pxf_supported_array_types[i]) + return true; + } + + return false; +} + static bool supported_operator_type_op_expr(Oid type, PxfFilterDesc * filter) { @@ -1171,8 +1542,19 @@ scalar_const_to_str(Const *constval, StringInfo buf) case BYTEAOID: case DATEOID: case TIMESTAMPOID: + case TIMEOID: + case TIMESTAMPTZOID: + case INTERVALOID: + case UUIDOID: + case JSONBOID: appendStringInfo(buf, "%s", extval); break; + case BOOLOID: + if (*extval == 't') + appendStringInfo(buf, "%s", TrueConstValue); + else + appendStringInfo(buf, "%s", FalseConstValue); + break; default: /* should never happen. we filter on types earlier */ elog(ERROR, @@ -1187,20 +1569,14 @@ scalar_const_to_str(Const *constval, StringInfo buf) * list_const_to_str * * Extracts the value stored in a list constant to a string. - * Currently supported data types: int2[], int4[], int8[], text[] * Example: * Input: ['abc', 'xyz'] * Output: s3dabcs3dxyz * */ static void -list_const_to_str(Const *constval, StringInfo buf) +list_const_to_str(Const *constval, StringInfo buf, bool with_nulls) { - StringInfo interm_buf; - Datum *dats; - ArrayType *arr; - int len; - if (constval->constisnull) { elog(DEBUG1, "Null constant is not expected in this context."); @@ -1213,86 +1589,85 @@ list_const_to_str(Const *constval, StringInfo buf) return; } - arr = DatumGetArrayTypeP(constval->constvalue); - - interm_buf = makeStringInfo(); - switch (constval->consttype) { case INT2ARRAYOID: - { - int16 value; - - deconstruct_array(arr, INT2OID, sizeof(value), true, 's', &dats, NULL, &len); - - for (int i = 0; i < len; i++) - { - value = DatumGetInt16(dats[i]); - - appendStringInfo(interm_buf, "%hd", value); - - appendStringInfo(buf, "%c%d%c%s", - PXF_SIZE_BYTES, interm_buf->len, - PXF_CONST_DATA, interm_buf->data); - resetStringInfo(interm_buf); - } - break; - } case INT4ARRAYOID: - { - int32 value; - - deconstruct_array(arr, INT4OID, sizeof(value), true, 'i', &dats, NULL, &len); - - for (int i = 0; i < len; i++) - { - value = DatumGetInt32(dats[i]); - - appendStringInfo(interm_buf, "%d", value); - - appendStringInfo(buf, "%c%d%c%s", - PXF_SIZE_BYTES, interm_buf->len, - PXF_CONST_DATA, interm_buf->data); - resetStringInfo(interm_buf); - } - break; - } case INT8ARRAYOID: - { - int64 value; - - deconstruct_array(arr, INT8OID, sizeof(value), true, 'd', &dats, NULL, &len); - - for (int i = 0; i < len; i++) - { - value = DatumGetInt64(dats[i]); - - appendStringInfo(interm_buf, "%ld", value); - - appendStringInfo(buf, "%c%d%c%s", - PXF_SIZE_BYTES, interm_buf->len, - PXF_CONST_DATA, interm_buf->data); - resetStringInfo(interm_buf); - } - break; - } case TEXTARRAYOID: + case BOOLARRAYOID: + case BYTEAARRAYOID: + case FLOAT4ARRAYOID: + case FLOAT8ARRAYOID: + case BPCHARARRAYOID: + case VARCHARARRAYOID: + case DATEARRAYOID: + case TIMEARRAYOID: + case TIMESTAMPARRAYOID: + case TIMESTAMPTZARRAYOID: + case INTERVALARRAYOID: + case NUMERICARRAYOID: + case UUIDARRAYOID: + case JSONBARRAYOID: { - char *value; - - deconstruct_array(arr, TEXTOID, -1, false, 'i', &dats, NULL, &len); + StringInfo interm_buf; + Datum *dats; + ArrayType *arr; + int len; + Oid typoutput; + bool typIsVarlena; + int16 elmlen; + bool elmbyval; + char elmalign; + bool *elem_nulls = NULL; + + arr = DatumGetArrayTypeP(constval->constvalue); + + interm_buf = makeStringInfo(); + /* + * Get necessary data for deconstruct_array() and output function + * from the catalog. + */ + get_typlenbyvalalign(ARR_ELEMTYPE(arr), &elmlen, &elmbyval, &elmalign); + deconstruct_array(arr, + ARR_ELEMTYPE(arr), + elmlen, + elmbyval, + elmalign, + &dats, + with_nulls ? &elem_nulls : NULL, + &len); + + getTypeOutputInfo(ARR_ELEMTYPE(arr), &typoutput, &typIsVarlena); for (int i = 0; i < len; i++) { - value = DatumGetCString(DirectFunctionCall1(textout, dats[i])); + char *extval = NullConstValue; - appendStringInfo(interm_buf, "%s", value); + if (!with_nulls || !elem_nulls[i]) + extval = OidOutputFunctionCall(typoutput, dats[i]); + + if (ARR_ELEMTYPE(arr) != BOOLOID) + appendStringInfo(interm_buf, "%s", extval); + else + { + if (*extval == 't') + appendStringInfo(interm_buf, "%s", TrueConstValue); + else if (*extval == 'f') + appendStringInfo(interm_buf, "%s", FalseConstValue); + else + appendStringInfo(interm_buf, "%s", NullConstValue); + } appendStringInfo(buf, "%c%d%c%s", PXF_SIZE_BYTES, interm_buf->len, PXF_CONST_DATA, interm_buf->data); resetStringInfo(interm_buf); + + if (!with_nulls || !elem_nulls[i]) + pfree(extval); } + pfree(interm_buf->data); break; } default: @@ -1303,8 +1678,6 @@ list_const_to_str(Const *constval, StringInfo buf) constval->consttype); } - - pfree(interm_buf->data); } /* diff --git a/external-table/src/pxffilters.h b/external-table/src/pxffilters.h index 0547ccfe8d..eb9469db8f 100644 --- a/external-table/src/pxffilters.h +++ b/external-table/src/pxffilters.h @@ -31,7 +31,7 @@ /* - * each supported operator has a code that will describe the operator + * each supported operator has a code. Some codes will describe the operator * type in the final serialized string that gets pushed down. * * NOTE: the codes could be forced into a single byte, but list will @@ -48,7 +48,15 @@ typedef enum PxfOperatorCode PXFOP_LIKE, PXFOP_IS_NULL, PXFOP_IS_NOTNULL, - PXFOP_IN + PXFOP_IN, + + /* + * Not serialized operators. They're used + * to indicate negation before corresponding + * serialized operators. NOT LIKE -> NOT (LIKE) + */ + PXFOP_NOTIN, + PXFOP_NOTLIKE } PxfOperatorCode; diff --git a/fdw/pxf_filter.c b/fdw/pxf_filter.c index 79b90b9b60..078f53062b 100644 --- a/fdw/pxf_filter.c +++ b/fdw/pxf_filter.c @@ -28,6 +28,7 @@ #include "utils/builtins.h" #include "utils/guc.h" #include "utils/lsyscache.h" +#include "utils/typcache.h" static List *PxfMakeExpressionItemsList(List *quals, Node *parent); static void PxfFreeFilter(PxfFilterDesc *filter); @@ -42,11 +43,12 @@ static bool SupportedOperatorTypeScalarArrayOpExpr(Oid type, PxfFilterDesc *filter, bool useOr); static void ScalarConstToStr(Const *constval, StringInfo buf); -static void ListConstToStr(Const *constval, StringInfo buf); +static void ListConstToStr(Const *constval, StringInfo buf, bool with_nulls); static List *AppendAttrFromVar(Var *var, List *attrs); static void AddExtraAndExpressionItems(List *expressionItems, int extraAndOperatorsNum); static List *GetAttrsFromExpr(Expr *expr, bool *expressionIsSupported); +static bool SupportedArrayType(Oid type); /* * All supported operators and their PXF operator codes. @@ -88,6 +90,7 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {667 /* text_ge */ , PXFOP_GE}, {531 /* textlt */ , PXFOP_NE}, {1209 /* textlike */ , PXFOP_LIKE}, + {1210 /* textnlike */ , PXFOP_NOTLIKE}, /* int2 to int4 */ {Int24EqualOperator /* int24eq */ , PXFOP_EQ}, @@ -169,6 +172,22 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {1125 /* float48ge */ , PXFOP_GE}, {1121 /* float48ne */ , PXFOP_NE}, + /* float84 */ + {1130 /* float84eq */ , PXFOP_EQ}, + {1132 /* float84lt */ , PXFOP_LT}, + {1133 /* float84gt */ , PXFOP_GT}, + {1134 /* float84le */ , PXFOP_LE}, + {1135 /* float84ge */ , PXFOP_GE}, + {1131 /* float84ne */ , PXFOP_NE}, + + /* float4 */ + {Float4EqualOperator /* float4eq */ , PXFOP_EQ}, + {622 /* float4lt */ , PXFOP_LT}, + {623 /* float4gt */ , PXFOP_GT}, + {624 /* float4le */ , PXFOP_LE}, + {625 /* float4ge */ , PXFOP_GE}, + {621 /* float4ne */ , PXFOP_NE}, + /* boolean */ {BooleanEqualOperator /* booleq */ , PXFOP_EQ}, {58 /* boollt */ , PXFOP_LT}, @@ -184,6 +203,8 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {1059 /* bpcharle */ , PXFOP_LE}, {1061 /* bpcharge */ , PXFOP_GE}, {1057 /* bpcharne */ , PXFOP_NE}, + {1211 /* bpcharlike */ , PXFOP_LIKE}, + {1212 /* bpcharnlike */ , PXFOP_NOTLIKE}, /* numeric */ {NumericEqualOperator /* numericeq */ , PXFOP_EQ}, @@ -192,65 +213,221 @@ dbop_pxfop_map pxf_supported_opr_op_expr[] = {1755 /* numericle */ , PXFOP_LE}, {1757 /* numericge */ , PXFOP_GE}, {1753 /* numericne */ , PXFOP_NE}, + + /* generic array comparison operators */ + {ARRAY_EQ_OP /* array_eq */, PXFOP_EQ}, + {1071 /*array_ne */, PXFOP_NE}, + + /* bytea */ + {ByteaEqualOperator /* byteaeq */ , PXFOP_EQ}, + {1957 /* bytealt */ , PXFOP_LT}, + {1959 /* byteagt */ , PXFOP_GT}, + {1958 /* byteale */ , PXFOP_LE}, + {1960 /* byteage */ , PXFOP_GE}, + {1956 /* byteane */ , PXFOP_NE}, + {2016 /* bytealike */ , PXFOP_LIKE}, + {2017 /* byteanlike */ , PXFOP_NOTLIKE}, + + /* time */ + {TimeEqualOperator /* time_eq */ , PXFOP_EQ}, + {1110 /* time_lt */ , PXFOP_LT}, + {1112 /* time_gt */ , PXFOP_GT}, + {1111 /* time_le */ , PXFOP_LE}, + {1113 /* time_ge */ , PXFOP_GE}, + {1109 /* time_ne */ , PXFOP_NE}, + + /* timestamp with time zone */ + {TimestampTZEqualOperator /* timestamptz_eq */ , PXFOP_EQ}, + {1322 /* timestamptz_lt */ , PXFOP_LT}, + {1324 /* timestamptz_gt */ , PXFOP_GT}, + {1323 /* timestamptz_le */ , PXFOP_LE}, + {1325 /* timestamptz_ge */ , PXFOP_GE}, + {1321 /* timestamptz_ne */ , PXFOP_NE}, + + /* interval */ + {IntervalEqualOperator /* interval_eq */ , PXFOP_EQ}, + {1332 /* interval_lt */ , PXFOP_LT}, + {1334 /* interval_gt */ , PXFOP_GT}, + {1333 /* interval_le */ , PXFOP_LE}, + {1335 /* interval_ge */ , PXFOP_GE}, + {1331 /* interval_ne */ , PXFOP_NE}, + + /* uuid */ + {2972 /* uuid_eq */ , PXFOP_EQ}, + {2974 /* uuid_lt */ , PXFOP_LT}, + {2975 /* uuid_gt */ , PXFOP_GT}, + {2976 /* uuid_le */ , PXFOP_LE}, + {2977 /* uuid_ge */ , PXFOP_GE}, + {2973 /* uuid_ne */ , PXFOP_NE}, + + /* jsonb */ + {3240 /* jsonb_eq */ , PXFOP_EQ}, + {3242 /* jsonb_lt */ , PXFOP_LT}, + {3243 /* jsonb_gt */ , PXFOP_GT}, + {3244 /* jsonb_le */ , PXFOP_LE}, + {3245 /* jsonb_ge */ , PXFOP_GE}, + {3241 /* jsonb_ne */ , PXFOP_NE}, }; dbop_pxfop_array_map pxf_supported_opr_scalar_array_op_expr[] = { /* int2 */ {Int2EqualOperator /* int2eq */ , PXFOP_IN, true}, + {519 /* int2ne */ , PXFOP_NOTIN, false}, /* int4 */ {Int4EqualOperator /* int4eq */ , PXFOP_IN, true}, + {518 /* int4ne */ , PXFOP_NOTIN, false}, /* int8 */ {Int8EqualOperator /* int8eq */ , PXFOP_IN, true}, + {411 /* int8ne */ , PXFOP_NOTIN, false}, /* text */ {TextEqualOperator /* texteq */ , PXFOP_IN, true}, + {531 /* textne */ , PXFOP_NOTIN, false}, /* int2 to int4 */ {Int24EqualOperator /* int24eq */ , PXFOP_IN, true}, + {538 /* int24ne */ , PXFOP_NOTIN, false}, /* int4 to int2 */ {Int42EqualOperator /* int42eq */ , PXFOP_IN, true}, + {539 /* int42ne */ , PXFOP_NOTIN, false}, /* int8 to int4 */ {Int84EqualOperator /* int84eq */ , PXFOP_IN, true}, + {417 /* int84ne */ , PXFOP_NOTIN, false}, /* int4 to int8 */ {Int48EqualOperator /* int48eq */ , PXFOP_IN, true}, + {36 /* int48ne */ , PXFOP_NOTIN, false}, /* int2 to int8 */ {Int28EqualOperator /* int28eq */ , PXFOP_IN, true}, + {1863 /* int28ne */ , PXFOP_NOTIN, false}, /* int8 to int2 */ {Int82EqualOperator /* int82eq */ , PXFOP_IN, true}, + {1869 /* int82ne */ , PXFOP_NOTIN, false}, /* date */ {DateEqualOperator /* date_eq */ , PXFOP_IN, true}, + {1094 /* date_ne */ , PXFOP_NOTIN, false}, /* timestamp */ {TimestampEqualOperator /* timestamp_eq */ , PXFOP_IN, true}, + {2061 /* date_ne */ , PXFOP_NOTIN, false}, /* float8 */ {Float8EqualOperator /* float8eq */ , PXFOP_IN, true}, + {671 /* float8ne */ , PXFOP_NOTIN, false}, /* float48 */ {1120 /* float48eq */ , PXFOP_IN, true}, + {1121 /* float48ne */ , PXFOP_NOTIN, false}, + + /* float84 */ + {1130 /* float84eq */ , PXFOP_IN, true}, + {1131 /* float84ne */ , PXFOP_NOTIN, false}, + + /* float4 */ + {Float4EqualOperator /* float4eq */ , PXFOP_IN, true}, + {621 /* float4ne */ , PXFOP_NOTIN, false}, /* bpchar */ {BPCharEqualOperator /* bpchareq */ , PXFOP_IN, true}, + {1057 /* bpcharne */ , PXFOP_NOTIN, false}, + + {BooleanEqualOperator /* booleq */ , PXFOP_IN, true}, + {85 /* boolne */ , PXFOP_NOTIN, false}, + + {ByteaEqualOperator /* byteaeq */ , PXFOP_IN, true}, + {1956 /* byteane */ , PXFOP_NOTIN, false}, + + {TimeEqualOperator /* time_eq */ , PXFOP_IN, true}, + {1109 /* time_ne */ , PXFOP_NOTIN, false}, + + {TimestampTZEqualOperator /* time_eq */ , PXFOP_IN, true}, + {1321 /* timestamptz_ne */ , PXFOP_NOTIN, false}, + + {IntervalEqualOperator /* interval_eq */ , PXFOP_IN, true}, + {1331 /* interval_ne */ , PXFOP_NOTIN, false}, + + {NumericEqualOperator /* numericeq */ , PXFOP_IN, true}, + {1753 /* numericne */ , PXFOP_NOTIN, false}, + + {2972 /* uuid_eq */ , PXFOP_IN, true}, + {2973 /* uuid_ne */ , PXFOP_NOTIN, false}, + + {3240 /* jsonb_eq */ , PXFOP_IN, true}, + {3241 /* jsonb_ne */ , PXFOP_NOTIN, false}, }; +/* + * In GPDB 6 the following array macros are not defined. + */ +#ifndef BOOLARRAYOID +#define BOOLARRAYOID 1000 +#endif + +#ifndef BYTEAARRAYOID +#define BYTEAARRAYOID 1001 +#endif + +#ifndef BPCHARARRAYOID +#define BPCHARARRAYOID 1014 +#endif + +#ifndef VARCHARARRAYOID +#define VARCHARARRAYOID 1015 +#endif + +#ifndef DATEARRAYOID +#define DATEARRAYOID 1182 +#endif + +#ifndef TIMEARRAYOID +#define TIMEARRAYOID 1183 +#endif + +#ifndef TIMESTAMPARRAYOID +#define TIMESTAMPARRAYOID 1115 +#endif + +#ifndef TIMESTAMPTZARRAYOID +#define TIMESTAMPTZARRAYOID 1185 +#endif + +#ifndef INTERVALARRAYOID +#define INTERVALARRAYOID 1187 +#endif + +#ifndef NUMERICARRAYOID +#define NUMERICARRAYOID 1231 +#endif + +#ifndef UUIDARRAYOID +#define UUIDARRAYOID 2951 +#endif + +#ifndef JSONBARRAYOID +#define JSONBARRAYOID 3807 +#endif + +#ifndef JSONARRAYOID +#define JSONARRAYOID 199 +#endif + Oid pxf_supported_types[] = { INT2OID, @@ -266,11 +443,56 @@ Oid pxf_supported_types[] = CHAROID, DATEOID, TIMESTAMPOID, + BYTEAOID, + TIMEOID, + TIMESTAMPTZOID, + INTERVALOID, + UUIDOID, + JSONBOID, + JSONOID, /* complex datatypes */ INT2ARRAYOID, INT4ARRAYOID, INT8ARRAYOID, - TEXTARRAYOID + TEXTARRAYOID, + BOOLARRAYOID, + BYTEAARRAYOID, + FLOAT4ARRAYOID, + FLOAT8ARRAYOID, + BPCHARARRAYOID, + VARCHARARRAYOID, + DATEARRAYOID, + TIMEARRAYOID, + TIMESTAMPARRAYOID, + TIMESTAMPTZARRAYOID, + INTERVALARRAYOID, + NUMERICARRAYOID, + UUIDARRAYOID, + JSONBARRAYOID, + JSONARRAYOID, +}; + +static Oid pxf_supported_array_types[] = +{ + INT2ARRAYOID, + INT4ARRAYOID, + INT8ARRAYOID, + TEXTARRAYOID, + BOOLARRAYOID, + BYTEAARRAYOID, + FLOAT4ARRAYOID, + FLOAT8ARRAYOID, + BPCHARARRAYOID, + VARCHARARRAYOID, + DATEARRAYOID, + TIMEARRAYOID, + TIMESTAMPARRAYOID, + TIMESTAMPTZARRAYOID, + INTERVALARRAYOID, + NUMERICARRAYOID, + UUIDARRAYOID, + JSONBARRAYOID, + JSONARRAYOID, }; static void @@ -613,6 +835,22 @@ PxfSerializeFilterList(List *filters) r.attnum - 1); /* Java attrs are * 0-based */ } + else if (pxfoperand_is_attr(l) && pxfoperand_is_list_const(r)) + { + appendStringInfo(resbuf, "%c%d%c%d%s", + PXF_ATTR_CODE, l.attnum - 1, /* Java attrs are + * 0-based */ + PXF_LIST_CONST_CODE, r.consttype, + r.conststr->data); + } + else if (pxfoperand_is_list_const(l) && pxfoperand_is_attr(r)) + { + appendStringInfo(resbuf, "%c%d%s%c%d", + PXF_LIST_CONST_CODE, l.consttype, + l.conststr->data, + PXF_ATTR_CODE, r.attnum - 1); /* Java attrs are + * 0-based */ + } else { /* @@ -623,7 +861,16 @@ PxfSerializeFilterList(List *filters) "internal error in pxf_filter.c:PxfSerializeFilterList" ". Found a non const+attr filter"); } - appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); + /* + * For NOT LIKE case the negation is applied to PXFOP_LIKE. + */ + if (o == PXFOP_NOTLIKE) + { + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, PXFOP_LIKE); + appendStringInfo(resbuf, "%c%d", PXF_LOGICAL_OPERATOR_CODE, NOT_EXPR); + } + else + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); PxfFreeFilter(filter); } else @@ -667,7 +914,7 @@ PxfSerializeFilterList(List *filters) pxfoperand_is_attr(r)) { appendStringInfo(resbuf, "%c%d%s%c%d", - PXF_SCALAR_CONST_CODE, l.consttype, + PXF_LIST_CONST_CODE, l.consttype, l.conststr->data, PXF_ATTR_CODE, r.attnum - 1); /* Java attrs are * 0-based */ @@ -682,7 +929,16 @@ PxfSerializeFilterList(List *filters) "internal error in pxf_filter.c:PxfSerializeFilterList" ". Found a non const+attr filter"); } - appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); + /* + * For NOT IN case the negation is applied to PXFOP_IN. + */ + if (o == PXFOP_NOTIN) + { + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, PXFOP_IN); + appendStringInfo(resbuf, "%c%d", PXF_LOGICAL_OPERATOR_CODE, NOT_EXPR); + } + else + appendStringInfo(resbuf, "%c%d", PXF_OPERATOR_CODE, o); PxfFreeFilter(filter); } else @@ -789,6 +1045,8 @@ OpExprToPxfFilter(OpExpr *expr, PxfFilterDesc *filter) Node *rightop = NULL; Oid rightop_type = InvalidOid; Oid leftop_type = InvalidOid; + TypeCacheEntry *typentry = NULL; + ArrayType *arr = NULL; if ((!expr) || (!filter)) return false; @@ -812,18 +1070,6 @@ OpExprToPxfFilter(OpExpr *expr, PxfFilterDesc *filter) rightop_type, nodeTag(rightop), expr->opno); - /* - * check if supported type - - */ - if (!SupportedFilterType(rightop_type) || !SupportedFilterType(leftop_type)) - return false; - - /* - * check if supported operator - - */ - if (!SupportedOperatorTypeOpExpr(expr->opno, filter)) - return false; - if (IsA(leftop, RelabelType)) { /* @@ -852,6 +1098,59 @@ OpExprToPxfFilter(OpExpr *expr, PxfFilterDesc *filter) } } + /* + * check if GPDB supports scalar operators for the arrays elements before + * sending the read request. Otherwise GPDB will reject the query during + * ExecQual execution anyway after data is returned from pxf, because the + * filter operator is not supported (for arrays comparison this validation + * is not held during parsing stage and we have to prevent unnecessary + * manipulations). Checking the existence of equality operator for array + * element type is enough to validate other scalar operators as well. + */ + if (IsA(leftop, Var) && IsA(rightop, Const) && + SupportedArrayType(rightop_type)) + { + Const *right = (Const *) rightop; + + if (right->constisnull) + return false; + + arr = DatumGetArrayTypeP(right->constvalue); + } + else if (IsA(leftop, Const) && IsA(rightop, Var) && + SupportedArrayType(leftop_type)) + { + Const *left = (Const *) leftop; + + if (left->constisnull) + return false; + + arr = DatumGetArrayTypeP(left->constvalue); + } + + if (arr != NULL) + { + typentry = lookup_type_cache(ARR_ELEMTYPE(arr), + TYPECACHE_EQ_OPR_FINFO); + + if (!OidIsValid(typentry->eq_opr_finfo.fn_oid)) + ereport(ERROR, + (errcode(ERRCODE_UNDEFINED_FUNCTION), + errmsg("could not identify a comparison operator for type %s", + format_type_be(ARR_ELEMTYPE(arr))))); + } + + /* + * check if supported type - + */ + if (!SupportedFilterType(rightop_type) || !SupportedFilterType(leftop_type)) + return false; + + /* + * check if supported operator - + */ + if (!SupportedOperatorTypeOpExpr(expr->opno, filter)) + return false; /* arguments must be VAR and CONST */ if (IsA(leftop, Var) && IsA(rightop, Const)) @@ -862,19 +1161,40 @@ OpExprToPxfFilter(OpExpr *expr, PxfFilterDesc *filter) if (filter->l.attnum <= InvalidAttrNumber) return false; /* system attr not supported */ - filter->r.opcode = PXF_SCALAR_CONST_CODE; filter->r.attnum = InvalidAttrNumber; filter->r.conststr = makeStringInfo(); - ScalarConstToStr((Const *) rightop, filter->r.conststr); filter->r.consttype = ((Const *) rightop)->consttype; + + /* + * If we faced the generic array comparison operator, represent + * the array through list const. + */ + if (SupportedArrayType(rightop_type)) + { + filter->r.opcode = PXF_LIST_CONST_CODE; + ListConstToStr((Const *) rightop, filter->r.conststr, true); + } + else + { + filter->r.opcode = PXF_SCALAR_CONST_CODE; + ScalarConstToStr((Const *) rightop, filter->r.conststr); + } } else if (IsA(leftop, Const) && IsA(rightop, Var)) { - filter->l.opcode = PXF_SCALAR_CONST_CODE; filter->l.attnum = InvalidAttrNumber; filter->l.conststr = makeStringInfo(); - ScalarConstToStr((Const *) leftop, filter->l.conststr); filter->l.consttype = ((Const *) leftop)->consttype; + if (SupportedArrayType(leftop_type)) + { + filter->l.opcode = PXF_LIST_CONST_CODE; + ListConstToStr((Const *) leftop, filter->l.conststr, true); + } + else + { + filter->l.opcode = PXF_SCALAR_CONST_CODE; + ScalarConstToStr((Const *) leftop, filter->l.conststr); + } filter->r.opcode = PXF_ATTR_CODE; filter->r.attnum = ((Var *) rightop)->varattno; @@ -917,6 +1237,34 @@ ScalarArrayOpExprToPxfFilter(ScalarArrayOpExpr *expr, PxfFilterDesc *filter) expr->useOr)) return false; + if (IsA(leftop, RelabelType)) + { + /* + * Checks if the arg is of type Var, and if it is uses the Var as the left operator + */ + RelabelType *relabelType = (RelabelType *) leftop; + Expr *exprNode = relabelType->arg; + + if (IsA(exprNode, Var)) + { + leftop = (Node *)exprNode; + } + } + + if (IsA(rightop, RelabelType)) + { + /* + * Checks if the arg is of type Var, and if it is uses the Var as the right operator + */ + RelabelType *relabelType = (RelabelType *) rightop; + Expr *exprNode = relabelType->arg; + + if (IsA(exprNode, Var)) + { + rightop = (Node *)exprNode; + } + } + if (IsA(leftop, Var) &&IsA(rightop, Const)) { filter->l.opcode = PXF_ATTR_CODE; @@ -928,7 +1276,7 @@ ScalarArrayOpExprToPxfFilter(ScalarArrayOpExpr *expr, PxfFilterDesc *filter) filter->r.opcode = PXF_LIST_CONST_CODE; filter->r.attnum = InvalidAttrNumber; filter->r.conststr = makeStringInfo(); - ListConstToStr((Const *) rightop, filter->r.conststr); + ListConstToStr((Const *) rightop, filter->r.conststr, false); filter->r.consttype = ((Const *) rightop)->consttype; } else if (IsA(leftop, Const) &&IsA(rightop, Var)) @@ -936,7 +1284,7 @@ ScalarArrayOpExprToPxfFilter(ScalarArrayOpExpr *expr, PxfFilterDesc *filter) filter->l.opcode = PXF_LIST_CONST_CODE; filter->l.attnum = InvalidAttrNumber; filter->l.conststr = makeStringInfo(); - ListConstToStr((Const *) leftop, filter->l.conststr); + ListConstToStr((Const *) leftop, filter->l.conststr, false); filter->l.consttype = ((Const *) leftop)->consttype; filter->r.opcode = PXF_ATTR_CODE; @@ -1169,6 +1517,28 @@ SupportedFilterType(Oid type) return false; } +/* +* SupportedArrayType +* +* Return true if the array type is supported by pxf_filter. +* Supported defines are defined in pxf_supported_array_types. +*/ +static bool +SupportedArrayType(Oid type) +{ + int nargs = sizeof(pxf_supported_array_types) / sizeof(Oid); + int i; + + /* is type supported? */ + for (i = 0; i < nargs; i++) + { + if (type == pxf_supported_array_types[i]) + return true; + } + + return false; +} + static bool SupportedOperatorTypeOpExpr(Oid type, PxfFilterDesc *filter) { @@ -1265,8 +1635,19 @@ ScalarConstToStr(Const *constval, StringInfo buf) case BYTEAOID: case DATEOID: case TIMESTAMPOID: + case TIMEOID: + case TIMESTAMPTZOID: + case INTERVALOID: + case UUIDOID: + case JSONBOID: appendStringInfo(buf, "%s", extval); break; + case BOOLOID: + if (*extval == 't') + appendStringInfo(buf, "%s", TrueConstValue); + else + appendStringInfo(buf, "%s", FalseConstValue); + break; default: /* should never happen. we filter on types earlier */ elog(ERROR, @@ -1281,20 +1662,14 @@ ScalarConstToStr(Const *constval, StringInfo buf) * ListConstToStr * * Extracts the value stored in a list constant to a string. -* Currently supported data types: int2[], int4[], int8[], text[] * Example: * Input: ['abc', 'xyz'] * Output: s3dabcs3dxyz * */ static void -ListConstToStr(Const *constval, StringInfo buf) +ListConstToStr(Const *constval, StringInfo buf, bool with_nulls) { - StringInfo interm_buf; - Datum *dats; - ArrayType *arr; - int len; - if (constval->constisnull) { elog(DEBUG1, "Null constant is not expected in this context."); @@ -1308,107 +1683,85 @@ ListConstToStr(Const *constval, StringInfo buf) return; } - arr = DatumGetArrayTypeP(constval->constvalue); - - interm_buf = makeStringInfo(); - switch (constval->consttype) { case INT2ARRAYOID: - { - int16 value; - - deconstruct_array(arr, - INT2OID, - sizeof(value), - true, - 's', - &dats, - NULL, - &len); - - for (int i = 0; i < len; i++) - { - value = DatumGetInt16(dats[i]); - - appendStringInfo(interm_buf, "%hd", value); - - appendStringInfo(buf, "%c%d%c%s", - PXF_SIZE_BYTES, interm_buf->len, - PXF_CONST_DATA, interm_buf->data); - resetStringInfo(interm_buf); - } - break; - } case INT4ARRAYOID: - { - int32 value; - - deconstruct_array(arr, - INT4OID, - sizeof(value), - true, - 'i', - &dats, - NULL, - &len); - - for (int i = 0; i < len; i++) - { - value = DatumGetInt32(dats[i]); - - appendStringInfo(interm_buf, "%d", value); - - appendStringInfo(buf, "%c%d%c%s", - PXF_SIZE_BYTES, interm_buf->len, - PXF_CONST_DATA, interm_buf->data); - resetStringInfo(interm_buf); - } - break; - } case INT8ARRAYOID: + case TEXTARRAYOID: + case BOOLARRAYOID: + case BYTEAARRAYOID: + case FLOAT4ARRAYOID: + case FLOAT8ARRAYOID: + case BPCHARARRAYOID: + case VARCHARARRAYOID: + case DATEARRAYOID: + case TIMEARRAYOID: + case TIMESTAMPARRAYOID: + case TIMESTAMPTZARRAYOID: + case INTERVALARRAYOID: + case NUMERICARRAYOID: + case UUIDARRAYOID: + case JSONBARRAYOID: { - int64 value; - + StringInfo interm_buf; + Datum *dats; + ArrayType *arr; + int len; + Oid typoutput; + bool typIsVarlena; + int16 elmlen; + bool elmbyval; + char elmalign; + bool *elem_nulls = NULL; + + arr = DatumGetArrayTypeP(constval->constvalue); + + interm_buf = makeStringInfo(); + /* + * Get necessary data for deconstruct_array() and output function + * from the catalog. + */ + get_typlenbyvalalign(ARR_ELEMTYPE(arr), &elmlen, &elmbyval, &elmalign); deconstruct_array(arr, - INT8OID, - sizeof(value), - true, - 'd', + ARR_ELEMTYPE(arr), + elmlen, + elmbyval, + elmalign, &dats, - NULL, + with_nulls ? &elem_nulls : NULL, &len); - for (int i = 0; i < len; i++) - { - value = DatumGetInt64(dats[i]); - - appendStringInfo(interm_buf, "%ld", value); - - appendStringInfo(buf, "%c%d%c%s", - PXF_SIZE_BYTES, interm_buf->len, - PXF_CONST_DATA, interm_buf->data); - resetStringInfo(interm_buf); - } - break; - } - case TEXTARRAYOID: - { - char *value; - - deconstruct_array(arr, TEXTOID, -1, false, 'i', &dats, NULL, &len); + getTypeOutputInfo(ARR_ELEMTYPE(arr), &typoutput, &typIsVarlena); for (int i = 0; i < len; i++) { - value = DatumGetCString(DirectFunctionCall1(textout, dats[i])); + char *extval = NullConstValue; - appendStringInfo(interm_buf, "%s", value); + if (!with_nulls || !elem_nulls[i]) + extval = OidOutputFunctionCall(typoutput, dats[i]); + + if (ARR_ELEMTYPE(arr) != BOOLOID) + appendStringInfo(interm_buf, "%s", extval); + else + { + if (*extval == 't') + appendStringInfo(interm_buf, "%s", TrueConstValue); + else if (*extval == 'f') + appendStringInfo(interm_buf, "%s", FalseConstValue); + else + appendStringInfo(interm_buf, "%s", NullConstValue); + } appendStringInfo(buf, "%c%d%c%s", PXF_SIZE_BYTES, interm_buf->len, PXF_CONST_DATA, interm_buf->data); resetStringInfo(interm_buf); + + if (!with_nulls || !elem_nulls[i]) + pfree(extval); } + pfree(interm_buf->data); break; } default: @@ -1419,8 +1772,6 @@ ListConstToStr(Const *constval, StringInfo buf) constval->consttype); } - - pfree(interm_buf->data); } /* diff --git a/fdw/pxf_filter.h b/fdw/pxf_filter.h index cc4c07a85d..f4446f5db2 100644 --- a/fdw/pxf_filter.h +++ b/fdw/pxf_filter.h @@ -31,7 +31,7 @@ /* - * each supported operator has a code that will describe the operator + * each supported operator has a code. Some codes will describe the operator * type in the final serialized string that gets pushed down. * * NOTE: the codes could be forced into a single byte, but list will @@ -48,7 +48,15 @@ typedef enum PxfOperatorCode PXFOP_LIKE, PXFOP_IS_NULL, PXFOP_IS_NOTNULL, - PXFOP_IN + PXFOP_IN, + + /* + * Not serialized operators. They're used + * to indicate negation before corresponding + * serialized operators. NOT LIKE -> NOT (LIKE) + */ + PXFOP_NOTIN, + PXFOP_NOTLIKE } PxfOperatorCode; diff --git a/regression/expected/FDW_FilterPushDownTest.out b/regression/expected/FDW_FilterPushDownTest.out index 172ede4d42..bcc020eb5c 100644 --- a/regression/expected/FDW_FilterPushDownTest.out +++ b/regression/expected/FDW_FilterPushDownTest.out @@ -12,11 +12,51 @@ CREATE SERVER pxf_filter_push_down_server CREATE USER MAPPING FOR CURRENT_USER SERVER pxf_filter_push_down_server; DROP FOREIGN TABLE IF EXISTS test_filter CASCADE; NOTICE: foreign table "test_filter" does not exist, skipping -CREATE FOREIGN TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE FOREIGN TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) SERVER pxf_filter_push_down_server OPTIONS (resource 'dummy_path', format 'filter', delimiter ','); -- control - no predicates -SELECT * FROM test_filter; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | No filter @@ -33,38 +73,38 @@ SELECT * FROM test_filter; SET optimizer = off; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------- B | | f | 1.11 | BB | BB | a1o8a0c25s1dBo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o3a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o5a1c23s2d10o5l1a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+--------------------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 (2 rows) -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 @@ -96,13 +136,13 @@ SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false 3.00000 | a2c16s4dtrueo0l2 (5 rows) -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+--------------------------------------------- D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 (1 row) -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------- B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 @@ -115,31 +155,31 @@ SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0 (7 rows) -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo1 (1 row) -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo3 C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 (2 rows) -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a0c25s1dCo2 @@ -151,7 +191,7 @@ SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 (7 rows) -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 @@ -164,7 +204,7 @@ SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 (8 rows) -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo6 @@ -177,45 +217,45 @@ SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 (8 rows) -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 (1 row) -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a0c25s2dC%o7l2 + D | 3 | f | | DD | DD | a0c25s2dC%o7l2 + E | 4 | t | 4.41 | | EE | a0c25s2dC%o7l2 + F | 5 | f | 5.51 | FF | | a0c25s2dC%o7l2 + G | 6 | t | 6.61 | GG | GG | a0c25s2dC%o7l2 + H | 7 | f | 7.71 | HH | HH | a0c25s2dC%o7l2 + I | 8 | t | 8.81 | II | II | a0c25s2dC%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s2dC%o7l2 (8 rows) -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 (2 rows) -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a0m1009s1dCs1dDo10l2 + E | 4 | t | 4.41 | | EE | a0m1009s1dCs1dDo10l2 + F | 5 | f | 5.51 | FF | | a0m1009s1dCs1dDo10l2 + G | 6 | t | 6.61 | GG | GG | a0m1009s1dCs1dDo10l2 + H | 7 | f | 7.71 | HH | HH | a0m1009s1dCs1dDo10l2 + I | 8 | t | 8.81 | II | II | a0m1009s1dCs1dDo10l2 + J | 9 | f | 9.91 | JJ | JJ | a0m1009s1dCs1dDo10l2 (7 rows) -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 @@ -223,7 +263,7 @@ SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 (3 rows) -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 @@ -234,13 +274,13 @@ SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 (6 rows) -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a0o8 (1 row) -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0o9 @@ -255,26 +295,26 @@ SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 (1 row) -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 (1 row) -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 (2 rows) -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o2 @@ -286,7 +326,7 @@ SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 (7 rows) -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 @@ -299,7 +339,7 @@ SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 (8 rows) -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o6 @@ -312,26 +352,26 @@ SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 (8 rows) -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 (2 rows) -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + E | 4 | t | 4.41 | | EE | a1m1007s1d2s1d3o10l2 + F | 5 | f | 5.51 | FF | | a1m1007s1d2s1d3o10l2 + G | 6 | t | 6.61 | GG | GG | a1m1007s1d2s1d3o10l2 + H | 7 | f | 7.71 | HH | HH | a1m1007s1d2s1d3o10l2 + I | 8 | t | 8.81 | II | II | a1m1007s1d2s1d3o10l2 + J | 9 | f | 9.91 | JJ | JJ | a1m1007s1d2s1d3o10l2 + | 0 | t | 0.01 | AA | AA | a1m1007s1d2s1d3o10l2 (7 rows) -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 @@ -339,7 +379,7 @@ SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 (3 rows) -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 @@ -350,13 +390,13 @@ SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 (6 rows) -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a1o8 (1 row) -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1o9 @@ -371,26 +411,26 @@ SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 (1 row) -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 (1 row) -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 (2 rows) -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 @@ -402,7 +442,7 @@ SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 (7 rows) -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 @@ -415,7 +455,7 @@ SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 (8 rows) -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 @@ -428,26 +468,26 @@ SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 (8 rows) -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a3m1231s4d1.11s4d2.21o10 + C | 2 | | 2.21 | CC | CC | a3m1231s4d1.11s4d2.21o10 (2 rows) -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + E | 4 | t | 4.41 | | EE | a3m1231s4d1.11s4d2.21o10l2 + F | 5 | f | 5.51 | FF | | a3m1231s4d1.11s4d2.21o10l2 + G | 6 | t | 6.61 | GG | GG | a3m1231s4d1.11s4d2.21o10l2 + H | 7 | f | 7.71 | HH | HH | a3m1231s4d1.11s4d2.21o10l2 + I | 8 | t | 8.81 | II | II | a3m1231s4d1.11s4d2.21o10l2 + J | 9 | f | 9.91 | JJ | JJ | a3m1231s4d1.11s4d2.21o10l2 + | 0 | t | 0.01 | AA | AA | a3m1231s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 @@ -455,7 +495,7 @@ SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 @@ -466,13 +506,13 @@ SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- D | 3 | f | | DD | DD | a3o8 (1 row) -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a3o9 @@ -487,32 +527,32 @@ SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+----------------- B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 (1 row) -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 @@ -524,7 +564,7 @@ SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 @@ -537,7 +577,7 @@ SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 @@ -550,45 +590,45 @@ SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a4c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c25s2dB%o7l2 + D | 3 | f | | DD | DD | a4c25s2dB%o7l2 + F | 5 | f | 5.51 | FF | | a4c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a4c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a4c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a4c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a4c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a4c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a4m1014s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a4m1014s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a4m1014s2dBBs2dCCo10l2 + F | 5 | f | 5.51 | FF | | a4m1014s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a4m1014s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a4m1014s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a4m1014s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a4m1014s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a4m1014s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 @@ -596,7 +636,7 @@ SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 @@ -607,13 +647,13 @@ SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- E | 4 | t | 4.41 | | EE | a4o8 (1 row) -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a4o9 @@ -628,31 +668,31 @@ SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo3 | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 @@ -664,7 +704,7 @@ SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo4 @@ -677,7 +717,7 @@ SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 @@ -690,45 +730,45 @@ SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dB%o7l2 + D | 3 | f | | DD | DD | a5c25s2dB%o7l2 + E | 4 | t | 4.41 | | EE | a5c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a5c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a5c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a5m1009s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a5m1009s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a5m1009s2dBBs2dCCo10l2 + E | 4 | t | 4.41 | | EE | a5m1009s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a5m1009s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a5m1009s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a5m1009s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a5m1009s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a5m1009s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 @@ -736,7 +776,7 @@ SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 @@ -747,13 +787,13 @@ SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- F | 5 | f | 5.51 | FF | | a5o8 (1 row) -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a5o9 @@ -769,38 +809,38 @@ SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; SET optimizer = on; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------- B | | f | 1.11 | BB | BB | a1o8a0c25s1dBo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o3a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o5a1c23s2d10o5l1a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+--------------------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 (2 rows) -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 @@ -832,13 +872,13 @@ SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false 3.00000 | a2c16s4dtrueo0l2 (5 rows) -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+--------------------------------------------- D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 (1 row) -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------- B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 @@ -851,31 +891,31 @@ SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0 (7 rows) -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo1 (1 row) -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo3 C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 (2 rows) -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a0c25s1dCo2 @@ -887,7 +927,7 @@ SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 (7 rows) -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 @@ -900,7 +940,7 @@ SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 (8 rows) -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo6 @@ -913,45 +953,45 @@ SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 (8 rows) -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 (1 row) -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a0c25s2dC%o7l2 + D | 3 | f | | DD | DD | a0c25s2dC%o7l2 + E | 4 | t | 4.41 | | EE | a0c25s2dC%o7l2 + F | 5 | f | 5.51 | FF | | a0c25s2dC%o7l2 + G | 6 | t | 6.61 | GG | GG | a0c25s2dC%o7l2 + H | 7 | f | 7.71 | HH | HH | a0c25s2dC%o7l2 + I | 8 | t | 8.81 | II | II | a0c25s2dC%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s2dC%o7l2 (8 rows) -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 (2 rows) -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a0m1009s1dCs1dDo10l2 + E | 4 | t | 4.41 | | EE | a0m1009s1dCs1dDo10l2 + F | 5 | f | 5.51 | FF | | a0m1009s1dCs1dDo10l2 + G | 6 | t | 6.61 | GG | GG | a0m1009s1dCs1dDo10l2 + H | 7 | f | 7.71 | HH | HH | a0m1009s1dCs1dDo10l2 + I | 8 | t | 8.81 | II | II | a0m1009s1dCs1dDo10l2 + J | 9 | f | 9.91 | JJ | JJ | a0m1009s1dCs1dDo10l2 (7 rows) -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 @@ -959,7 +999,7 @@ SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 (3 rows) -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 @@ -970,13 +1010,13 @@ SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 (6 rows) -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a0o8 (1 row) -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0o9 @@ -991,26 +1031,26 @@ SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 (1 row) -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 (1 row) -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 (2 rows) -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o2 @@ -1022,7 +1062,7 @@ SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 (7 rows) -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 @@ -1035,7 +1075,7 @@ SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 (8 rows) -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o6 @@ -1048,26 +1088,26 @@ SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 (8 rows) -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 (2 rows) -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + E | 4 | t | 4.41 | | EE | a1m1007s1d2s1d3o10l2 + F | 5 | f | 5.51 | FF | | a1m1007s1d2s1d3o10l2 + G | 6 | t | 6.61 | GG | GG | a1m1007s1d2s1d3o10l2 + H | 7 | f | 7.71 | HH | HH | a1m1007s1d2s1d3o10l2 + I | 8 | t | 8.81 | II | II | a1m1007s1d2s1d3o10l2 + J | 9 | f | 9.91 | JJ | JJ | a1m1007s1d2s1d3o10l2 + | 0 | t | 0.01 | AA | AA | a1m1007s1d2s1d3o10l2 (7 rows) -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 @@ -1075,7 +1115,7 @@ SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 (3 rows) -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 @@ -1086,13 +1126,13 @@ SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 (6 rows) -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a1o8 (1 row) -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1o9 @@ -1107,26 +1147,26 @@ SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 (1 row) -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 (1 row) -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 (2 rows) -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 @@ -1138,7 +1178,7 @@ SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 (7 rows) -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 @@ -1151,7 +1191,7 @@ SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 (8 rows) -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 @@ -1164,26 +1204,26 @@ SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 (8 rows) -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a3m1231s4d1.11s4d2.21o10 + C | 2 | | 2.21 | CC | CC | a3m1231s4d1.11s4d2.21o10 (2 rows) -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + E | 4 | t | 4.41 | | EE | a3m1231s4d1.11s4d2.21o10l2 + F | 5 | f | 5.51 | FF | | a3m1231s4d1.11s4d2.21o10l2 + G | 6 | t | 6.61 | GG | GG | a3m1231s4d1.11s4d2.21o10l2 + H | 7 | f | 7.71 | HH | HH | a3m1231s4d1.11s4d2.21o10l2 + I | 8 | t | 8.81 | II | II | a3m1231s4d1.11s4d2.21o10l2 + J | 9 | f | 9.91 | JJ | JJ | a3m1231s4d1.11s4d2.21o10l2 + | 0 | t | 0.01 | AA | AA | a3m1231s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 @@ -1191,7 +1231,7 @@ SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 @@ -1202,13 +1242,13 @@ SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- D | 3 | f | | DD | DD | a3o8 (1 row) -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a3o9 @@ -1223,32 +1263,32 @@ SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+----------------- B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 (1 row) -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 @@ -1260,7 +1300,7 @@ SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 @@ -1273,7 +1313,7 @@ SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 @@ -1286,45 +1326,45 @@ SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a4c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c25s2dB%o7l2 + D | 3 | f | | DD | DD | a4c25s2dB%o7l2 + F | 5 | f | 5.51 | FF | | a4c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a4c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a4c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a4c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a4c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a4c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a4m1014s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a4m1014s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a4m1014s2dBBs2dCCo10l2 + F | 5 | f | 5.51 | FF | | a4m1014s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a4m1014s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a4m1014s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a4m1014s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a4m1014s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a4m1014s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 @@ -1332,7 +1372,7 @@ SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 @@ -1343,13 +1383,13 @@ SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- E | 4 | t | 4.41 | | EE | a4o8 (1 row) -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a4o9 @@ -1364,31 +1404,31 @@ SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo3 | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 @@ -1400,7 +1440,7 @@ SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo4 @@ -1413,7 +1453,7 @@ SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 @@ -1426,45 +1466,45 @@ SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dB%o7l2 + D | 3 | f | | DD | DD | a5c25s2dB%o7l2 + E | 4 | t | 4.41 | | EE | a5c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a5c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a5c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a5m1009s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a5m1009s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a5m1009s2dBBs2dCCo10l2 + E | 4 | t | 4.41 | | EE | a5m1009s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a5m1009s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a5m1009s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a5m1009s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a5m1009s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a5m1009s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 @@ -1472,7 +1512,7 @@ SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 @@ -1483,13 +1523,13 @@ SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- F | 5 | f | 5.51 | FF | | a5o8 (1 row) -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a5o9 @@ -1511,14 +1551,14 @@ SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; ALTER SERVER pxf_filter_push_down_server OPTIONS (ADD disable_ppd 'true'); SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- J | 9 | f | 9.91 | JJ | JJ | No filter (1 row) SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- J | 9 | f | 9.91 | JJ | JJ | No filter @@ -1531,27 +1571,2771 @@ ALTER SERVER pxf_filter_push_down_server ------ Check that Filter Push Down is working with HEX delimiter ------ ----------------------------------------------------------------------- DROP FOREIGN TABLE IF EXISTS test_filter CASCADE; -CREATE FOREIGN TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE FOREIGN TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) SERVER pxf_filter_push_down_server OPTIONS (resource 'dummy_path', format 'filter', delimiter E'\x01'); SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------------------------------------------------------- J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a0c25s1dJo5a1c23s1d9o5a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0 (1 row) SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------------------------------------------------------- J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a0c25s1dJo5a1c23s1d9o5a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0 (1 row) --- start_ignore --- clean up resources - DROP FOREIGN TABLE IF EXISTS test_filter CASCADE; - DROP USER MAPPING IF EXISTS FOR CURRENT_USER SERVER pxf_filter_push_down_server; - DROP SERVER IF EXISTS pxf_filter_push_down_server CASCADE; - DROP FOREIGN DATA WRAPPER IF EXISTS pxf_filter_push_down_fdw; --- end_ignore +-- Test newly supported types +CREATE FOREIGN TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) + SERVER pxf_filter_push_down_server + OPTIONS (resource 'dummy_path', format 'filter', delimiter ','); +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; + x1 | filtervalue +----+----------------- + BB | a6c1042s3dBB o5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBCo1 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo3 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo2 + DD | a6c1042s2dBBo2 + EE | a6c1042s2dBBo2 + FF | a6c1042s2dBBo2 + GG | a6c1042s2dBBo2 + HH | a6c1042s2dBBo2 + II | a6c1042s2dBBo2 + JJ | a6c1042s2dBBo2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo4 + CC | a6c1042s2dBBo4 + DD | a6c1042s2dBBo4 + EE | a6c1042s2dBBo4 + FF | a6c1042s2dBBo4 + GG | a6c1042s2dBBo4 + HH | a6c1042s2dBBo4 + II | a6c1042s2dBBo4 + JJ | a6c1042s2dBBo4 +(9 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo6 + DD | a6c1042s2dBBo6 + EE | a6c1042s2dBBo6 + FF | a6c1042s2dBBo6 + GG | a6c1042s2dBBo6 + HH | a6c1042s2dBBo6 + II | a6c1042s2dBBo6 + JJ | a6c1042s2dBBo6 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+-------------- + BB | a6c25s2dB%o7 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c25s2dB%o7l2 + DD | a6c25s2dB%o7l2 + EE | a6c25s2dB%o7l2 + FF | a6c25s2dB%o7l2 + GG | a6c25s2dB%o7l2 + HH | a6c25s2dB%o7l2 + II | a6c25s2dB%o7l2 + JJ | a6c25s2dB%o7l2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+---------------------- + BB | a6m1014s2dBBs2dCCo10 + CC | a6m1014s2dBBs2dCCo10 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+------------------------ + DD | a6m1014s2dBBs2dCCo10l2 + EE | a6m1014s2dBBs2dCCo10l2 + FF | a6m1014s2dBBs2dCCo10l2 + GG | a6m1014s2dBBs2dCCo10l2 + HH | a6m1014s2dBBs2dCCo10l2 + II | a6m1014s2dBBs2dCCo10l2 + JJ | a6m1014s2dBBs2dCCo10l2 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + BB | a6c1042s2dAAo4a6c1042s2dCCo3l0 + CC | a6c1042s2dAAo4a6c1042s2dCCo3l0 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + DD | a6c1042s2dAAo1a6c1042s2dCCo2l1 + EE | a6c1042s2dAAo1a6c1042s2dCCo2l1 + FF | a6c1042s2dAAo1a6c1042s2dCCo2l1 + GG | a6c1042s2dAAo1a6c1042s2dCCo2l1 + HH | a6c1042s2dAAo1a6c1042s2dCCo2l1 + II | a6c1042s2dAAo1a6c1042s2dCCo2l1 + JJ | a6c1042s2dAAo1a6c1042s2dCCo2l1 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + | a6o8 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + BB | a6o9 + CC | a6o9 + DD | a6o9 + EE | a6o9 + FF | a6o9 + GG | a6o9 + HH | a6o9 + II | a6o9 + JJ | a6o9 +(9 rows) + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o5 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 0 | a7c21s1d2o1 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o3 + 0 | a7c21s1d2o3 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o2 + 4 | a7c21s1d2o2 + 5 | a7c21s1d2o2 + 6 | a7c21s1d2o2 + 7 | a7c21s1d2o2 + 8 | a7c21s1d2o2 + 9 | a7c21s1d2o2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o4 + 3 | a7c21s1d2o4 + 4 | a7c21s1d2o4 + 5 | a7c21s1d2o4 + 6 | a7c21s1d2o4 + 7 | a7c21s1d2o4 + 8 | a7c21s1d2o4 + 9 | a7c21s1d2o4 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o6 + 4 | a7c21s1d2o6 + 5 | a7c21s1d2o6 + 6 | a7c21s1d2o6 + 7 | a7c21s1d2o6 + 8 | a7c21s1d2o6 + 9 | a7c21s1d2o6 + 0 | a7c21s1d2o6 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+-------------------- + 2 | a7m1007s1d2s1d3o10 + 3 | a7m1007s1d2s1d3o10 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+---------------------- + 4 | a7m1005s1d2s1d3o10l2 + 5 | a7m1005s1d2s1d3o10l2 + 6 | a7m1005s1d2s1d3o10l2 + 7 | a7m1005s1d2s1d3o10l2 + 8 | a7m1005s1d2s1d3o10l2 + 9 | a7m1005s1d2s1d3o10l2 + 0 | a7m1005s1d2s1d3o10l2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 2 | a7c21s1d2o4a7c21s1d4o3l0 + 3 | a7c21s1d2o4a7c21s1d4o3l0 + 4 | a7c21s1d2o4a7c21s1d4o3l0 +(3 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 5 | a7c21s1d2o1a7c21s1d4o2l1 + 6 | a7c21s1d2o1a7c21s1d4o2l1 + 7 | a7c21s1d2o1a7c21s1d4o2l1 + 8 | a7c21s1d2o1a7c21s1d4o2l1 + 9 | a7c21s1d2o1a7c21s1d4o2l1 + 0 | a7c21s1d2o1a7c21s1d4o2l1 +(6 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + | a7o8 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7o9 + 3 | a7o9 + 4 | a7o9 + 5 | a7o9 + 6 | a7o9 + 7 | a7o9 + 8 | a7o9 + 9 | a7o9 + 0 | a7o9 +(9 rows) + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d1o5 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o1 + 0 | a8c20s1d2o1 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o3 + 0 | a8c20s1d2o3 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o2 + 4 | a8c20s1d2o2 + 5 | a8c20s1d2o2 + 6 | a8c20s1d2o2 + 7 | a8c20s1d2o2 + 8 | a8c20s1d2o2 + 9 | a8c20s1d2o2 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o4 + 4 | a8c20s1d2o4 + 5 | a8c20s1d2o4 + 6 | a8c20s1d2o4 + 7 | a8c20s1d2o4 + 8 | a8c20s1d2o4 + 9 | a8c20s1d2o4 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o6 + 3 | a8c20s1d2o6 + 4 | a8c20s1d2o6 + 5 | a8c20s1d2o6 + 6 | a8c20s1d2o6 + 7 | a8c20s1d2o6 + 8 | a8c20s1d2o6 + 9 | a8c20s1d2o6 + 0 | a8c20s1d2o6 +(9 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+-------------------- + 3 | a8m1016s1d2s1d3o10 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+---------------------- + 1 | a8m1016s1d2s1d3o10l2 + 4 | a8m1016s1d2s1d3o10l2 + 5 | a8m1016s1d2s1d3o10l2 + 6 | a8m1016s1d2s1d3o10l2 + 7 | a8m1016s1d2s1d3o10l2 + 8 | a8m1016s1d2s1d3o10l2 + 9 | a8m1016s1d2s1d3o10l2 + 0 | a8m1016s1d2s1d3o10l2 +(8 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 3 | a8c20s1d2o4a8c20s1d4o3l0 + 4 | a8c20s1d2o4a8c20s1d4o3l0 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 1 | a8c20s1d2o1a8c20s1d4o2l1 + 5 | a8c20s1d2o1a8c20s1d4o2l1 + 6 | a8c20s1d2o1a8c20s1d4o2l1 + 7 | a8c20s1d2o1a8c20s1d4o2l1 + 8 | a8c20s1d2o1a8c20s1d4o2l1 + 9 | a8c20s1d2o1a8c20s1d4o2l1 + 0 | a8c20s1d2o1a8c20s1d4o2l1 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + | a8o8 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8o9 + 3 | a8o9 + 4 | a8o9 + 5 | a8o9 + 6 | a8o9 + 7 | a8o9 + 8 | a8o9 + 9 | a8o9 + 0 | a8o9 +(9 rows) + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o5 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 0.01 | a9c700s4d1.11o1 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o3 + 0.01 | a9c700s4d1.11o3 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o2 + 4.41 | a9c700s4d1.11o2 + 5.51 | a9c700s4d1.11o2 + 6.61 | a9c700s4d1.11o2 + 7.71 | a9c700s4d1.11o2 + 8.81 | a9c700s4d1.11o2 + 9.91 | a9c700s4d1.11o2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o4 + 2.21 | a9c700s4d1.11o4 + 4.41 | a9c700s4d1.11o4 + 5.51 | a9c700s4d1.11o4 + 6.61 | a9c700s4d1.11o4 + 7.71 | a9c700s4d1.11o4 + 8.81 | a9c700s4d1.11o4 + 9.91 | a9c700s4d1.11o4 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o6 + 4.41 | a9c700s4d1.11o6 + 5.51 | a9c700s4d1.11o6 + 6.61 | a9c700s4d1.11o6 + 7.71 | a9c700s4d1.11o6 + 8.81 | a9c700s4d1.11o6 + 9.91 | a9c700s4d1.11o6 + 0.01 | a9c700s4d1.11o6 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+-------------------------- + 1.11 | a9m1021s4d1.11s4d2.21o10 + 2.21 | a9m1021s4d1.11s4d2.21o10 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------- + 4.41 | a9m1021s4d1.11s4d2.21o10l2 + 5.51 | a9m1021s4d1.11s4d2.21o10l2 + 6.61 | a9m1021s4d1.11s4d2.21o10l2 + 7.71 | a9m1021s4d1.11s4d2.21o10l2 + 8.81 | a9m1021s4d1.11s4d2.21o10l2 + 9.91 | a9m1021s4d1.11s4d2.21o10l2 + 0.01 | a9m1021s4d1.11s4d2.21o10l2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 1.11 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 2.21 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 4.41 | a9c700s4d1.11o4a9c700s4d4.41o3l0 +(3 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 5.51 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 6.61 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 7.71 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 8.81 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 9.91 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 0.01 | a9c700s4d1.11o1a9c700s4d4.41o2l1 +(6 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; + x4 | filtervalue +----+------------- + | a9o8 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + x4 | filtervalue +------+------------- + 1.11 | a9o9 + 2.21 | a9o9 + 4.41 | a9o9 + 5.51 | a9o9 + 6.61 | a9o9 + 7.71 | a9o9 + 8.81 | a9o9 + 9.91 | a9o9 + 0.01 | a9o9 +(9 rows) + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o5 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 0.01 | a10c701s4d1.11o1 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o3 + 0.01 | a10c701s4d1.11o3 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o2 + 3.31 | a10c701s4d1.11o2 + 5.51 | a10c701s4d1.11o2 + 6.61 | a10c701s4d1.11o2 + 7.71 | a10c701s4d1.11o2 + 8.81 | a10c701s4d1.11o2 + 9.91 | a10c701s4d1.11o2 +(7 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o4 + 2.21 | a10c701s4d1.11o4 + 3.31 | a10c701s4d1.11o4 + 5.51 | a10c701s4d1.11o4 + 6.61 | a10c701s4d1.11o4 + 7.71 | a10c701s4d1.11o4 + 8.81 | a10c701s4d1.11o4 + 9.91 | a10c701s4d1.11o4 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o6 + 3.31 | a10c701s4d1.11o6 + 5.51 | a10c701s4d1.11o6 + 6.61 | a10c701s4d1.11o6 + 7.71 | a10c701s4d1.11o6 + 8.81 | a10c701s4d1.11o6 + 9.91 | a10c701s4d1.11o6 + 0.01 | a10c701s4d1.11o6 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+--------------------------- + 1.11 | a10m1022s4d1.11s4d2.21o10 + 2.21 | a10m1022s4d1.11s4d2.21o10 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+----------------------------- + 3.31 | a10m1022s4d1.11s4d2.21o10l2 + 5.51 | a10m1022s4d1.11s4d2.21o10l2 + 6.61 | a10m1022s4d1.11s4d2.21o10l2 + 7.71 | a10m1022s4d1.11s4d2.21o10l2 + 8.81 | a10m1022s4d1.11s4d2.21o10l2 + 9.91 | a10m1022s4d1.11s4d2.21o10l2 + 0.01 | a10m1022s4d1.11s4d2.21o10l2 +(7 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 1.11 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 2.21 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 3.31 | a10c701s4d1.11o4a10c701s4d4.41o3l0 +(3 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 5.51 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 6.61 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 7.71 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 8.81 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 9.91 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 0.01 | a10c701s4d1.11o1a10c701s4d4.41o2l1 +(6 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; + x5 | filtervalue +----+------------- + | a10o8 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + x5 | filtervalue +------+------------- + 1.11 | a10o9 + 2.21 | a10o9 + 3.31 | a10o9 + 5.51 | a10o9 + 6.61 | a10o9 + 7.71 | a10o9 + 8.81 | a10o9 + 9.91 | a10o9 + 0.01 | a10o9 +(9 rows) + +-- bytea +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------------ + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------- + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------- + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------ + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; + x6 | filtervalue +----+------------- + | a11o8 +(1 row) + +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------- + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 +(9 rows) + +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-11-2023o5 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-12-2023o1 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-12-2023o3 + 01-12-2023 | a12c1082s10d01-12-2023o3 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-12-2023 | a12c1082s10d01-11-2023o2 + 01-13-2023 | a12c1082s10d01-11-2023o2 + 01-14-2023 | a12c1082s10d01-11-2023o2 + 01-15-2023 | a12c1082s10d01-11-2023o2 + 01-16-2023 | a12c1082s10d01-11-2023o2 + 01-17-2023 | a12c1082s10d01-11-2023o2 + 01-18-2023 | a12c1082s10d01-11-2023o2 + 01-19-2023 | a12c1082s10d01-11-2023o2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-12-2023 | a12c1082s10d01-12-2023o4 + 01-13-2023 | a12c1082s10d01-12-2023o4 + 01-14-2023 | a12c1082s10d01-12-2023o4 + 01-15-2023 | a12c1082s10d01-12-2023o4 + 01-16-2023 | a12c1082s10d01-12-2023o4 + 01-17-2023 | a12c1082s10d01-12-2023o4 + 01-18-2023 | a12c1082s10d01-12-2023o4 + 01-19-2023 | a12c1082s10d01-12-2023o4 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-15-2023o6 + 01-12-2023 | a12c1082s10d01-15-2023o6 + 01-13-2023 | a12c1082s10d01-15-2023o6 + 01-14-2023 | a12c1082s10d01-15-2023o6 + 01-16-2023 | a12c1082s10d01-15-2023o6 + 01-17-2023 | a12c1082s10d01-15-2023o6 + 01-18-2023 | a12c1082s10d01-15-2023o6 + 01-19-2023 | a12c1082s10d01-15-2023o6 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+----------------------------------------- + 01-12-2023 | a12m1182s10d01-12-2023s10d01-15-2023o10 + 01-15-2023 | a12m1182s10d01-12-2023s10d01-15-2023o10 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+------------------------------------------- + 01-11-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-12-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-13-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-14-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-16-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-17-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-18-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-19-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 01-11-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-12-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-13-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-14-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-15-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-16-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-17-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-18-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-19-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 +(9 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 01-14-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-15-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-16-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-17-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-18-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-19-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 +(6 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; + x7 | filtervalue +----+------------- + | a12o8 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + x7 | filtervalue +------------+------------- + 01-11-2023 | a12o9 + 01-12-2023 | a12o9 + 01-13-2023 | a12o9 + 01-14-2023 | a12o9 + 01-15-2023 | a12o9 + 01-16-2023 | a12o9 + 01-17-2023 | a12o9 + 01-18-2023 | a12o9 + 01-19-2023 | a12o9 +(9 rows) + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:50o5 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:52o1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o3 + 12:34:50 | a13c1083s8d12:34:52o3 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:51o2 + 12:34:53 | a13c1083s8d12:34:51o2 + 12:34:54 | a13c1083s8d12:34:51o2 + 12:34:55 | a13c1083s8d12:34:51o2 + 12:34:56 | a13c1083s8d12:34:51o2 + 12:34:57 | a13c1083s8d12:34:51o2 + 12:34:58 | a13c1083s8d12:34:51o2 + 12:34:59 | a13c1083s8d12:34:51o2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o4 + 12:34:53 | a13c1083s8d12:34:52o4 + 12:34:54 | a13c1083s8d12:34:52o4 + 12:34:55 | a13c1083s8d12:34:52o4 + 12:34:56 | a13c1083s8d12:34:52o4 + 12:34:57 | a13c1083s8d12:34:52o4 + 12:34:58 | a13c1083s8d12:34:52o4 + 12:34:59 | a13c1083s8d12:34:52o4 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:55o6 + 12:34:53 | a13c1083s8d12:34:55o6 + 12:34:54 | a13c1083s8d12:34:55o6 + 12:34:56 | a13c1083s8d12:34:55o6 + 12:34:57 | a13c1083s8d12:34:55o6 + 12:34:58 | a13c1083s8d12:34:55o6 + 12:34:59 | a13c1083s8d12:34:55o6 + 12:34:50 | a13c1083s8d12:34:55o6 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------------------- + 12:34:52 | a13m1183s8d12:34:52s8d12:34:55o10 + 12:34:55 | a13m1183s8d12:34:52s8d12:34:55o10 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+------------------------------------- + 12:34:52 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:53 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:54 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:56 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:57 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:58 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:59 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:50 | a13m1183s8d12:34:55s8d12:34:55o10l2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:52 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:53 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:54 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:55 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:56 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:57 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:58 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:59 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:50 | a13c1083s8d12:34:51o1a13c1083s8d12:34:59o2l1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; + x8 | filtervalue +----+------------- + | a13o8 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + x8 | filtervalue +----------+------------- + 12:34:52 | a13o9 + 12:34:53 | a13o9 + 12:34:54 | a13o9 + 12:34:55 | a13o9 + 12:34:56 | a13o9 + 12:34:57 | a13o9 + 12:34:58 | a13o9 + 12:34:59 | a13o9 + 12:34:50 | a13o9 +(9 rows) + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:50 2023o5 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o1 + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o1 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o3 + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o3 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:55 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:55 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +--------------------------+--------------------------------------------------------------------- + Sun Jan 01 12:34:55 2023 | a14m1115s24dSun Jan 01 12:34:52 2023s24dSun Jan 01 12:34:55 2023o10 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +--------------------------+----------------------------------------------------------------------- + Sun Jan 01 12:34:51 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:53 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:54 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:56 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:57 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:58 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:59 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:50 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+-------------------------------------------------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:55 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+-------------------------------------------------------------------------------- + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o1a14c1114s24dSun Jan 01 12:34:59 2023o2l1 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; + x9 | filtervalue +----+------------- + | a14o8 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + x9 | filtervalue +--------------------------+------------- + Sun Jan 01 12:34:51 2023 | a14o9 + Sun Jan 01 12:34:53 2023 | a14o9 + Sun Jan 01 12:34:54 2023 | a14o9 + Sun Jan 01 12:34:55 2023 | a14o9 + Sun Jan 01 12:34:56 2023 | a14o9 + Sun Jan 01 12:34:57 2023 | a14o9 + Sun Jan 01 12:34:58 2023 | a14o9 + Sun Jan 01 12:34:59 2023 | a14o9 + Sun Jan 01 12:34:50 2023 | a14o9 +(9 rows) + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 30 minso5 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 31 mins | a16c1186s16d@ 1 hour 35 minso1 + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 35 minso1 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 35 minso1 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 35 minso1 +(4 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 31 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 36 minso3 +(6 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 33 minso2 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 35 minso4 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 31 minso6 +(8 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +------------------+----------------------------------------------------- + @ 1 hour 33 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10 + @ 1 hour 30 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10 +(2 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +------------------+------------------------------------------------------- + @ 1 hour 31 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 32 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 35 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 36 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 37 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 38 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 39 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+---------------------------------------------------------------- + @ 1 hour 31 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+---------------------------------------------------------------- + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; + x11 | filtervalue +-----+------------- + | a16o8 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + x11 | filtervalue +------------------+------------- + @ 1 hour 31 mins | a16o9 + @ 1 hour 32 mins | a16o9 + @ 1 hour 33 mins | a16o9 + @ 1 hour 35 mins | a16o9 + @ 1 hour 36 mins | a16o9 + @ 1 hour 37 mins | a16o9 + @ 1 hour 38 mins | a16o9 + @ 1 hour 39 mins | a16o9 + @ 1 hour 30 mins | a16o9 +(9 rows) + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o5 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 +(8 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+--------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 +(2 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+----------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; + x12 | filtervalue +-----+------------- + | a17o8 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17o9 +(9 rows) + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; + x13 | filtervalue +-----+------------- + | a18o8 +(1 row) + +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + x13 | filtervalue +---------+------------- + {"a":1} | a18o9 + {"a":2} | a18o9 + {"a":3} | a18o9 + {"a":4} | a18o9 + {"a":5} | a18o9 + {"a":6} | a18o9 + {"a":7} | a18o9 + {"a":8} | a18o9 + {"a":9} | a18o9 +(9 rows) + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 0} | a19c3802s8d{a: 0}o5 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o1 + {"a": 0} | a19c3802s8d{a: 3}o1 +(2 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o3 + {"a": 3} | a19c3802s8d{a: 3}o3 + {"a": 0} | a19c3802s8d{a: 3}o3 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 1}o2 + {"a": 3} | a19c3802s8d{a: 1}o2 + {"a": 4} | a19c3802s8d{a: 1}o2 + {"a": 5} | a19c3802s8d{a: 1}o2 + {"a": 6} | a19c3802s8d{a: 1}o2 + {"a": 7} | a19c3802s8d{a: 1}o2 + {"a": 8} | a19c3802s8d{a: 1}o2 + {"a": 9} | a19c3802s8d{a: 1}o2 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 4} | a19c3802s8d{a: 4}o4 + {"a": 5} | a19c3802s8d{a: 4}o4 + {"a": 6} | a19c3802s8d{a: 4}o4 + {"a": 7} | a19c3802s8d{a: 4}o4 + {"a": 8} | a19c3802s8d{a: 4}o4 + {"a": 9} | a19c3802s8d{a: 4}o4 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 5}o6 + {"a": 3} | a19c3802s8d{a: 5}o6 + {"a": 4} | a19c3802s8d{a: 5}o6 + {"a": 6} | a19c3802s8d{a: 5}o6 + {"a": 7} | a19c3802s8d{a: 5}o6 + {"a": 8} | a19c3802s8d{a: 5}o6 + {"a": 9} | a19c3802s8d{a: 5}o6 + {"a": 0} | a19c3802s8d{a: 5}o6 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------- + {"a": 6} | a19m3807s8d{a: 6}s8d{a: 1}o10 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------------------- + {"a": 2} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 3} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 5} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 6} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 7} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 9} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 0} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 +(7 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 2} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 3} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 4} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 5} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 6} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 7} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 8} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 9} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 0} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; + x14 | filtervalue +-----+------------- + | a19o8 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + x14 | filtervalue +----------+------------- + {"a": 2} | a19o9 + {"a": 3} | a19o9 + {"a": 4} | a19o9 + {"a": 5} | a19o9 + {"a": 6} | a19o9 + {"a": 7} | a19o9 + {"a": 8} | a19o9 + {"a": 9} | a19o9 + {"a": 0} | a19o9 +(9 rows) + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; + x15 | filtervalue +-------+-------------------- + {0,1} | a20m1005s1d0s1d1o5 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; + x15 | filtervalue +--------+--------------------------- + {1,2} | a20m1005s1d0s1d1s4dNULLo6 + {3,4} | a20m1005s1d0s1d1s4dNULLo6 + {4,5} | a20m1005s1d0s1d1s4dNULLo6 + {5,6} | a20m1005s1d0s1d1s4dNULLo6 + {6,7} | a20m1005s1d0s1d1s4dNULLo6 + {7,8} | a20m1005s1d0s1d1s4dNULLo6 + {8,9} | a20m1005s1d0s1d1s4dNULLo6 + {9,10} | a20m1005s1d0s1d1s4dNULLo6 + {0,1} | a20m1005s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; + x15 | filtervalue +-----+------------- + | a20o8 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; + x15 | filtervalue +--------+------------- + {1,2} | a20o9 + {3,4} | a20o9 + {4,5} | a20o9 + {5,6} | a20o9 + {6,7} | a20o9 + {7,8} | a20o9 + {8,9} | a20o9 + {9,10} | a20o9 + {0,1} | a20o9 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); + x15 | filtervalue +-------+---------------------------------------- + {1,2} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 + {5,6} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 +(2 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + x15 | filtervalue +--------+---------------------------------------- + {0,1} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {1,2} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {3,4} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {6,7} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {7,8} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {8,9} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {9,10} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 +(7 rows) + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; + x16 | filtervalue +-------+-------------------- + {2,3} | a21m1007s1d2s1d3o5 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; + x16 | filtervalue +---------+--------------------------- + {3,4} | a21m1007s1d0s1d1s4dNULLo6 + {4,5} | a21m1007s1d0s1d1s4dNULLo6 + {6,7} | a21m1007s1d0s1d1s4dNULLo6 + {7,8} | a21m1007s1d0s1d1s4dNULLo6 + {8,9} | a21m1007s1d0s1d1s4dNULLo6 + {9,10} | a21m1007s1d0s1d1s4dNULLo6 + {10,11} | a21m1007s1d0s1d1s4dNULLo6 + {11,12} | a21m1007s1d0s1d1s4dNULLo6 + {2,3} | a21m1007s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; + x16 | filtervalue +-----+------------- + | a21o8 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; + x16 | filtervalue +---------+------------- + {3,4} | a21o9 + {4,5} | a21o9 + {6,7} | a21o9 + {7,8} | a21o9 + {8,9} | a21o9 + {9,10} | a21o9 + {10,11} | a21o9 + {11,12} | a21o9 + {2,3} | a21o9 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); + x16 | filtervalue +-------+---------------------------------------- + {2,3} | a21m1007s1d2s1d3o5a21m1007s1d5s1d6o5l1 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + x16 | filtervalue +---------+---------------------------------------- + {2,3} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {3,4} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {6,7} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {7,8} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {8,9} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {9,10} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {10,11} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {11,12} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 +(8 rows) + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; + x17 | filtervalue +-------+-------------------- + {4,5} | a22m1016s1d4s1d5o5 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; + x17 | filtervalue +---------+--------------------------- + {5,6} | a22m1016s1d5s1d4s4dNULLo6 + {6,7} | a22m1016s1d5s1d4s4dNULLo6 + {7,8} | a22m1016s1d5s1d4s4dNULLo6 + {9,10} | a22m1016s1d5s1d4s4dNULLo6 + {10,11} | a22m1016s1d5s1d4s4dNULLo6 + {11,12} | a22m1016s1d5s1d4s4dNULLo6 + {12,13} | a22m1016s1d5s1d4s4dNULLo6 + {13,14} | a22m1016s1d5s1d4s4dNULLo6 + {4,5} | a22m1016s1d5s1d4s4dNULLo6 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; + x17 | filtervalue +-----+------------- + | a22o8 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; + x17 | filtervalue +---------+------------- + {5,6} | a22o9 + {6,7} | a22o9 + {7,8} | a22o9 + {9,10} | a22o9 + {10,11} | a22o9 + {11,12} | a22o9 + {12,13} | a22o9 + {13,14} | a22o9 + {4,5} | a22o9 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +-------+---------------------------------------- + {4,5} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 + {5,6} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 +(2 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +---------+---------------------------------------- + {6,7} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {7,8} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {9,10} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {10,11} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {11,12} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {12,13} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {13,14} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 +(7 rows) + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 +(4 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; + x18 | filtervalue +-----+------------- + | a23o8 +(1 row) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; + x18 | filtervalue +------------+------------- + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 +(9 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 +(4 rows) + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; + x19 | filtervalue +-------+-------------------- + {B,B} | a24m1009s1dBs1dBo5 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; + x19 | filtervalue +-------+--------------------------- + {B,B} | a24m1009s1dAs1dAs4dNULLo6 + {C,C} | a24m1009s1dAs1dAs4dNULLo6 + {D,D} | a24m1009s1dAs1dAs4dNULLo6 + {E,E} | a24m1009s1dAs1dAs4dNULLo6 + {F,F} | a24m1009s1dAs1dAs4dNULLo6 + {G,G} | a24m1009s1dAs1dAs4dNULLo6 + {H,H} | a24m1009s1dAs1dAs4dNULLo6 + {I,I} | a24m1009s1dAs1dAs4dNULLo6 + {J,J} | a24m1009s1dAs1dAs4dNULLo6 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; + x19 | filtervalue +-----+------------- + | a24o8 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; + x19 | filtervalue +-------+------------- + {B,B} | a24o9 + {C,C} | a24o9 + {D,D} | a24o9 + {E,E} | a24o9 + {F,F} | a24o9 + {G,G} | a24o9 + {H,H} | a24o9 + {I,I} | a24o9 + {J,J} | a24o9 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dBs1dBo5a24m1009s1dAs1dAs4dNULLo5l1 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {C,C} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {D,D} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {E,E} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {F,F} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {G,G} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {H,H} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {I,I} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {J,J} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; + x20 | filtervalue +-----------+------------------------ + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; + x20 | filtervalue +-------------+--------------------------- + {3.1,4.1} | a25m1021s1d0s1d1s4dNULLo6 + {4.1,5.1} | a25m1021s1d0s1d1s4dNULLo6 + {5.1,6.1} | a25m1021s1d0s1d1s4dNULLo6 + {6.1,7.1} | a25m1021s1d0s1d1s4dNULLo6 + {7.1,8.1} | a25m1021s1d0s1d1s4dNULLo6 + {8.1,9.1} | a25m1021s1d0s1d1s4dNULLo6 + {9.1,10.1} | a25m1021s1d0s1d1s4dNULLo6 + {10.1,11.1} | a25m1021s1d0s1d1s4dNULLo6 + {1.1,2.1} | a25m1021s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; + x20 | filtervalue +-----+------------- + | a25o8 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; + x20 | filtervalue +-------------+------------- + {3.1,4.1} | a25o9 + {4.1,5.1} | a25o9 + {5.1,6.1} | a25o9 + {6.1,7.1} | a25o9 + {7.1,8.1} | a25o9 + {8.1,9.1} | a25o9 + {9.1,10.1} | a25o9 + {10.1,11.1} | a25o9 + {1.1,2.1} | a25o9 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5a25m1021s1d5s1d6o5l1 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {3.1,4.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {4.1,5.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {5.1,6.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {6.1,7.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {7.1,8.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {8.1,9.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {9.1,10.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {10.1,11.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 +(9 rows) + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; + x21 | filtervalue +-----------+------------------------ + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; + x21 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a26m1022s1d0s1d1s4dNULLo6 + {4.1,5.1} | a26m1022s1d0s1d1s4dNULLo6 + {5.1,6.1} | a26m1022s1d0s1d1s4dNULLo6 + {6.1,7.1} | a26m1022s1d0s1d1s4dNULLo6 + {7.1,8.1} | a26m1022s1d0s1d1s4dNULLo6 + {8.1,9.1} | a26m1022s1d0s1d1s4dNULLo6 + {9.1,10.1} | a26m1022s1d0s1d1s4dNULLo6 + {10.1,11.1} | a26m1022s1d0s1d1s4dNULLo6 + {1.1,2.1} | a26m1022s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; + x21 | filtervalue +-----+------------- + | a26o8 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; + x21 | filtervalue +-------------+------------- + {2.1,3.1} | a26o9 + {4.1,5.1} | a26o9 + {5.1,6.1} | a26o9 + {6.1,7.1} | a26o9 + {7.1,8.1} | a26o9 + {8.1,9.1} | a26o9 + {9.1,10.1} | a26o9 + {10.1,11.1} | a26o9 + {1.1,2.1} | a26o9 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5a26m1022s1d5s1d6o5l1 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {2.1,3.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {4.1,5.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {5.1,6.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {6.1,7.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {7.1,8.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {8.1,9.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {9.1,10.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {10.1,11.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 +(9 rows) + +-- bytea array +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+---------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+--------------------------------------------------------------- + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; + x22 | filtervalue +-----+------------- + | a27o8 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+------------- + {"\\x78343242","\\x78343342"} | a27o9 + {"\\x78343342","\\x78343442"} | a27o9 + {"\\x78343542","\\x78343642"} | a27o9 + {"\\x78343642","\\x78343742"} | a27o9 + {"\\x78343742","\\x78343842"} | a27o9 + {"\\x78343842","\\x78343942"} | a27o9 + {"\\x78343942","\\x78346142"} | a27o9 + {"\\x78346142","\\x78346242"} | a27o9 + {"\\x78343142","\\x78343242"} | a27o9 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+-------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5a27m1001s12d\x736461735ao5l1 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+------------------------------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 +(9 rows) + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; + x23 | filtervalue +---------+---------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; + x23 | filtervalue +---------+----------------------------- + {BB,BB} | a28m1014s2dABs2dABs4dNULLo6 + {CC,CC} | a28m1014s2dABs2dABs4dNULLo6 + {DD,DD} | a28m1014s2dABs2dABs4dNULLo6 + {FF,FF} | a28m1014s2dABs2dABs4dNULLo6 + {GG,GG} | a28m1014s2dABs2dABs4dNULLo6 + {HH,HH} | a28m1014s2dABs2dABs4dNULLo6 + {II,II} | a28m1014s2dABs2dABs4dNULLo6 + {JJ,JJ} | a28m1014s2dABs2dABs4dNULLo6 + {AA,AA} | a28m1014s2dABs2dABs4dNULLo6 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; + x23 | filtervalue +-----+------------- + | a28o8 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; + x23 | filtervalue +---------+------------- + {BB,BB} | a28o9 + {CC,CC} | a28o9 + {DD,DD} | a28o9 + {FF,FF} | a28o9 + {GG,GG} | a28o9 + {HH,HH} | a28o9 + {II,II} | a28o9 + {JJ,JJ} | a28o9 + {AA,AA} | a28o9 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5a28m1014s2dAAs2dABs4dNULLo5l1 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {BB,BB} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {CC,CC} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {DD,DD} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {FF,FF} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {GG,GG} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {HH,HH} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {II,II} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {JJ,JJ} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 +(9 rows) + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------- + {AA,66} | a29m1015s2dAAs2d66o5 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------------- + {BB,67} | a29m1015s2dBBs1dCs4dNULLo6 + {CC,68} | a29m1015s2dBBs1dCs4dNULLo6 + {DD,69} | a29m1015s2dBBs1dCs4dNULLo6 + {EE,70} | a29m1015s2dBBs1dCs4dNULLo6 + {GG,72} | a29m1015s2dBBs1dCs4dNULLo6 + {HH,73} | a29m1015s2dBBs1dCs4dNULLo6 + {II,74} | a29m1015s2dBBs1dCs4dNULLo6 + {JJ,75} | a29m1015s2dBBs1dCs4dNULLo6 + {AA,66} | a29m1015s2dBBs1dCs4dNULLo6 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; + x24 | filtervalue +-----+------------- + | a29o8 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; + x24 | filtervalue +---------+------------- + {BB,67} | a29o9 + {CC,68} | a29o9 + {DD,69} | a29o9 + {EE,70} | a29o9 + {GG,72} | a29o9 + {HH,73} | a29o9 + {II,74} | a29o9 + {JJ,75} | a29o9 + {AA,66} | a29o9 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); + x24 | filtervalue +---------+-------------------------------------------------- + {AA,66} | a29m1015s2dAAs2d66o5a29m1015s2dBBs1dBs4dNULLo5l1 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + x24 | filtervalue +---------+----------------------------------------------- + {AA,66} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {BB,67} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {CC,68} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {DD,69} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {EE,70} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {GG,72} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {HH,73} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {II,74} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {JJ,75} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+---------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+----------------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; + x25 | filtervalue +-----+------------- + | a30o8 +(1 row) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; + x25 | filtervalue +-------------------------+------------- + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 +(9 rows) + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; + x26 | filtervalue +-----+------------- + | a31o8 +(1 row) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 +(9 rows) + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; + x27 | filtervalue +-----------+------------------------ + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; + x27 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a32m1231s1d0s1d1s4dNULLo6 + {4.1,5.1} | a32m1231s1d0s1d1s4dNULLo6 + {5.1,6.1} | a32m1231s1d0s1d1s4dNULLo6 + {6.1,7.1} | a32m1231s1d0s1d1s4dNULLo6 + {7.1,8.1} | a32m1231s1d0s1d1s4dNULLo6 + {8.1,9.1} | a32m1231s1d0s1d1s4dNULLo6 + {9.1,10.1} | a32m1231s1d0s1d1s4dNULLo6 + {10.1,11.1} | a32m1231s1d0s1d1s4dNULLo6 + {1.1,2.1} | a32m1231s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; + x27 | filtervalue +-----+------------- + | a32o8 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; + x27 | filtervalue +-------------+------------- + {2.1,3.1} | a32o9 + {4.1,5.1} | a32o9 + {5.1,6.1} | a32o9 + {6.1,7.1} | a32o9 + {7.1,8.1} | a32o9 + {8.1,9.1} | a32o9 + {9.1,10.1} | a32o9 + {10.1,11.1} | a32o9 + {1.1,2.1} | a32o9 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5a32m1231s1d5s1d6o5l1 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {2.1,3.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {4.1,5.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {5.1,6.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {6.1,7.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {7.1,8.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {8.1,9.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {9.1,10.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {10.1,11.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 +(9 rows) + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; + x28 | filtervalue +---------------------+---------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; + x28 | filtervalue +---------------------+----------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; + x28 | filtervalue +-----+------------- + | a33o8 +(1 row) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; + x28 | filtervalue +---------------------+------------- + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); + x28 | filtervalue +---------------------+--------------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + x28 | filtervalue +---------------------+-------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 +(9 rows) + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; + x29 | filtervalue +---------------------------------------------------------+-------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; + x29 | filtervalue +---------------------------------------------------------+--------------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; + x29 | filtervalue +-----+------------- + | a34o8 +(1 row) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; + x29 | filtervalue +---------------------------------------------------------+------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); + x29 | filtervalue +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + x29 | filtervalue +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 +(9 rows) + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; + x31 | filtervalue +--------------------------+----------------------------------- + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; + x31 | filtervalue +--------------------------+------------------------------------------ + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; + x31 | filtervalue +-----+------------- + | a36o8 +(1 row) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; + x31 | filtervalue +--------------------------+------------- + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); + x31 | filtervalue +--------------------------+----------------------------------------------------------------------------- + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + x31 | filtervalue +--------------------------+-------------------------------------------------------------------------------- + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 +(9 rows) + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; + x32 | filtervalue +-----+------------- + | a37o8 +(1 row) + +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + x32 | filtervalue +-----------------------------------------------+------------- + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 +(9 rows) + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; + x33 | filtervalue +----------------+--------------------- + {"{\"a\": 0}"} | a38m3807s8d{a: 0}o5 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; + x33 | filtervalue +----------------+---------------------------- + {"{\"a\": 1}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 0}"} | a38m3807s8d{a: 2}s4dNULLo6 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; + x33 | filtervalue +-----+------------- + | a38o8 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; + x33 | filtervalue +----------------+------------- + {"{\"a\": 1}"} | a38o9 + {"{\"a\": 3}"} | a38o9 + {"{\"a\": 4}"} | a38o9 + {"{\"a\": 5}"} | a38o9 + {"{\"a\": 6}"} | a38o9 + {"{\"a\": 7}"} | a38o9 + {"{\"a\": 8}"} | a38o9 + {"{\"a\": 9}"} | a38o9 + {"{\"a\": 0}"} | a38o9 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 0}"} | a38m3807s8d{a: 2}o5a38m3807s8d{a: 0}o5l1 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 1}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 +(8 rows) + diff --git a/regression/expected/FilterPushDownTest.out b/regression/expected/FilterPushDownTest.out index 1d98bd4ed4..882bbd5ccf 100644 --- a/regression/expected/FilterPushDownTest.out +++ b/regression/expected/FilterPushDownTest.out @@ -1,3 +1,23 @@ +-- start_matchsubs +-- +-- # filter values that are equivalent but have different operand order +-- +-- m/a0c25s1dBo5a1o8l0/ +-- s/a0c25s1dBo5a1o8l0/a1o8a0c25s1dBo5l0/ +-- +-- m/a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0/ +-- s/a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0/a1c23s1d2o5a1c23s2d10o5l1a0c25s1dCo5l0/ +-- +-- m/a2c16s4dtrueo0l2a1c23s1d5o1l0/ +-- s/a2c16s4dtrueo0l2a1c23s1d5o1l0/a1c23s1d5o1a2c16s4dtrueo0l2l0/ +-- +-- m/a0c25s1dJo5a1c23s1d9o5a2c16s4dtrueo0l2a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0/ +-- s/a0c25s1dJo5a1c23s1d9o5a2c16s4dtrueo0l2a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0/a2c16s4dtrueo0l2a0c25s1dJo5a1c23s1d9o5a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0/ +-- +-- m/o8l2/ +-- s/o8l2/o9/ +-- +-- end_matchsubs ----------------------------------------------------- ------ Check that Filter Push Down is working ------- ----------------------------------------------------- @@ -5,7 +25,47 @@ -- that returns the filter being sent from the C-side DROP EXTERNAL TABLE IF EXISTS test_filter CASCADE; NOTICE: table "test_filter" does not exist, skipping -CREATE EXTERNAL TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE EXTERNAL TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) LOCATION (E'pxf://dummy_path?PROFILE=system:filter') FORMAT 'CSV'; ---------------------------------------------------- @@ -13,7 +73,7 @@ CREATE EXTERNAL TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, ---------------------------------------------------- SET gp_external_enable_filter_pushdown = true; -- control - no predicates -SELECT * FROM test_filter; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | No filter @@ -30,38 +90,38 @@ SELECT * FROM test_filter; SET optimizer = off; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------- B | | f | 1.11 | BB | BB | a1o8a0c25s1dBo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o3a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0 + C | 2 | | 2.21 | CC | CC | a1c23s1d2o5a1c23s2d10o5l1a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+--------------------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 (2 rows) -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 @@ -74,13 +134,13 @@ SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; t0 | a1 | filtervalue ----+----+------------------------------- - D | 3 | a2c16s4dtrueo0l2a1c23s1d5o1l0 + D | 3 | a1c23s1d5o1a2c16s4dtrueo0l2l0 (1 row) SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; round | filtervalue ---------+------------------------------- - 1.73205 | a2c16s4dtrueo0l2a1c23s1d5o1l0 + 1.73205 | a1c23s1d5o1a2c16s4dtrueo0l2l0 (1 row) SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; @@ -93,13 +153,13 @@ SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false 3.00000 | a2c16s4dtrueo0l2 (5 rows) -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+--------------------------------------------- D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 (1 row) -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------- B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 @@ -112,31 +172,31 @@ SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0 (7 rows) -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo1 (1 row) -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo3 C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 (2 rows) -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a0c25s1dCo2 @@ -148,7 +208,7 @@ SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 (7 rows) -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 @@ -161,7 +221,7 @@ SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 (8 rows) -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo6 @@ -174,45 +234,45 @@ SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 (8 rows) -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 (1 row) -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a0c25s2dC%o7l2 + D | 3 | f | | DD | DD | a0c25s2dC%o7l2 + E | 4 | t | 4.41 | | EE | a0c25s2dC%o7l2 + F | 5 | f | 5.51 | FF | | a0c25s2dC%o7l2 + G | 6 | t | 6.61 | GG | GG | a0c25s2dC%o7l2 + H | 7 | f | 7.71 | HH | HH | a0c25s2dC%o7l2 + I | 8 | t | 8.81 | II | II | a0c25s2dC%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s2dC%o7l2 (8 rows) -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 (2 rows) -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a0m1009s1dCs1dDo10l2 + E | 4 | t | 4.41 | | EE | a0m1009s1dCs1dDo10l2 + F | 5 | f | 5.51 | FF | | a0m1009s1dCs1dDo10l2 + G | 6 | t | 6.61 | GG | GG | a0m1009s1dCs1dDo10l2 + H | 7 | f | 7.71 | HH | HH | a0m1009s1dCs1dDo10l2 + I | 8 | t | 8.81 | II | II | a0m1009s1dCs1dDo10l2 + J | 9 | f | 9.91 | JJ | JJ | a0m1009s1dCs1dDo10l2 (7 rows) -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 @@ -220,7 +280,7 @@ SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 (3 rows) -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 @@ -231,13 +291,13 @@ SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 (6 rows) -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a0o8 (1 row) -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0o9 @@ -252,26 +312,26 @@ SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 (1 row) -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 (1 row) -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 (2 rows) -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o2 @@ -283,7 +343,7 @@ SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 (7 rows) -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 @@ -296,7 +356,7 @@ SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 (8 rows) -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o6 @@ -309,26 +369,26 @@ SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 (8 rows) -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 (2 rows) -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + E | 4 | t | 4.41 | | EE | a1m1007s1d2s1d3o10l2 + F | 5 | f | 5.51 | FF | | a1m1007s1d2s1d3o10l2 + G | 6 | t | 6.61 | GG | GG | a1m1007s1d2s1d3o10l2 + H | 7 | f | 7.71 | HH | HH | a1m1007s1d2s1d3o10l2 + I | 8 | t | 8.81 | II | II | a1m1007s1d2s1d3o10l2 + J | 9 | f | 9.91 | JJ | JJ | a1m1007s1d2s1d3o10l2 + | 0 | t | 0.01 | AA | AA | a1m1007s1d2s1d3o10l2 (7 rows) -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 @@ -336,7 +396,7 @@ SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 (3 rows) -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 @@ -347,13 +407,13 @@ SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 (6 rows) -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a1o8 (1 row) -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1o9 @@ -368,26 +428,26 @@ SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 (1 row) -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 (1 row) -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 (2 rows) -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 @@ -399,7 +459,7 @@ SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 (7 rows) -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 @@ -412,7 +472,7 @@ SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 (8 rows) -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 @@ -425,26 +485,26 @@ SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 (8 rows) -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a3m1231s4d1.11s4d2.21o10 + C | 2 | | 2.21 | CC | CC | a3m1231s4d1.11s4d2.21o10 (2 rows) -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + E | 4 | t | 4.41 | | EE | a3m1231s4d1.11s4d2.21o10l2 + F | 5 | f | 5.51 | FF | | a3m1231s4d1.11s4d2.21o10l2 + G | 6 | t | 6.61 | GG | GG | a3m1231s4d1.11s4d2.21o10l2 + H | 7 | f | 7.71 | HH | HH | a3m1231s4d1.11s4d2.21o10l2 + I | 8 | t | 8.81 | II | II | a3m1231s4d1.11s4d2.21o10l2 + J | 9 | f | 9.91 | JJ | JJ | a3m1231s4d1.11s4d2.21o10l2 + | 0 | t | 0.01 | AA | AA | a3m1231s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 @@ -452,7 +512,7 @@ SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 @@ -463,13 +523,13 @@ SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- D | 3 | f | | DD | DD | a3o8 (1 row) -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a3o9 @@ -484,32 +544,32 @@ SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+----------------- B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 (1 row) -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 @@ -521,7 +581,7 @@ SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 @@ -534,7 +594,7 @@ SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 @@ -547,45 +607,45 @@ SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a4c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c25s2dB%o7l2 + D | 3 | f | | DD | DD | a4c25s2dB%o7l2 + F | 5 | f | 5.51 | FF | | a4c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a4c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a4c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a4c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a4c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a4c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a4m1014s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a4m1014s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a4m1014s2dBBs2dCCo10l2 + F | 5 | f | 5.51 | FF | | a4m1014s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a4m1014s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a4m1014s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a4m1014s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a4m1014s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a4m1014s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 @@ -593,7 +653,7 @@ SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 @@ -604,13 +664,13 @@ SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- E | 4 | t | 4.41 | | EE | a4o8 (1 row) -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a4o9 @@ -625,31 +685,31 @@ SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; (9 rows) -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo3 | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 @@ -661,7 +721,7 @@ SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo4 @@ -674,7 +734,7 @@ SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 @@ -687,45 +747,45 @@ SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dB%o7l2 + D | 3 | f | | DD | DD | a5c25s2dB%o7l2 + E | 4 | t | 4.41 | | EE | a5c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a5c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a5c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a5m1009s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a5m1009s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a5m1009s2dBBs2dCCo10l2 + E | 4 | t | 4.41 | | EE | a5m1009s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a5m1009s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a5m1009s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a5m1009s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a5m1009s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a5m1009s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 @@ -733,7 +793,7 @@ SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 @@ -744,13 +804,13 @@ SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- F | 5 | f | 5.51 | FF | | a5o8 (1 row) -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a5o9 @@ -766,38 +826,38 @@ SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; SET optimizer = on; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------- - B | | f | 1.11 | BB | BB | a0c25s1dBo5a1o8l0 + B | | f | 1.11 | BB | BB | a1o8a0c25s1dBo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o3l0 + C | 2 | | 2.21 | CC | CC | a1c23s1d2o3a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------------------- - C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0 + C | 2 | | 2.21 | CC | CC | a1c23s1d2o5a1c23s2d10o5l1a0c25s1dCo5l0 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+--------------------------------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 | 0 | t | 0.01 | AA | AA | a0c25s1dCo5a1c23s1d0o4a1c23s1d2o3l0l1 (2 rows) -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2 @@ -829,13 +889,13 @@ SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false 3.00000 | a2c16s4dtrueo0l2 (5 rows) -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+--------------------------------------------- D | 3 | f | | DD | DD | a2c16s4dtrueo0l2a1c23s1d3o5a1c23s2d10o5l1l0 (1 row) -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------- B | | f | 1.11 | BB | BB | a2c16s4dtrueo0l2a1c23s1d0o4a1c23s1d2o3l0l1 @@ -848,31 +908,31 @@ SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0 (7 rows) -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo5 (1 row) -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo1 (1 row) -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo3 C | 2 | | 2.21 | CC | CC | a0c25s1dCo3 (2 rows) -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a0c25s1dCo2 @@ -884,7 +944,7 @@ SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo2 (7 rows) -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a0c25s1dCo4 @@ -897,7 +957,7 @@ SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo4 (8 rows) -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a0c25s1dCo6 @@ -910,45 +970,45 @@ SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dCo6 (8 rows) -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a0c25s2dC%o7 (1 row) -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + B | | f | 1.11 | BB | BB | a0c25s2dC%o7l2 + D | 3 | f | | DD | DD | a0c25s2dC%o7l2 + E | 4 | t | 4.41 | | EE | a0c25s2dC%o7l2 + F | 5 | f | 5.51 | FF | | a0c25s2dC%o7l2 + G | 6 | t | 6.61 | GG | GG | a0c25s2dC%o7l2 + H | 7 | f | 7.71 | HH | HH | a0c25s2dC%o7l2 + I | 8 | t | 8.81 | II | II | a0c25s2dC%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a0c25s2dC%o7l2 (8 rows) -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a0m1009s1dCs1dDo10 D | 3 | f | | DD | DD | a0m1009s1dCs1dDo10 (2 rows) -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a0m1009s1dCs1dDo10l2 + E | 4 | t | 4.41 | | EE | a0m1009s1dCs1dDo10l2 + F | 5 | f | 5.51 | FF | | a0m1009s1dCs1dDo10l2 + G | 6 | t | 6.61 | GG | GG | a0m1009s1dCs1dDo10l2 + H | 7 | f | 7.71 | HH | HH | a0m1009s1dCs1dDo10l2 + I | 8 | t | 8.81 | II | II | a0m1009s1dCs1dDo10l2 + J | 9 | f | 9.91 | JJ | JJ | a0m1009s1dCs1dDo10l2 (7 rows) -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- B | | f | 1.11 | BB | BB | a0c25s1dBo4a0c25s1dDo3l0 @@ -956,7 +1016,7 @@ SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; D | 3 | f | | DD | DD | a0c25s1dBo4a0c25s1dDo3l0 (3 rows) -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- E | 4 | t | 4.41 | | EE | a0c25s1dBo1a0c25s1dDo2l1 @@ -967,47 +1027,47 @@ SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a0c25s1dBo1a0c25s1dDo2l1 (6 rows) -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a0o8 (1 row) -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | a0o8l2 - C | 2 | | 2.21 | CC | CC | a0o8l2 - D | 3 | f | | DD | DD | a0o8l2 - E | 4 | t | 4.41 | | EE | a0o8l2 - F | 5 | f | 5.51 | FF | | a0o8l2 - G | 6 | t | 6.61 | GG | GG | a0o8l2 - H | 7 | f | 7.71 | HH | HH | a0o8l2 - I | 8 | t | 8.81 | II | II | a0o8l2 - J | 9 | f | 9.91 | JJ | JJ | a0o8l2 + B | | f | 1.11 | BB | BB | a0o9 + C | 2 | | 2.21 | CC | CC | a0o9 + D | 3 | f | | DD | DD | a0o9 + E | 4 | t | 4.41 | | EE | a0o9 + F | 5 | f | 5.51 | FF | | a0o9 + G | 6 | t | 6.61 | GG | GG | a0o9 + H | 7 | f | 7.71 | HH | HH | a0o9 + I | 8 | t | 8.81 | II | II | a0o9 + J | 9 | f | 9.91 | JJ | JJ | a0o9 (9 rows) -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o5 (1 row) -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- | 0 | t | 0.01 | AA | AA | a1c23s1d2o1 (1 row) -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o3 | 0 | t | 0.01 | AA | AA | a1c23s1d2o3 (2 rows) -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o2 @@ -1019,7 +1079,7 @@ SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o2 (7 rows) -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4 @@ -1032,7 +1092,7 @@ SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a1c23s1d2o4 (8 rows) -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- D | 3 | f | | DD | DD | a1c23s1d2o6 @@ -1045,26 +1105,26 @@ SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o6 (8 rows) -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------- C | 2 | | 2.21 | CC | CC | a1m1007s1d2s1d3o10 D | 3 | f | | DD | DD | a1m1007s1d2s1d3o10 (2 rows) -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + E | 4 | t | 4.41 | | EE | a1m1007s1d2s1d3o10l2 + F | 5 | f | 5.51 | FF | | a1m1007s1d2s1d3o10l2 + G | 6 | t | 6.61 | GG | GG | a1m1007s1d2s1d3o10l2 + H | 7 | f | 7.71 | HH | HH | a1m1007s1d2s1d3o10l2 + I | 8 | t | 8.81 | II | II | a1m1007s1d2s1d3o10l2 + J | 9 | f | 9.91 | JJ | JJ | a1m1007s1d2s1d3o10l2 + | 0 | t | 0.01 | AA | AA | a1m1007s1d2s1d3o10l2 (7 rows) -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- C | 2 | | 2.21 | CC | CC | a1c23s1d2o4a1c23s1d4o3l0 @@ -1072,7 +1132,7 @@ SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a1c23s1d2o4a1c23s1d4o3l0 (3 rows) -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------- F | 5 | f | 5.51 | FF | | a1c23s1d2o1a1c23s1d4o2l1 @@ -1083,47 +1143,47 @@ SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a1c23s1d2o1a1c23s1d4o2l1 (6 rows) -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- B | | f | 1.11 | BB | BB | a1o8 (1 row) -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | a1o8l2 - D | 3 | f | | DD | DD | a1o8l2 - E | 4 | t | 4.41 | | EE | a1o8l2 - F | 5 | f | 5.51 | FF | | a1o8l2 - G | 6 | t | 6.61 | GG | GG | a1o8l2 - H | 7 | f | 7.71 | HH | HH | a1o8l2 - I | 8 | t | 8.81 | II | II | a1o8l2 - J | 9 | f | 9.91 | JJ | JJ | a1o8l2 - | 0 | t | 0.01 | AA | AA | a1o8l2 + C | 2 | | 2.21 | CC | CC | a1o9 + D | 3 | f | | DD | DD | a1o9 + E | 4 | t | 4.41 | | EE | a1o9 + F | 5 | f | 5.51 | FF | | a1o9 + G | 6 | t | 6.61 | GG | GG | a1o9 + H | 7 | f | 7.71 | HH | HH | a1o9 + I | 8 | t | 8.81 | II | II | a1o9 + J | 9 | f | 9.91 | JJ | JJ | a1o9 + | 0 | t | 0.01 | AA | AA | a1o9 (9 rows) -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o5 (1 row) -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1 (1 row) -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o3 | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o3 (2 rows) -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o2 @@ -1135,7 +1195,7 @@ SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o2 (7 rows) -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4 @@ -1148,7 +1208,7 @@ SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a3c1700s4d1.11o4 (8 rows) -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------ C | 2 | | 2.21 | CC | CC | a3c1700s4d1.11o6 @@ -1161,26 +1221,26 @@ SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o6 (8 rows) -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------------------- + B | | f | 1.11 | BB | BB | a3m1231s4d1.11s4d2.21o10 + C | 2 | | 2.21 | CC | CC | a3m1231s4d1.11s4d2.21o10 (2 rows) -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - E | 4 | t | 4.41 | | EE | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------------- + E | 4 | t | 4.41 | | EE | a3m1231s4d1.11s4d2.21o10l2 + F | 5 | f | 5.51 | FF | | a3m1231s4d1.11s4d2.21o10l2 + G | 6 | t | 6.61 | GG | GG | a3m1231s4d1.11s4d2.21o10l2 + H | 7 | f | 7.71 | HH | HH | a3m1231s4d1.11s4d2.21o10l2 + I | 8 | t | 8.81 | II | II | a3m1231s4d1.11s4d2.21o10l2 + J | 9 | f | 9.91 | JJ | JJ | a3m1231s4d1.11s4d2.21o10l2 + | 0 | t | 0.01 | AA | AA | a3m1231s4d1.11s4d2.21o10l2 (7 rows) -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ B | | f | 1.11 | BB | BB | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 @@ -1188,7 +1248,7 @@ SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; E | 4 | t | 4.41 | | EE | a3c1700s4d1.11o4a3c1700s4d4.41o3l0 (3 rows) -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------------------------------ F | 5 | f | 5.51 | FF | | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 @@ -1199,53 +1259,53 @@ SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a3c1700s4d1.11o1a3c1700s4d4.41o2l1 (6 rows) -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- D | 3 | f | | DD | DD | a3o8 (1 row) -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | a3o8l2 - C | 2 | | 2.21 | CC | CC | a3o8l2 - E | 4 | t | 4.41 | | EE | a3o8l2 - F | 5 | f | 5.51 | FF | | a3o8l2 - G | 6 | t | 6.61 | GG | GG | a3o8l2 - H | 7 | f | 7.71 | HH | HH | a3o8l2 - I | 8 | t | 8.81 | II | II | a3o8l2 - J | 9 | f | 9.91 | JJ | JJ | a3o8l2 - | 0 | t | 0.01 | AA | AA | a3o8l2 + B | | f | 1.11 | BB | BB | a3o9 + C | 2 | | 2.21 | CC | CC | a3o9 + E | 4 | t | 4.41 | | EE | a3o9 + F | 5 | f | 5.51 | FF | | a3o9 + G | 6 | t | 6.61 | GG | GG | a3o9 + H | 7 | f | 7.71 | HH | HH | a3o9 + I | 8 | t | 8.81 | II | II | a3o9 + J | 9 | f | 9.91 | JJ | JJ | a3o9 + | 0 | t | 0.01 | AA | AA | a3o9 (9 rows) -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+----------------- B | | f | 1.11 | BB | BB | a4c1042s3dBB o5 (1 row) -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo3 | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo2 @@ -1257,7 +1317,7 @@ SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- B | | f | 1.11 | BB | BB | a4c1042s2dBBo4 @@ -1270,7 +1330,7 @@ SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------- C | 2 | | 2.21 | CC | CC | a4c1042s2dBBo6 @@ -1283,45 +1343,45 @@ SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+-------------- + B | | f | 1.11 | BB | BB | a4c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a4c25s2dB%o7l2 + D | 3 | f | | DD | DD | a4c25s2dB%o7l2 + F | 5 | f | 5.51 | FF | | a4c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a4c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a4c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a4c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a4c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a4c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a4m1014s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a4m1014s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - F | 5 | f | 5.51 | FF | | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a4m1014s2dBBs2dCCo10l2 + F | 5 | f | 5.51 | FF | | a4m1014s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a4m1014s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a4m1014s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a4m1014s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a4m1014s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a4m1014s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- B | | f | 1.11 | BB | BB | a4c1042s2dAAo4a4c1042s2dCCo3l0 @@ -1329,7 +1389,7 @@ SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a4c1042s2dAAo4a4c1042s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------- D | 3 | f | | DD | DD | a4c1042s2dAAo1a4c1042s2dCCo2l1 @@ -1340,52 +1400,52 @@ SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a4c1042s2dAAo1a4c1042s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- E | 4 | t | 4.41 | | EE | a4o8 (1 row) -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | a4o8l2 - C | 2 | | 2.21 | CC | CC | a4o8l2 - D | 3 | f | | DD | DD | a4o8l2 - F | 5 | f | 5.51 | FF | | a4o8l2 - G | 6 | t | 6.61 | GG | GG | a4o8l2 - H | 7 | f | 7.71 | HH | HH | a4o8l2 - I | 8 | t | 8.81 | II | II | a4o8l2 - J | 9 | f | 9.91 | JJ | JJ | a4o8l2 - | 0 | t | 0.01 | AA | AA | a4o8l2 + B | | f | 1.11 | BB | BB | a4o9 + C | 2 | | 2.21 | CC | CC | a4o9 + D | 3 | f | | DD | DD | a4o9 + F | 5 | f | 5.51 | FF | | a4o9 + G | 6 | t | 6.61 | GG | GG | a4o9 + H | 7 | f | 7.71 | HH | HH | a4o9 + I | 8 | t | 8.81 | II | II | a4o9 + J | 9 | f | 9.91 | JJ | JJ | a4o9 + | 0 | t | 0.01 | AA | AA | a4o9 (9 rows) -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo5 (1 row) -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+----+----+----+------------- (0 rows) -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- | 0 | t | 0.01 | AA | AA | a5c25s2dBBo1 (1 row) -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo3 | 0 | t | 0.01 | AA | AA | a5c25s2dBBo3 (2 rows) -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo2 @@ -1397,7 +1457,7 @@ SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo2 (7 rows) -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dBBo4 @@ -1410,7 +1470,7 @@ SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dBBo4 (8 rows) -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- C | 2 | | 2.21 | CC | CC | a5c25s2dBBo6 @@ -1423,45 +1483,45 @@ SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dBBo6 (8 rows) -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------- B | | f | 1.11 | BB | BB | a5c25s2dB%o7 (1 row) -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - C | 2 | | 2.21 | CC | CC | No filter - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------- + C | 2 | | 2.21 | CC | CC | a5c25s2dB%o7l2 + D | 3 | f | | DD | DD | a5c25s2dB%o7l2 + E | 4 | t | 4.41 | | EE | a5c25s2dB%o7l2 + G | 6 | t | 6.61 | GG | GG | a5c25s2dB%o7l2 + H | 7 | f | 7.71 | HH | HH | a5c25s2dB%o7l2 + I | 8 | t | 8.81 | II | II | a5c25s2dB%o7l2 + J | 9 | f | 9.91 | JJ | JJ | a5c25s2dB%o7l2 + | 0 | t | 0.01 | AA | AA | a5c25s2dB%o7l2 (8 rows) -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | No filter - C | 2 | | 2.21 | CC | CC | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+---------------------- + B | | f | 1.11 | BB | BB | a5m1009s2dBBs2dCCo10 + C | 2 | | 2.21 | CC | CC | a5m1009s2dBBs2dCCo10 (2 rows) -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; - t0 | a1 | b2 | c3 | d4 | e5 | filtervalue -----+----+----+------+----+----+------------- - D | 3 | f | | DD | DD | No filter - E | 4 | t | 4.41 | | EE | No filter - G | 6 | t | 6.61 | GG | GG | No filter - H | 7 | f | 7.71 | HH | HH | No filter - I | 8 | t | 8.81 | II | II | No filter - J | 9 | f | 9.91 | JJ | JJ | No filter - | 0 | t | 0.01 | AA | AA | No filter +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; + t0 | a1 | b2 | c3 | d4 | e5 | filtervalue +----+----+----+------+----+----+------------------------ + D | 3 | f | | DD | DD | a5m1009s2dBBs2dCCo10l2 + E | 4 | t | 4.41 | | EE | a5m1009s2dBBs2dCCo10l2 + G | 6 | t | 6.61 | GG | GG | a5m1009s2dBBs2dCCo10l2 + H | 7 | f | 7.71 | HH | HH | a5m1009s2dBBs2dCCo10l2 + I | 8 | t | 8.81 | II | II | a5m1009s2dBBs2dCCo10l2 + J | 9 | f | 9.91 | JJ | JJ | a5m1009s2dBBs2dCCo10l2 + | 0 | t | 0.01 | AA | AA | a5m1009s2dBBs2dCCo10l2 (7 rows) -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- B | | f | 1.11 | BB | BB | a5c25s2dAAo4a5c25s2dCCo3l0 @@ -1469,7 +1529,7 @@ SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; | 0 | t | 0.01 | AA | AA | a5c25s2dAAo4a5c25s2dCCo3l0 (3 rows) -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+---------------------------- D | 3 | f | | DD | DD | a5c25s2dAAo1a5c25s2dCCo2l1 @@ -1480,24 +1540,24 @@ SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; J | 9 | f | 9.91 | JJ | JJ | a5c25s2dAAo1a5c25s2dCCo2l1 (6 rows) -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- F | 5 | f | 5.51 | FF | | a5o8 (1 row) -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- - B | | f | 1.11 | BB | BB | a5o8l2 - C | 2 | | 2.21 | CC | CC | a5o8l2 - D | 3 | f | | DD | DD | a5o8l2 - E | 4 | t | 4.41 | | EE | a5o8l2 - G | 6 | t | 6.61 | GG | GG | a5o8l2 - H | 7 | f | 7.71 | HH | HH | a5o8l2 - I | 8 | t | 8.81 | II | II | a5o8l2 - J | 9 | f | 9.91 | JJ | JJ | a5o8l2 - | 0 | t | 0.01 | AA | AA | a5o8l2 + B | | f | 1.11 | BB | BB | a5o9 + C | 2 | | 2.21 | CC | CC | a5o9 + D | 3 | f | | DD | DD | a5o9 + E | 4 | t | 4.41 | | EE | a5o9 + G | 6 | t | 6.61 | GG | GG | a5o9 + H | 7 | f | 7.71 | HH | HH | a5o9 + I | 8 | t | 8.81 | II | II | a5o9 + J | 9 | f | 9.91 | JJ | JJ | a5o9 + | 0 | t | 0.01 | AA | AA | a5o9 (9 rows) ----------------------------------------------------- @@ -1507,14 +1567,14 @@ SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; -- gp_external_enable_filter_pushdown guc SET gp_external_enable_filter_pushdown = off; SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- J | 9 | f | 9.91 | JJ | JJ | No filter (1 row) SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+------------- J | 9 | f | 9.91 | JJ | JJ | No filter @@ -1524,25 +1584,2772 @@ SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 ------ Check that Filter Push Down is working with HEX delimiter ------ ----------------------------------------------------------------------- DROP EXTERNAL TABLE IF EXISTS test_filter CASCADE; -CREATE EXTERNAL TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE EXTERNAL TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) LOCATION (E'pxf://dummy_path?PROFILE=system:filter') FORMAT 'CSV' (DELIMITER E'\x01'); SET gp_external_enable_filter_pushdown = true; SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------------------------------------------------------- J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a0c25s1dJo5a1c23s1d9o5a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0 (1 row) SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; t0 | a1 | b2 | c3 | d4 | e5 | filtervalue ----+----+----+------+----+----+-------------------------------------------------------------------------------------------- - J | 9 | f | 9.91 | JJ | JJ | a0c25s1dJo5a1c23s1d9o5a2c16s4dtrueo0l2a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0 + J | 9 | f | 9.91 | JJ | JJ | a2c16s4dtrueo0l2a0c25s1dJo5a1c23s1d9o5a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0 (1 row) --- start_ignore --- clean up used tables -DROP EXTERNAL TABLE IF EXISTS test_filter CASCADE; --- end_ignore +-- Test newly supported types +CREATE EXTERNAL TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) + LOCATION (E'pxf://dummy_path?PROFILE=system:filter') + FORMAT 'CSV'; +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; + x1 | filtervalue +----+----------------- + BB | a6c1042s3dBB o5 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBCo1 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo3 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo2 + DD | a6c1042s2dBBo2 + EE | a6c1042s2dBBo2 + FF | a6c1042s2dBBo2 + GG | a6c1042s2dBBo2 + HH | a6c1042s2dBBo2 + II | a6c1042s2dBBo2 + JJ | a6c1042s2dBBo2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + BB | a6c1042s2dBBo4 + CC | a6c1042s2dBBo4 + DD | a6c1042s2dBBo4 + EE | a6c1042s2dBBo4 + FF | a6c1042s2dBBo4 + GG | a6c1042s2dBBo4 + HH | a6c1042s2dBBo4 + II | a6c1042s2dBBo4 + JJ | a6c1042s2dBBo4 +(9 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c1042s2dBBo6 + DD | a6c1042s2dBBo6 + EE | a6c1042s2dBBo6 + FF | a6c1042s2dBBo6 + GG | a6c1042s2dBBo6 + HH | a6c1042s2dBBo6 + II | a6c1042s2dBBo6 + JJ | a6c1042s2dBBo6 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+-------------- + BB | a6c25s2dB%o7 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; + x1 | filtervalue +----+---------------- + CC | a6c25s2dB%o7l2 + DD | a6c25s2dB%o7l2 + EE | a6c25s2dB%o7l2 + FF | a6c25s2dB%o7l2 + GG | a6c25s2dB%o7l2 + HH | a6c25s2dB%o7l2 + II | a6c25s2dB%o7l2 + JJ | a6c25s2dB%o7l2 +(8 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+---------------------- + BB | a6m1014s2dBBs2dCCo10 + CC | a6m1014s2dBBs2dCCo10 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; + x1 | filtervalue +----+------------------------ + DD | a6m1014s2dBBs2dCCo10l2 + EE | a6m1014s2dBBs2dCCo10l2 + FF | a6m1014s2dBBs2dCCo10l2 + GG | a6m1014s2dBBs2dCCo10l2 + HH | a6m1014s2dBBs2dCCo10l2 + II | a6m1014s2dBBs2dCCo10l2 + JJ | a6m1014s2dBBs2dCCo10l2 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + BB | a6c1042s2dAAo4a6c1042s2dCCo3l0 + CC | a6c1042s2dAAo4a6c1042s2dCCo3l0 +(2 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; + x1 | filtervalue +----+-------------------------------- + DD | a6c1042s2dAAo1a6c1042s2dCCo2l1 + EE | a6c1042s2dAAo1a6c1042s2dCCo2l1 + FF | a6c1042s2dAAo1a6c1042s2dCCo2l1 + GG | a6c1042s2dAAo1a6c1042s2dCCo2l1 + HH | a6c1042s2dAAo1a6c1042s2dCCo2l1 + II | a6c1042s2dAAo1a6c1042s2dCCo2l1 + JJ | a6c1042s2dAAo1a6c1042s2dCCo2l1 +(7 rows) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + | a6o8 +(1 row) + +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + x1 | filtervalue +----+------------- + BB | a6o9 + CC | a6o9 + DD | a6o9 + EE | a6o9 + FF | a6o9 + GG | a6o9 + HH | a6o9 + II | a6o9 + JJ | a6o9 +(9 rows) + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o5 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 0 | a7c21s1d2o1 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o3 + 0 | a7c21s1d2o3 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o2 + 4 | a7c21s1d2o2 + 5 | a7c21s1d2o2 + 6 | a7c21s1d2o2 + 7 | a7c21s1d2o2 + 8 | a7c21s1d2o2 + 9 | a7c21s1d2o2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7c21s1d2o4 + 3 | a7c21s1d2o4 + 4 | a7c21s1d2o4 + 5 | a7c21s1d2o4 + 6 | a7c21s1d2o4 + 7 | a7c21s1d2o4 + 8 | a7c21s1d2o4 + 9 | a7c21s1d2o4 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 3 | a7c21s1d2o6 + 4 | a7c21s1d2o6 + 5 | a7c21s1d2o6 + 6 | a7c21s1d2o6 + 7 | a7c21s1d2o6 + 8 | a7c21s1d2o6 + 9 | a7c21s1d2o6 + 0 | a7c21s1d2o6 +(8 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+-------------------- + 2 | a7m1007s1d2s1d3o10 + 3 | a7m1007s1d2s1d3o10 +(2 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; + x2 | filtervalue +----+---------------------- + 4 | a7m1005s1d2s1d3o10l2 + 5 | a7m1005s1d2s1d3o10l2 + 6 | a7m1005s1d2s1d3o10l2 + 7 | a7m1005s1d2s1d3o10l2 + 8 | a7m1005s1d2s1d3o10l2 + 9 | a7m1005s1d2s1d3o10l2 + 0 | a7m1005s1d2s1d3o10l2 +(7 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 2 | a7c21s1d2o4a7c21s1d4o3l0 + 3 | a7c21s1d2o4a7c21s1d4o3l0 + 4 | a7c21s1d2o4a7c21s1d4o3l0 +(3 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; + x2 | filtervalue +----+-------------------------- + 5 | a7c21s1d2o1a7c21s1d4o2l1 + 6 | a7c21s1d2o1a7c21s1d4o2l1 + 7 | a7c21s1d2o1a7c21s1d4o2l1 + 8 | a7c21s1d2o1a7c21s1d4o2l1 + 9 | a7c21s1d2o1a7c21s1d4o2l1 + 0 | a7c21s1d2o1a7c21s1d4o2l1 +(6 rows) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + | a7o8 +(1 row) + +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + x2 | filtervalue +----+------------- + 2 | a7o9 + 3 | a7o9 + 4 | a7o9 + 5 | a7o9 + 6 | a7o9 + 7 | a7o9 + 8 | a7o9 + 9 | a7o9 + 0 | a7o9 +(9 rows) + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d1o5 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o1 + 0 | a8c20s1d2o1 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o3 + 0 | a8c20s1d2o3 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o2 + 4 | a8c20s1d2o2 + 5 | a8c20s1d2o2 + 6 | a8c20s1d2o2 + 7 | a8c20s1d2o2 + 8 | a8c20s1d2o2 + 9 | a8c20s1d2o2 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 3 | a8c20s1d2o4 + 4 | a8c20s1d2o4 + 5 | a8c20s1d2o4 + 6 | a8c20s1d2o4 + 7 | a8c20s1d2o4 + 8 | a8c20s1d2o4 + 9 | a8c20s1d2o4 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8c20s1d2o6 + 3 | a8c20s1d2o6 + 4 | a8c20s1d2o6 + 5 | a8c20s1d2o6 + 6 | a8c20s1d2o6 + 7 | a8c20s1d2o6 + 8 | a8c20s1d2o6 + 9 | a8c20s1d2o6 + 0 | a8c20s1d2o6 +(9 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+-------------------- + 3 | a8m1016s1d2s1d3o10 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; + x3 | filtervalue +----+---------------------- + 1 | a8m1016s1d2s1d3o10l2 + 4 | a8m1016s1d2s1d3o10l2 + 5 | a8m1016s1d2s1d3o10l2 + 6 | a8m1016s1d2s1d3o10l2 + 7 | a8m1016s1d2s1d3o10l2 + 8 | a8m1016s1d2s1d3o10l2 + 9 | a8m1016s1d2s1d3o10l2 + 0 | a8m1016s1d2s1d3o10l2 +(8 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 3 | a8c20s1d2o4a8c20s1d4o3l0 + 4 | a8c20s1d2o4a8c20s1d4o3l0 +(2 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; + x3 | filtervalue +----+-------------------------- + 1 | a8c20s1d2o1a8c20s1d4o2l1 + 5 | a8c20s1d2o1a8c20s1d4o2l1 + 6 | a8c20s1d2o1a8c20s1d4o2l1 + 7 | a8c20s1d2o1a8c20s1d4o2l1 + 8 | a8c20s1d2o1a8c20s1d4o2l1 + 9 | a8c20s1d2o1a8c20s1d4o2l1 + 0 | a8c20s1d2o1a8c20s1d4o2l1 +(7 rows) + +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + | a8o8 +(1 row) + +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + x3 | filtervalue +----+------------- + 1 | a8o9 + 3 | a8o9 + 4 | a8o9 + 5 | a8o9 + 6 | a8o9 + 7 | a8o9 + 8 | a8o9 + 9 | a8o9 + 0 | a8o9 +(9 rows) + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o5 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 0.01 | a9c700s4d1.11o1 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o3 + 0.01 | a9c700s4d1.11o3 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o2 + 4.41 | a9c700s4d1.11o2 + 5.51 | a9c700s4d1.11o2 + 6.61 | a9c700s4d1.11o2 + 7.71 | a9c700s4d1.11o2 + 8.81 | a9c700s4d1.11o2 + 9.91 | a9c700s4d1.11o2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 1.11 | a9c700s4d1.11o4 + 2.21 | a9c700s4d1.11o4 + 4.41 | a9c700s4d1.11o4 + 5.51 | a9c700s4d1.11o4 + 6.61 | a9c700s4d1.11o4 + 7.71 | a9c700s4d1.11o4 + 8.81 | a9c700s4d1.11o4 + 9.91 | a9c700s4d1.11o4 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; + x4 | filtervalue +------+----------------- + 2.21 | a9c700s4d1.11o6 + 4.41 | a9c700s4d1.11o6 + 5.51 | a9c700s4d1.11o6 + 6.61 | a9c700s4d1.11o6 + 7.71 | a9c700s4d1.11o6 + 8.81 | a9c700s4d1.11o6 + 9.91 | a9c700s4d1.11o6 + 0.01 | a9c700s4d1.11o6 +(8 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+-------------------------- + 1.11 | a9m1021s4d1.11s4d2.21o10 + 2.21 | a9m1021s4d1.11s4d2.21o10 +(2 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------- + 4.41 | a9m1021s4d1.11s4d2.21o10l2 + 5.51 | a9m1021s4d1.11s4d2.21o10l2 + 6.61 | a9m1021s4d1.11s4d2.21o10l2 + 7.71 | a9m1021s4d1.11s4d2.21o10l2 + 8.81 | a9m1021s4d1.11s4d2.21o10l2 + 9.91 | a9m1021s4d1.11s4d2.21o10l2 + 0.01 | a9m1021s4d1.11s4d2.21o10l2 +(7 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 1.11 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 2.21 | a9c700s4d1.11o4a9c700s4d4.41o3l0 + 4.41 | a9c700s4d1.11o4a9c700s4d4.41o3l0 +(3 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; + x4 | filtervalue +------+---------------------------------- + 5.51 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 6.61 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 7.71 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 8.81 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 9.91 | a9c700s4d1.11o1a9c700s4d4.41o2l1 + 0.01 | a9c700s4d1.11o1a9c700s4d4.41o2l1 +(6 rows) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; + x4 | filtervalue +----+------------- + | a9o8 +(1 row) + +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + x4 | filtervalue +------+------------- + 1.11 | a9o9 + 2.21 | a9o9 + 4.41 | a9o9 + 5.51 | a9o9 + 6.61 | a9o9 + 7.71 | a9o9 + 8.81 | a9o9 + 9.91 | a9o9 + 0.01 | a9o9 +(9 rows) + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o5 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 0.01 | a10c701s4d1.11o1 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o3 + 0.01 | a10c701s4d1.11o3 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o2 + 3.31 | a10c701s4d1.11o2 + 5.51 | a10c701s4d1.11o2 + 6.61 | a10c701s4d1.11o2 + 7.71 | a10c701s4d1.11o2 + 8.81 | a10c701s4d1.11o2 + 9.91 | a10c701s4d1.11o2 +(7 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 1.11 | a10c701s4d1.11o4 + 2.21 | a10c701s4d1.11o4 + 3.31 | a10c701s4d1.11o4 + 5.51 | a10c701s4d1.11o4 + 6.61 | a10c701s4d1.11o4 + 7.71 | a10c701s4d1.11o4 + 8.81 | a10c701s4d1.11o4 + 9.91 | a10c701s4d1.11o4 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------ + 2.21 | a10c701s4d1.11o6 + 3.31 | a10c701s4d1.11o6 + 5.51 | a10c701s4d1.11o6 + 6.61 | a10c701s4d1.11o6 + 7.71 | a10c701s4d1.11o6 + 8.81 | a10c701s4d1.11o6 + 9.91 | a10c701s4d1.11o6 + 0.01 | a10c701s4d1.11o6 +(8 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+--------------------------- + 1.11 | a10m1022s4d1.11s4d2.21o10 + 2.21 | a10m1022s4d1.11s4d2.21o10 +(2 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; + x5 | filtervalue +------+----------------------------- + 3.31 | a10m1022s4d1.11s4d2.21o10l2 + 5.51 | a10m1022s4d1.11s4d2.21o10l2 + 6.61 | a10m1022s4d1.11s4d2.21o10l2 + 7.71 | a10m1022s4d1.11s4d2.21o10l2 + 8.81 | a10m1022s4d1.11s4d2.21o10l2 + 9.91 | a10m1022s4d1.11s4d2.21o10l2 + 0.01 | a10m1022s4d1.11s4d2.21o10l2 +(7 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 1.11 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 2.21 | a10c701s4d1.11o4a10c701s4d4.41o3l0 + 3.31 | a10c701s4d1.11o4a10c701s4d4.41o3l0 +(3 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; + x5 | filtervalue +------+------------------------------------ + 5.51 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 6.61 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 7.71 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 8.81 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 9.91 | a10c701s4d1.11o1a10c701s4d4.41o2l1 + 0.01 | a10c701s4d1.11o1a10c701s4d4.41o2l1 +(6 rows) + +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; + x5 | filtervalue +----+------------- + | a10o8 +(1 row) + +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + x5 | filtervalue +------+------------- + 1.11 | a10o9 + 2.21 | a10o9 + 3.31 | a10o9 + 5.51 | a10o9 + 6.61 | a10o9 + 7.71 | a10o9 + 8.81 | a10o9 + 9.91 | a10o9 + 0.01 | a10o9 +(9 rows) + +-- bytea +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao5 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75785ao1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao3 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------------ + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 + \x5a677265656e706c756d5a | a11c17s22d\x5a677265656e706c756do2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------- + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 + \x5a677265656e706c756d5a | a11c17s26d\x5a67726565656e706c756d5ao6 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+-------------------------- + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 + \x5a677265656e706c756d5a | a11c17s12d\x5a67726525o7 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------------------------ + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 + \x5a677265656e706c756d5a | a11c17s14d\x677265656e25o7l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 + \x5a677265656e706c756d5a | a11m1001s24d\x5a677265656e706c756d5as12d\x736461735ao10 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; + x6 | filtervalue +--------------------------+--------------------------------------------------------- + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 + \x5a677265656e706c756d5a | a11m1001s22d\x5a6772656e706c756d5as12d\x736461735ao10l2 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c756d5ao4a11c17s12d\x736461735ao3l0 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; + x6 | filtervalue +--------------------------+---------------------------------------------------------------- + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 + \x5a677265656e706c756d5a | a11c17s24d\x5a677265656e706c75705ao1a11c17s12d\x736461735ao2l1 +(9 rows) + +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; + x6 | filtervalue +----+------------- + | a11o8 +(1 row) + +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; + x6 | filtervalue +--------------------------+------------- + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 + \x5a677265656e706c756d5a | a11o9 +(9 rows) + +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-11-2023o5 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-12-2023o1 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-12-2023o3 + 01-12-2023 | a12c1082s10d01-12-2023o3 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-12-2023 | a12c1082s10d01-11-2023o2 + 01-13-2023 | a12c1082s10d01-11-2023o2 + 01-14-2023 | a12c1082s10d01-11-2023o2 + 01-15-2023 | a12c1082s10d01-11-2023o2 + 01-16-2023 | a12c1082s10d01-11-2023o2 + 01-17-2023 | a12c1082s10d01-11-2023o2 + 01-18-2023 | a12c1082s10d01-11-2023o2 + 01-19-2023 | a12c1082s10d01-11-2023o2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-12-2023 | a12c1082s10d01-12-2023o4 + 01-13-2023 | a12c1082s10d01-12-2023o4 + 01-14-2023 | a12c1082s10d01-12-2023o4 + 01-15-2023 | a12c1082s10d01-12-2023o4 + 01-16-2023 | a12c1082s10d01-12-2023o4 + 01-17-2023 | a12c1082s10d01-12-2023o4 + 01-18-2023 | a12c1082s10d01-12-2023o4 + 01-19-2023 | a12c1082s10d01-12-2023o4 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; + x7 | filtervalue +------------+-------------------------- + 01-11-2023 | a12c1082s10d01-15-2023o6 + 01-12-2023 | a12c1082s10d01-15-2023o6 + 01-13-2023 | a12c1082s10d01-15-2023o6 + 01-14-2023 | a12c1082s10d01-15-2023o6 + 01-16-2023 | a12c1082s10d01-15-2023o6 + 01-17-2023 | a12c1082s10d01-15-2023o6 + 01-18-2023 | a12c1082s10d01-15-2023o6 + 01-19-2023 | a12c1082s10d01-15-2023o6 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+----------------------------------------- + 01-12-2023 | a12m1182s10d01-12-2023s10d01-15-2023o10 + 01-15-2023 | a12m1182s10d01-12-2023s10d01-15-2023o10 +(2 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; + x7 | filtervalue +------------+------------------------------------------- + 01-11-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-12-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-13-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-14-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-16-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-17-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-18-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 + 01-19-2023 | a12m1182s10d01-15-2023s10d01-15-2023o10l2 +(8 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 01-11-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-12-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-13-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-14-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-15-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-16-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-17-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-18-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 + 01-19-2023 | a12c1082s10d01-11-2023o4a12c1082s10d01-19-2023o3l0 +(9 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; + x7 | filtervalue +------------+---------------------------------------------------- + 01-14-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-15-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-16-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-17-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-18-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 + 01-19-2023 | a12c1082s10d01-10-2023o1a12c1082s10d01-13-2023o2l1 +(6 rows) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; + x7 | filtervalue +----+------------- + | a12o8 +(1 row) + +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + x7 | filtervalue +------------+------------- + 01-11-2023 | a12o9 + 01-12-2023 | a12o9 + 01-13-2023 | a12o9 + 01-14-2023 | a12o9 + 01-15-2023 | a12o9 + 01-16-2023 | a12o9 + 01-17-2023 | a12o9 + 01-18-2023 | a12o9 + 01-19-2023 | a12o9 +(9 rows) + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:50o5 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:50 | a13c1083s8d12:34:52o1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o3 + 12:34:50 | a13c1083s8d12:34:52o3 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:51o2 + 12:34:53 | a13c1083s8d12:34:51o2 + 12:34:54 | a13c1083s8d12:34:51o2 + 12:34:55 | a13c1083s8d12:34:51o2 + 12:34:56 | a13c1083s8d12:34:51o2 + 12:34:57 | a13c1083s8d12:34:51o2 + 12:34:58 | a13c1083s8d12:34:51o2 + 12:34:59 | a13c1083s8d12:34:51o2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:52o4 + 12:34:53 | a13c1083s8d12:34:52o4 + 12:34:54 | a13c1083s8d12:34:52o4 + 12:34:55 | a13c1083s8d12:34:52o4 + 12:34:56 | a13c1083s8d12:34:52o4 + 12:34:57 | a13c1083s8d12:34:52o4 + 12:34:58 | a13c1083s8d12:34:52o4 + 12:34:59 | a13c1083s8d12:34:52o4 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------- + 12:34:52 | a13c1083s8d12:34:55o6 + 12:34:53 | a13c1083s8d12:34:55o6 + 12:34:54 | a13c1083s8d12:34:55o6 + 12:34:56 | a13c1083s8d12:34:55o6 + 12:34:57 | a13c1083s8d12:34:55o6 + 12:34:58 | a13c1083s8d12:34:55o6 + 12:34:59 | a13c1083s8d12:34:55o6 + 12:34:50 | a13c1083s8d12:34:55o6 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+----------------------------------- + 12:34:52 | a13m1183s8d12:34:52s8d12:34:55o10 + 12:34:55 | a13m1183s8d12:34:52s8d12:34:55o10 +(2 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; + x8 | filtervalue +----------+------------------------------------- + 12:34:52 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:53 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:54 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:56 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:57 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:58 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:59 | a13m1183s8d12:34:55s8d12:34:55o10l2 + 12:34:50 | a13m1183s8d12:34:55s8d12:34:55o10l2 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:52 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:53 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:54 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:55 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:56 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:57 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:58 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 + 12:34:59 | a13c1083s8d12:34:51o4a13c1083s8d12:34:59o3l0 +(8 rows) + +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; + x8 | filtervalue +----------+---------------------------------------------- + 12:34:50 | a13c1083s8d12:34:51o1a13c1083s8d12:34:59o2l1 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; + x8 | filtervalue +----+------------- + | a13o8 +(1 row) + +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + x8 | filtervalue +----------+------------- + 12:34:52 | a13o9 + 12:34:53 | a13o9 + 12:34:54 | a13o9 + 12:34:55 | a13o9 + 12:34:56 | a13o9 + 12:34:57 | a13o9 + 12:34:58 | a13o9 + 12:34:59 | a13o9 + 12:34:50 | a13o9 +(9 rows) + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:50 2023o5 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o1 + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o1 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o3 + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o3 +(2 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:55 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o2 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:55 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:52 2023o4 +(7 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+---------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:55 2023o6 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +--------------------------+--------------------------------------------------------------------- + Sun Jan 01 12:34:55 2023 | a14m1115s24dSun Jan 01 12:34:52 2023s24dSun Jan 01 12:34:55 2023o10 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; + x9 | filtervalue +--------------------------+----------------------------------------------------------------------- + Sun Jan 01 12:34:51 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:53 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:54 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:56 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:57 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:58 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:59 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 + Sun Jan 01 12:34:50 2023 | a14m1115s24dSun Jan 01 12:34:55 2023s24dSun Jan 01 12:34:55 2023o10l2 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+-------------------------------------------------------------------------------- + Sun Jan 01 12:34:51 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:53 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:54 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:55 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:56 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:57 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:58 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 + Sun Jan 01 12:34:59 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o4a14c1114s24dSun Jan 01 12:34:59 2023o3l0 +(8 rows) + +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; + x9 | filtervalue +--------------------------+-------------------------------------------------------------------------------- + Sun Jan 01 12:34:50 2023 | a14c1114s24dSun Jan 01 12:34:51 2023o1a14c1114s24dSun Jan 01 12:34:59 2023o2l1 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; + x9 | filtervalue +----+------------- + | a14o8 +(1 row) + +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + x9 | filtervalue +--------------------------+------------- + Sun Jan 01 12:34:51 2023 | a14o9 + Sun Jan 01 12:34:53 2023 | a14o9 + Sun Jan 01 12:34:54 2023 | a14o9 + Sun Jan 01 12:34:55 2023 | a14o9 + Sun Jan 01 12:34:56 2023 | a14o9 + Sun Jan 01 12:34:57 2023 | a14o9 + Sun Jan 01 12:34:58 2023 | a14o9 + Sun Jan 01 12:34:59 2023 | a14o9 + Sun Jan 01 12:34:50 2023 | a14o9 +(9 rows) + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 30 minso5 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 31 mins | a16c1186s16d@ 1 hour 35 minso1 + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 35 minso1 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 35 minso1 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 35 minso1 +(4 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 31 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 36 minso3 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 36 minso3 +(6 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 33 minso2 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 33 minso2 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 35 minso4 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 35 minso4 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+-------------------------------- + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 31 minso6 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 31 minso6 +(8 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +------------------+----------------------------------------------------- + @ 1 hour 33 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10 + @ 1 hour 30 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10 +(2 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; + x11 | filtervalue +------------------+------------------------------------------------------- + @ 1 hour 31 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 32 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 35 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 36 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 37 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 38 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 + @ 1 hour 39 mins | a16m1187s16d@ 1 hour 30 minss16d@ 1 hour 33 minso10l2 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+---------------------------------------------------------------- + @ 1 hour 31 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 + @ 1 hour 30 mins | a16c1186s16d@ 1 hour 30 minso4a16c1186s16d@ 1 hour 35 minso3l0 +(5 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; + x11 | filtervalue +------------------+---------------------------------------------------------------- + @ 1 hour 32 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 33 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 35 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 36 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 37 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 38 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 + @ 1 hour 39 mins | a16c1186s16d@ 1 hour 30 minso1a16c1186s16d@ 1 hour 31 minso2l1 +(7 rows) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; + x11 | filtervalue +-----+------------- + | a16o8 +(1 row) + +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + x11 | filtervalue +------------------+------------- + @ 1 hour 31 mins | a16o9 + @ 1 hour 32 mins | a16o9 + @ 1 hour 33 mins | a16o9 + @ 1 hour 35 mins | a16o9 + @ 1 hour 36 mins | a16o9 + @ 1 hour 37 mins | a16o9 + @ 1 hour 38 mins | a16o9 + @ 1 hour 39 mins | a16o9 + @ 1 hour 30 mins | a16o9 +(9 rows) + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o5 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o1 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a5o3 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o4 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+---------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o6 +(8 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+--------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a0s36d93d8f9c0-c314-447b-8690-60c40facb8a2o10 +(2 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+----------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a2s36d93d8f9c0-c314-447b-8690-60c40facb8a0o10l2 +(7 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o4a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a4o3l0 +(5 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+-------------------------------------------------------------------------------------------------------- + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a0o1a17c2950s36d93d8f9c0-c314-447b-8690-60c40facb8a2o2l1 +(6 rows) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; + x12 | filtervalue +-----+------------- + | a17o8 +(1 row) + +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + x12 | filtervalue +--------------------------------------+------------- + 93d8f9c0-c314-447b-8690-60c40facb8a1 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a2 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a3 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a4 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a6 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a7 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a8 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a9 | a17o9 + 93d8f9c0-c314-447b-8690-60c40facb8a0 | a17o9 +(9 rows) + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; + x13 | filtervalue +-----+------------- + | a18o8 +(1 row) + +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + x13 | filtervalue +---------+------------- + {"a":1} | a18o9 + {"a":2} | a18o9 + {"a":3} | a18o9 + {"a":4} | a18o9 + {"a":5} | a18o9 + {"a":6} | a18o9 + {"a":7} | a18o9 + {"a":8} | a18o9 + {"a":9} | a18o9 +(9 rows) + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 0} | a19c3802s8d{a: 0}o5 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o1 + {"a": 0} | a19c3802s8d{a: 3}o1 +(2 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 3}o3 + {"a": 3} | a19c3802s8d{a: 3}o3 + {"a": 0} | a19c3802s8d{a: 3}o3 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 1}o2 + {"a": 3} | a19c3802s8d{a: 1}o2 + {"a": 4} | a19c3802s8d{a: 1}o2 + {"a": 5} | a19c3802s8d{a: 1}o2 + {"a": 6} | a19c3802s8d{a: 1}o2 + {"a": 7} | a19c3802s8d{a: 1}o2 + {"a": 8} | a19c3802s8d{a: 1}o2 + {"a": 9} | a19c3802s8d{a: 1}o2 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 4} | a19c3802s8d{a: 4}o4 + {"a": 5} | a19c3802s8d{a: 4}o4 + {"a": 6} | a19c3802s8d{a: 4}o4 + {"a": 7} | a19c3802s8d{a: 4}o4 + {"a": 8} | a19c3802s8d{a: 4}o4 + {"a": 9} | a19c3802s8d{a: 4}o4 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------- + {"a": 2} | a19c3802s8d{a: 5}o6 + {"a": 3} | a19c3802s8d{a: 5}o6 + {"a": 4} | a19c3802s8d{a: 5}o6 + {"a": 6} | a19c3802s8d{a: 5}o6 + {"a": 7} | a19c3802s8d{a: 5}o6 + {"a": 8} | a19c3802s8d{a: 5}o6 + {"a": 9} | a19c3802s8d{a: 5}o6 + {"a": 0} | a19c3802s8d{a: 5}o6 +(8 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------- + {"a": 6} | a19m3807s8d{a: 6}s8d{a: 1}o10 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; + x14 | filtervalue +----------+--------------------------------- + {"a": 2} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 3} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 5} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 6} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 7} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 9} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 + {"a": 0} | a19m3807s8d{a: 8}s8d{a: 4}o10l2 +(7 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 2} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 3} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 + {"a": 4} | a19c3802s8d{a: 1}o4a19c3802s8d{a: 4}o3l0 +(3 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; + x14 | filtervalue +----------+------------------------------------------ + {"a": 5} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 6} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 7} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 8} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 9} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 + {"a": 0} | a19c3802s8d{a: 1}o1a19c3802s8d{a: 4}o2l1 +(6 rows) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; + x14 | filtervalue +-----+------------- + | a19o8 +(1 row) + +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + x14 | filtervalue +----------+------------- + {"a": 2} | a19o9 + {"a": 3} | a19o9 + {"a": 4} | a19o9 + {"a": 5} | a19o9 + {"a": 6} | a19o9 + {"a": 7} | a19o9 + {"a": 8} | a19o9 + {"a": 9} | a19o9 + {"a": 0} | a19o9 +(9 rows) + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; + x15 | filtervalue +-------+-------------------- + {0,1} | a20m1005s1d0s1d1o5 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; + x15 | filtervalue +--------+--------------------------- + {1,2} | a20m1005s1d0s1d1s4dNULLo6 + {3,4} | a20m1005s1d0s1d1s4dNULLo6 + {4,5} | a20m1005s1d0s1d1s4dNULLo6 + {5,6} | a20m1005s1d0s1d1s4dNULLo6 + {6,7} | a20m1005s1d0s1d1s4dNULLo6 + {7,8} | a20m1005s1d0s1d1s4dNULLo6 + {8,9} | a20m1005s1d0s1d1s4dNULLo6 + {9,10} | a20m1005s1d0s1d1s4dNULLo6 + {0,1} | a20m1005s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; + x15 | filtervalue +-----+------------- + | a20o8 +(1 row) + +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; + x15 | filtervalue +--------+------------- + {1,2} | a20o9 + {3,4} | a20o9 + {4,5} | a20o9 + {5,6} | a20o9 + {6,7} | a20o9 + {7,8} | a20o9 + {8,9} | a20o9 + {9,10} | a20o9 + {0,1} | a20o9 +(9 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); + x15 | filtervalue +-------+---------------------------------------- + {1,2} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 + {5,6} | a20m1005s1d1s1d2o5a20m1005s1d5s1d6o5l1 +(2 rows) + +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + x15 | filtervalue +--------+---------------------------------------- + {0,1} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {1,2} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {3,4} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {6,7} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {7,8} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {8,9} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 + {9,10} | a20m1005s1d4s1d5o6a20m1005s1d5s1d6o6l0 +(7 rows) + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; + x16 | filtervalue +-------+-------------------- + {2,3} | a21m1007s1d2s1d3o5 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; + x16 | filtervalue +---------+--------------------------- + {3,4} | a21m1007s1d0s1d1s4dNULLo6 + {4,5} | a21m1007s1d0s1d1s4dNULLo6 + {6,7} | a21m1007s1d0s1d1s4dNULLo6 + {7,8} | a21m1007s1d0s1d1s4dNULLo6 + {8,9} | a21m1007s1d0s1d1s4dNULLo6 + {9,10} | a21m1007s1d0s1d1s4dNULLo6 + {10,11} | a21m1007s1d0s1d1s4dNULLo6 + {11,12} | a21m1007s1d0s1d1s4dNULLo6 + {2,3} | a21m1007s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; + x16 | filtervalue +-----+------------- + | a21o8 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; + x16 | filtervalue +---------+------------- + {3,4} | a21o9 + {4,5} | a21o9 + {6,7} | a21o9 + {7,8} | a21o9 + {8,9} | a21o9 + {9,10} | a21o9 + {10,11} | a21o9 + {11,12} | a21o9 + {2,3} | a21o9 +(9 rows) + +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); + x16 | filtervalue +-------+---------------------------------------- + {2,3} | a21m1007s1d2s1d3o5a21m1007s1d5s1d6o5l1 +(1 row) + +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + x16 | filtervalue +---------+---------------------------------------- + {2,3} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {3,4} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {6,7} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {7,8} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {8,9} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {9,10} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {10,11} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 + {11,12} | a21m1007s1d4s1d5o6a21m1007s1d5s1d6o6l0 +(8 rows) + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; + x17 | filtervalue +-------+-------------------- + {4,5} | a22m1016s1d4s1d5o5 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; + x17 | filtervalue +---------+--------------------------- + {5,6} | a22m1016s1d5s1d4s4dNULLo6 + {6,7} | a22m1016s1d5s1d4s4dNULLo6 + {7,8} | a22m1016s1d5s1d4s4dNULLo6 + {9,10} | a22m1016s1d5s1d4s4dNULLo6 + {10,11} | a22m1016s1d5s1d4s4dNULLo6 + {11,12} | a22m1016s1d5s1d4s4dNULLo6 + {12,13} | a22m1016s1d5s1d4s4dNULLo6 + {13,14} | a22m1016s1d5s1d4s4dNULLo6 + {4,5} | a22m1016s1d5s1d4s4dNULLo6 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; + x17 | filtervalue +-----+------------- + | a22o8 +(1 row) + +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; + x17 | filtervalue +---------+------------- + {5,6} | a22o9 + {6,7} | a22o9 + {7,8} | a22o9 + {9,10} | a22o9 + {10,11} | a22o9 + {11,12} | a22o9 + {12,13} | a22o9 + {13,14} | a22o9 + {4,5} | a22o9 +(9 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +-------+---------------------------------------- + {4,5} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 + {5,6} | a22m1016s1d4s1d5o5a22m1016s1d5s1d6o5l1 +(2 rows) + +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + x17 | filtervalue +---------+---------------------------------------- + {6,7} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {7,8} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {9,10} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {10,11} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {11,12} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {12,13} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 + {13,14} | a22m1016s1d4s1d5o6a22m1016s1d5s1d6o6l0 +(7 rows) + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; + x18 | filtervalue +------------+---------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6 +(4 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; + x18 | filtervalue +-----+------------- + | a23o8 +(1 row) + +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; + x18 | filtervalue +------------+------------- + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 + {f,t,NULL} | a23o9 + {t,f,NULL} | a23o9 +(9 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 + {t,f,NULL} | a23m1000s4dtrues5dfalses4dNULLo5a23m1000s4dtrueo5l1 +(5 rows) + +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + x18 | filtervalue +------------+----------------------------------------------------- + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 + {f,t,NULL} | a23m1000s4dtrues5dfalses4dNULLo6a23m1000s4dtrueo6l0 +(4 rows) + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; + x19 | filtervalue +-------+-------------------- + {B,B} | a24m1009s1dBs1dBo5 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; + x19 | filtervalue +-------+--------------------------- + {B,B} | a24m1009s1dAs1dAs4dNULLo6 + {C,C} | a24m1009s1dAs1dAs4dNULLo6 + {D,D} | a24m1009s1dAs1dAs4dNULLo6 + {E,E} | a24m1009s1dAs1dAs4dNULLo6 + {F,F} | a24m1009s1dAs1dAs4dNULLo6 + {G,G} | a24m1009s1dAs1dAs4dNULLo6 + {H,H} | a24m1009s1dAs1dAs4dNULLo6 + {I,I} | a24m1009s1dAs1dAs4dNULLo6 + {J,J} | a24m1009s1dAs1dAs4dNULLo6 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; + x19 | filtervalue +-----+------------- + | a24o8 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; + x19 | filtervalue +-------+------------- + {B,B} | a24o9 + {C,C} | a24o9 + {D,D} | a24o9 + {E,E} | a24o9 + {F,F} | a24o9 + {G,G} | a24o9 + {H,H} | a24o9 + {I,I} | a24o9 + {J,J} | a24o9 +(9 rows) + +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dBs1dBo5a24m1009s1dAs1dAs4dNULLo5l1 +(1 row) + +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + x19 | filtervalue +-------+----------------------------------------------- + {B,B} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {C,C} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {D,D} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {E,E} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {F,F} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {G,G} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {H,H} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {I,I} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 + {J,J} | a24m1009s1dAs1dAo6a24m1009s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; + x20 | filtervalue +-----------+------------------------ + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; + x20 | filtervalue +-------------+--------------------------- + {3.1,4.1} | a25m1021s1d0s1d1s4dNULLo6 + {4.1,5.1} | a25m1021s1d0s1d1s4dNULLo6 + {5.1,6.1} | a25m1021s1d0s1d1s4dNULLo6 + {6.1,7.1} | a25m1021s1d0s1d1s4dNULLo6 + {7.1,8.1} | a25m1021s1d0s1d1s4dNULLo6 + {8.1,9.1} | a25m1021s1d0s1d1s4dNULLo6 + {9.1,10.1} | a25m1021s1d0s1d1s4dNULLo6 + {10.1,11.1} | a25m1021s1d0s1d1s4dNULLo6 + {1.1,2.1} | a25m1021s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; + x20 | filtervalue +-----+------------- + | a25o8 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; + x20 | filtervalue +-------------+------------- + {3.1,4.1} | a25o9 + {4.1,5.1} | a25o9 + {5.1,6.1} | a25o9 + {6.1,7.1} | a25o9 + {7.1,8.1} | a25o9 + {8.1,9.1} | a25o9 + {9.1,10.1} | a25o9 + {10.1,11.1} | a25o9 + {1.1,2.1} | a25o9 +(9 rows) + +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a25m1021s3d1.1s3d2.1o5a25m1021s1d5s1d6o5l1 +(1 row) + +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + x20 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {3.1,4.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {4.1,5.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {5.1,6.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {6.1,7.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {7.1,8.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {8.1,9.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {9.1,10.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 + {10.1,11.1} | a25m1021s1d4s1d5o6a25m1021s1d5s1d6o6l0 +(9 rows) + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; + x21 | filtervalue +-----------+------------------------ + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; + x21 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a26m1022s1d0s1d1s4dNULLo6 + {4.1,5.1} | a26m1022s1d0s1d1s4dNULLo6 + {5.1,6.1} | a26m1022s1d0s1d1s4dNULLo6 + {6.1,7.1} | a26m1022s1d0s1d1s4dNULLo6 + {7.1,8.1} | a26m1022s1d0s1d1s4dNULLo6 + {8.1,9.1} | a26m1022s1d0s1d1s4dNULLo6 + {9.1,10.1} | a26m1022s1d0s1d1s4dNULLo6 + {10.1,11.1} | a26m1022s1d0s1d1s4dNULLo6 + {1.1,2.1} | a26m1022s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; + x21 | filtervalue +-----+------------- + | a26o8 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; + x21 | filtervalue +-------------+------------- + {2.1,3.1} | a26o9 + {4.1,5.1} | a26o9 + {5.1,6.1} | a26o9 + {6.1,7.1} | a26o9 + {7.1,8.1} | a26o9 + {8.1,9.1} | a26o9 + {9.1,10.1} | a26o9 + {10.1,11.1} | a26o9 + {1.1,2.1} | a26o9 +(9 rows) + +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a26m1022s3d1.1s3d2.1o5a26m1022s1d5s1d6o5l1 +(1 row) + +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + x21 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {2.1,3.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {4.1,5.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {5.1,6.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {6.1,7.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {7.1,8.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {8.1,9.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {9.1,10.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 + {10.1,11.1} | a26m1022s1d4s1d5o6a26m1022s1d5s1d6o6l0 +(9 rows) + +-- bytea array +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+---------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+--------------------------------------------------------------- + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; + x22 | filtervalue +-----+------------- + | a27o8 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; + x22 | filtervalue +-------------------------------+------------- + {"\\x78343242","\\x78343342"} | a27o9 + {"\\x78343342","\\x78343442"} | a27o9 + {"\\x78343542","\\x78343642"} | a27o9 + {"\\x78343642","\\x78343742"} | a27o9 + {"\\x78343742","\\x78343842"} | a27o9 + {"\\x78343842","\\x78343942"} | a27o9 + {"\\x78343942","\\x78346142"} | a27o9 + {"\\x78346142","\\x78346242"} | a27o9 + {"\\x78343142","\\x78343242"} | a27o9 +(9 rows) + +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+-------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s10d\x78343142s10d\x78343242o5a27m1001s12d\x736461735ao5l1 +(1 row) + +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); + x22 | filtervalue +-------------------------------+------------------------------------------------------------------------------------------- + {"\\x78343142","\\x78343242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343242","\\x78343342"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343342","\\x78343442"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343542","\\x78343642"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343642","\\x78343742"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343742","\\x78343842"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343842","\\x78343942"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78343942","\\x78346142"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 + {"\\x78346142","\\x78346242"} | a27m1001s24d\x5a677265656e706c756d5as12d\x736461735as4dNULLo6a27m1001s12d\x736461735ao6l0 +(9 rows) + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; + x23 | filtervalue +---------+---------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; + x23 | filtervalue +---------+----------------------------- + {BB,BB} | a28m1014s2dABs2dABs4dNULLo6 + {CC,CC} | a28m1014s2dABs2dABs4dNULLo6 + {DD,DD} | a28m1014s2dABs2dABs4dNULLo6 + {FF,FF} | a28m1014s2dABs2dABs4dNULLo6 + {GG,GG} | a28m1014s2dABs2dABs4dNULLo6 + {HH,HH} | a28m1014s2dABs2dABs4dNULLo6 + {II,II} | a28m1014s2dABs2dABs4dNULLo6 + {JJ,JJ} | a28m1014s2dABs2dABs4dNULLo6 + {AA,AA} | a28m1014s2dABs2dABs4dNULLo6 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; + x23 | filtervalue +-----+------------- + | a28o8 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; + x23 | filtervalue +---------+------------- + {BB,BB} | a28o9 + {CC,CC} | a28o9 + {DD,DD} | a28o9 + {FF,FF} | a28o9 + {GG,GG} | a28o9 + {HH,HH} | a28o9 + {II,II} | a28o9 + {JJ,JJ} | a28o9 + {AA,AA} | a28o9 +(9 rows) + +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dAAs2dAAo5a28m1014s2dAAs2dABs4dNULLo5l1 +(1 row) + +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + x23 | filtervalue +---------+--------------------------------------------------- + {AA,AA} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {BB,BB} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {CC,CC} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {DD,DD} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {FF,FF} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {GG,GG} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {HH,HH} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {II,II} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 + {JJ,JJ} | a28m1014s2dA s2dA o6a28m1014s2dA s2dA s4dNULLo6l0 +(9 rows) + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------- + {AA,66} | a29m1015s2dAAs2d66o5 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; + x24 | filtervalue +---------+---------------------------- + {BB,67} | a29m1015s2dBBs1dCs4dNULLo6 + {CC,68} | a29m1015s2dBBs1dCs4dNULLo6 + {DD,69} | a29m1015s2dBBs1dCs4dNULLo6 + {EE,70} | a29m1015s2dBBs1dCs4dNULLo6 + {GG,72} | a29m1015s2dBBs1dCs4dNULLo6 + {HH,73} | a29m1015s2dBBs1dCs4dNULLo6 + {II,74} | a29m1015s2dBBs1dCs4dNULLo6 + {JJ,75} | a29m1015s2dBBs1dCs4dNULLo6 + {AA,66} | a29m1015s2dBBs1dCs4dNULLo6 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; + x24 | filtervalue +-----+------------- + | a29o8 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; + x24 | filtervalue +---------+------------- + {BB,67} | a29o9 + {CC,68} | a29o9 + {DD,69} | a29o9 + {EE,70} | a29o9 + {GG,72} | a29o9 + {HH,73} | a29o9 + {II,74} | a29o9 + {JJ,75} | a29o9 + {AA,66} | a29o9 +(9 rows) + +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); + x24 | filtervalue +---------+-------------------------------------------------- + {AA,66} | a29m1015s2dAAs2d66o5a29m1015s2dBBs1dBs4dNULLo5l1 +(1 row) + +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + x24 | filtervalue +---------+----------------------------------------------- + {AA,66} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {BB,67} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {CC,68} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {DD,69} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {EE,70} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {GG,72} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {HH,73} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {II,74} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 + {JJ,75} | a29m1015s1dAs1dAo6a29m1015s1dAs1dAs4dNULLo6l0 +(9 rows) + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+---------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; + x25 | filtervalue +-------------------------+----------------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo6 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; + x25 | filtervalue +-----+------------- + | a30o8 +(1 row) + +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; + x25 | filtervalue +-------------------------+------------- + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 + {01-01-2023,01-02-2023} | a30o9 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-02-2023o5a30m1182s10d01-01-2023s10d01-02-2023s4dNULLo5l1 +(9 rows) + +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + x25 | filtervalue +-------------------------+--------------------------------------------------------------------------------------- + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 + {01-01-2023,01-02-2023} | a30m1182s10d01-01-2023s10d01-03-2023s4dNULLo6a30m1182s10d01-01-2023s10d01-03-2023o6l0 +(9 rows) + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60d40facb8a5s36d93d8f9c0-c315-447b-8690-60c40facb8a5o6 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; + x26 | filtervalue +-----+------------- + | a31o8 +(1 row) + +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; + x26 | filtervalue +-----------------------------------------------------------------------------+------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31o9 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36da56bc0c8-2128-4269-9ce5-cd9c102227b0o5a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo5l1 +(9 rows) + +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + x26 | filtervalue +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 + {93d8f9c0-c314-447b-8690-60c40facb8a5,a56bc0c8-2128-4269-9ce5-cd9c102227b0} | a31m2951s36d93d8f9c0-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6a31m2951s36d93d8f9c1-c314-447b-8690-60c40facb8a5s36d93d8f9c0-c314-447b-8690-60c40facb8a5s4dNULLo6l0 +(9 rows) + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; + x27 | filtervalue +-----------+------------------------ + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; + x27 | filtervalue +-------------+--------------------------- + {2.1,3.1} | a32m1231s1d0s1d1s4dNULLo6 + {4.1,5.1} | a32m1231s1d0s1d1s4dNULLo6 + {5.1,6.1} | a32m1231s1d0s1d1s4dNULLo6 + {6.1,7.1} | a32m1231s1d0s1d1s4dNULLo6 + {7.1,8.1} | a32m1231s1d0s1d1s4dNULLo6 + {8.1,9.1} | a32m1231s1d0s1d1s4dNULLo6 + {9.1,10.1} | a32m1231s1d0s1d1s4dNULLo6 + {10.1,11.1} | a32m1231s1d0s1d1s4dNULLo6 + {1.1,2.1} | a32m1231s1d0s1d1s4dNULLo6 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; + x27 | filtervalue +-----+------------- + | a32o8 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; + x27 | filtervalue +-------------+------------- + {2.1,3.1} | a32o9 + {4.1,5.1} | a32o9 + {5.1,6.1} | a32o9 + {6.1,7.1} | a32o9 + {7.1,8.1} | a32o9 + {8.1,9.1} | a32o9 + {9.1,10.1} | a32o9 + {10.1,11.1} | a32o9 + {1.1,2.1} | a32o9 +(9 rows) + +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-----------+-------------------------------------------- + {1.1,2.1} | a32m1231s3d1.1s3d2.1o5a32m1231s1d5s1d6o5l1 +(1 row) + +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + x27 | filtervalue +-------------+---------------------------------------- + {1.1,2.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {2.1,3.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {4.1,5.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {5.1,6.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {6.1,7.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {7.1,8.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {8.1,9.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {9.1,10.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 + {10.1,11.1} | a32m1231s1d4s1d5o6a32m1231s1d5s1d6o6l0 +(9 rows) + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; + x28 | filtervalue +---------------------+---------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; + x28 | filtervalue +---------------------+----------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00s4dNULLo6 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; + x28 | filtervalue +-----+------------- + | a33o8 +(1 row) + +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; + x28 | filtervalue +---------------------+------------- + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 + {12:00:00,13:00:00} | a33o9 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); + x28 | filtervalue +---------------------+--------------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 + {12:00:00,13:00:00} | a33m1183s8d12:00:00s8d13:00:00o5a33m1183s8d12:00:00s8d13:00:00s4dNULLo5l1 +(9 rows) + +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + x28 | filtervalue +---------------------+-------------------------------------------------------------------- + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 + {12:00:00,13:00:00} | a33m1183s8d12:00:02s8d13:00:00o6a33m1183s8d12:00:00s8d13:04:00o6l0 +(9 rows) + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; + x29 | filtervalue +---------------------------------------------------------+-------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; + x29 | filtervalue +---------------------------------------------------------+--------------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo6 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; + x29 | filtervalue +-----+------------- + | a34o8 +(1 row) + +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; + x29 | filtervalue +---------------------------------------------------------+------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34o9 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); + x29 | filtervalue +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023o5a34m1115s24dSun Jan 01 12:00:00 2023s24dMon Jan 02 12:00:00 2023s4dNULLo5l1 +(9 rows) + +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + x29 | filtervalue +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------- + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 + {"Sun Jan 01 12:00:00 2023","Mon Jan 02 12:00:00 2023"} | a34m1115s24dTue Jan 03 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6a34m1115s24dMon Jan 02 12:00:00 2023s24dMon Jan 02 12:00:00 2023o6l0 +(9 rows) + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; + x31 | filtervalue +--------------------------+----------------------------------- + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; + x31 | filtervalue +--------------------------+------------------------------------------ + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; + x31 | filtervalue +-----+------------- + | a36o8 +(1 row) + +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; + x31 | filtervalue +--------------------------+------------- + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 + {"@ 1 hour","@ 2 hours"} | a36o9 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); + x31 | filtervalue +--------------------------+----------------------------------------------------------------------------- + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourso5a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo5l1 +(9 rows) + +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + x31 | filtervalue +--------------------------+-------------------------------------------------------------------------------- + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 + {"@ 1 hour","@ 2 hours"} | a36m1187s8d@ 1 hours9d@ 2 hourss4dNULLo6a36m1187s10d@ 12 hourss9d@ 2 hourso6l0 +(9 rows) + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; + x32 | filtervalue +-----+------------- + | a37o8 +(1 row) + +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + x32 | filtervalue +-----------------------------------------------+------------- + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 + {"{\"key\":\"value\"}","{\"key\":\"value\"}"} | a37o9 +(9 rows) + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; + x33 | filtervalue +----------------+--------------------- + {"{\"a\": 0}"} | a38m3807s8d{a: 0}o5 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; + x33 | filtervalue +----------------+---------------------------- + {"{\"a\": 1}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}s4dNULLo6 + {"{\"a\": 0}"} | a38m3807s8d{a: 2}s4dNULLo6 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; + x33 | filtervalue +-----+------------- + | a38o8 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; + x33 | filtervalue +----------------+------------- + {"{\"a\": 1}"} | a38o9 + {"{\"a\": 3}"} | a38o9 + {"{\"a\": 4}"} | a38o9 + {"{\"a\": 5}"} | a38o9 + {"{\"a\": 6}"} | a38o9 + {"{\"a\": 7}"} | a38o9 + {"{\"a\": 8}"} | a38o9 + {"{\"a\": 9}"} | a38o9 + {"{\"a\": 0}"} | a38o9 +(9 rows) + +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 0}"} | a38m3807s8d{a: 2}o5a38m3807s8d{a: 0}o5l1 +(1 row) + +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); + x33 | filtervalue +----------------+------------------------------------------ + {"{\"a\": 1}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 3}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 4}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 5}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 6}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 7}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 8}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 + {"{\"a\": 9}"} | a38m3807s8d{a: 2}o6a38m3807s8d{a: 0}o6l0 +(8 rows) + diff --git a/regression/sql/FDW_FilterPushDownTest.sql b/regression/sql/FDW_FilterPushDownTest.sql index 7135658c25..99ac3db3b3 100644 --- a/regression/sql/FDW_FilterPushDownTest.sql +++ b/regression/sql/FDW_FilterPushDownTest.sql @@ -17,200 +17,240 @@ CREATE USER MAPPING FOR CURRENT_USER SERVER pxf_filter_push_down_server; DROP FOREIGN TABLE IF EXISTS test_filter CASCADE; -CREATE FOREIGN TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE FOREIGN TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) SERVER pxf_filter_push_down_server OPTIONS (resource 'dummy_path', format 'filter', delimiter ','); -- control - no predicates -SELECT * FROM test_filter; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; SET optimizer = off; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; SET optimizer = on; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; ----------------------------------------------------- ------ Check that Filter Push Down is disabled ------ @@ -223,10 +263,10 @@ ALTER SERVER pxf_filter_push_down_server OPTIONS (ADD disable_ppd 'true'); SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; -- Drop the disable_ppd option to re-enable predicate push-down for the server @@ -239,15 +279,434 @@ ALTER SERVER pxf_filter_push_down_server DROP FOREIGN TABLE IF EXISTS test_filter CASCADE; -CREATE FOREIGN TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE FOREIGN TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) SERVER pxf_filter_push_down_server OPTIONS (resource 'dummy_path', format 'filter', delimiter E'\x01'); SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; + +-- start_ignore +{{ CLEAN_UP }}-- clean up resources +{{ CLEAN_UP }} DROP FOREIGN TABLE IF EXISTS test_filter CASCADE; +-- end_ignore + +-- Test newly supported types +CREATE FOREIGN TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) + SERVER pxf_filter_push_down_server + OPTIONS (resource 'dummy_path', format 'filter', delimiter ','); + +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + +-- bytea +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; +--start_ignore +reset bytea_output; +--end_ignore + +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + +-- bytea array +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); +--start_ignore +reset bytea_output; +--end_ignore + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); -- start_ignore {{ CLEAN_UP }}-- clean up resources diff --git a/regression/sql/FilterPushDownTest.sql b/regression/sql/FilterPushDownTest.sql index 4697ef9f39..38cb9685b9 100644 --- a/regression/sql/FilterPushDownTest.sql +++ b/regression/sql/FilterPushDownTest.sql @@ -1,4 +1,23 @@ - +-- start_matchsubs +-- +-- # filter values that are equivalent but have different operand order +-- +-- m/a0c25s1dBo5a1o8l0/ +-- s/a0c25s1dBo5a1o8l0/a1o8a0c25s1dBo5l0/ +-- +-- m/a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0/ +-- s/a0c25s1dCo5a1c23s1d2o5a1c23s2d10o5l1l0/a1c23s1d2o5a1c23s2d10o5l1a0c25s1dCo5l0/ +-- +-- m/a2c16s4dtrueo0l2a1c23s1d5o1l0/ +-- s/a2c16s4dtrueo0l2a1c23s1d5o1l0/a1c23s1d5o1a2c16s4dtrueo0l2l0/ +-- +-- m/a0c25s1dJo5a1c23s1d9o5a2c16s4dtrueo0l2a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0/ +-- s/a0c25s1dJo5a1c23s1d9o5a2c16s4dtrueo0l2a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0/a2c16s4dtrueo0l2a0c25s1dJo5a1c23s1d9o5a3c1700s4d9.91o5a4c1042s2dJJo5a5c25s2dJJo5l0l0l0l0l0/ +-- +-- m/o8l2/ +-- s/o8l2/o9/ +-- +-- end_matchsubs ----------------------------------------------------- ------ Check that Filter Push Down is working ------- ----------------------------------------------------- @@ -8,7 +27,47 @@ DROP EXTERNAL TABLE IF EXISTS test_filter CASCADE; -CREATE EXTERNAL TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE EXTERNAL TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) LOCATION (E'pxf://dummy_path?PROFILE=system:filter') FORMAT 'CSV'; @@ -18,195 +77,195 @@ CREATE EXTERNAL TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, SET gp_external_enable_filter_pushdown = true; -- control - no predicates -SELECT * FROM test_filter; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter; SET optimizer = off; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; SET optimizer = on; -- test logical predicates -SELECT * FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'B' AND a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' AND (a1 = 2 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false ORDER BY t0, a1; SELECT t0, a1, filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE a1 < 5 AND b2 = false ORDER BY t0, a1; SELECT round(sqrt(a1)::numeric,5), filtervalue FROM test_filter WHERE b2 = false ORDER BY t0; -SELECT * FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false AND (a1 = 3 OR a1 = 10) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE b2 = false OR (a1 >= 0 AND a1 <= 2) ORDER BY t0, a1; -- test text predicates -SELECT * FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'C ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 < 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 > 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 >= 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 <> 'C' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT LIKE 'C%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT IN ('C','D') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 NOT BETWEEN 'B' AND 'D' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 IS NOT NULL ORDER BY t0, a1; -- test integer predicates -SELECT * FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 = 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 < 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 > 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 >= 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 <> 2 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT IN (2,3) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 NOT BETWEEN 2 AND 4 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE a1 IS NOT NULL ORDER BY t0, a1; -- test numeric predicates -SELECT * FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 = 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 < 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 > 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 >= 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 <> 1.11 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT IN (1.11,2.21) ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 NOT BETWEEN 1.11 AND 4.41 ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE c3 IS NOT NULL ORDER BY t0, a1; -- test char predicates -SELECT * FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE d4 IS NOT NULL ORDER BY t0, a1; -- test varchar predicates -SELECT * FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; -SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 = 'BB ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 < 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 > 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 >= 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 <> 'BB' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NULL ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; ----------------------------------------------------- ------ Check that Filter Push Down is disabled ------ @@ -218,27 +277,446 @@ SELECT * FROM test_filter WHERE e5 IS NOT NULL ORDER BY t0, a1; SET gp_external_enable_filter_pushdown = off; SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; ----------------------------------------------------------------------- ------ Check that Filter Push Down is working with HEX delimiter ------ ----------------------------------------------------------------------- DROP EXTERNAL TABLE IF EXISTS test_filter CASCADE; -CREATE EXTERNAL TABLE test_filter (t0 text, a1 integer, b2 boolean, c3 numeric, d4 char(2), e5 varchar(2), filterValue text) +CREATE EXTERNAL TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) LOCATION (E'pxf://dummy_path?PROFILE=system:filter') FORMAT 'CSV' (DELIMITER E'\x01'); SET gp_external_enable_filter_pushdown = true; SET optimizer = off; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; SET optimizer = on; -SELECT * FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; +SELECT t0, a1, b2, c3, d4, e5, filterValue FROM test_filter WHERE t0 = 'J' AND a1 = 9 AND b2 = false AND c3 = 9.91 AND d4 = 'JJ' AND e5 = 'JJ' ORDER BY t0, a1; + +-- start_ignore +{{ CLEAN_UP }}-- clean up used tables +{{ CLEAN_UP }}DROP EXTERNAL TABLE IF EXISTS test_filter CASCADE; +-- end_ignore + +-- Test newly supported types +CREATE EXTERNAL TABLE test_filter ( + t0 text, + a1 integer, + b2 boolean, + c3 numeric, + d4 char(2), + e5 varchar(2), + x1 bpchar(2), + x2 smallint, + x3 bigint, + x4 real, + x5 float8, + x6 bytea, + x7 date, + x8 time, + x9 timestamp, + x10 timestamp with time zone, + x11 interval, + x12 uuid, + x13 json, + x14 jsonb, + x15 int2[], + x16 int4[], + x17 int8[], + x18 bool[], + x19 text[], + x20 float4[], + x21 float8[], + x22 bytea[], + x23 bpchar[], + x24 varchar(2)[], + x25 date[], + x26 uuid[], + x27 numeric[], + x28 time[], + x29 timestamp[], + x30 timestamp with time zone[], + x31 interval[], + x32 json[], + x33 jsonb[], + filterValue text) + LOCATION (E'pxf://dummy_path?PROFILE=system:filter') + FORMAT 'CSV'; + +-- bpchar +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 = 'BB ' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 < 'BC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 > 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 >= 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 <> 'BB' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT LIKE 'B%' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT IN ('BB','CC') ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 NOT BETWEEN 'AA' AND 'CC' ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NULL ORDER BY t0, a1; +SELECT x1, filterValue FROM test_filter WHERE x1 IS NOT NULL ORDER BY t0, a1; + +-- smallint +SELECT x2, filterValue FROM test_filter WHERE x2 = 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 < 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 > 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 >= 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 <> 2::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IN (2::int,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT IN (2::int2,3::int2) ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 NOT BETWEEN 2::int2 AND 4::int2 ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NULL ORDER BY t0, a1; +SELECT x2, filterValue FROM test_filter WHERE x2 IS NOT NULL ORDER BY t0, a1; + +-- bigint +SELECT x3, filterValue FROM test_filter WHERE x3 = 1::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 < 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 > 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 >= 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 <> 2::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT IN (2::int8,3::int8) ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 NOT BETWEEN 2::int8 AND 4::int8 ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NULL ORDER BY t0, a1; +SELECT x3, filterValue FROM test_filter WHERE x3 IS NOT NULL ORDER BY t0, a1; + +-- real +SELECT x4, filterValue FROM test_filter WHERE x4 = 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 < 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 > 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 >= 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 <> 1.11::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IN (1.11::real,2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT IN (1.11::real, 2.21::real) ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 NOT BETWEEN 1.11::real AND 4.41::real ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NULL ORDER BY t0, a1; +SELECT x4, filterValue FROM test_filter WHERE x4 IS NOT NULL ORDER BY t0, a1; + +-- float8 +SELECT x5, filterValue FROM test_filter WHERE x5 = 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 < 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 > 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 >= 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 <> 1.11::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT IN (1.11::float8, 2.21::float8) ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 NOT BETWEEN 1.11::float8 AND 4.41::float8 ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NULL ORDER BY t0, a1; +SELECT x5, filterValue FROM test_filter WHERE x5 IS NOT NULL ORDER BY t0, a1; + +-- bytea +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x6, filterValue FROM test_filter WHERE x6 = '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 < '\132greenplux\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 > '\132greenplum'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 >= '\132greenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 <> '\132greeenplum\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 LIKE '\132gre%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT LIKE 'green%' ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IN ('\132greenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT IN ('\132grenplum\132'::bytea,'sdas\132'::bytea) ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 BETWEEN '\132greenplum\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 NOT BETWEEN '\132greenplup\132'::bytea AND 'sdas\132'::bytea ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NULL ORDER BY t0, a1; +SELECT x6, filterValue FROM test_filter WHERE x6 IS NOT NULL ORDER BY t0, a1; +--start_ignore +reset bytea_output; +--end_ignore + +-- date +SELECT x7, filterValue FROM test_filter WHERE x7 = '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 < '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 > '2023-01-11'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 >= '2023-01-12'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 <> '2023-01-15'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IN ('2023-01-12'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT IN ('2023-01-15'::date,'2023-01-15'::date) ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 BETWEEN '2023-01-11'::date AND '2023-01-19'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 NOT BETWEEN '2023-01-10'::date AND '2023-01-13'::date ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NULL ORDER BY t0, a1; +SELECT x7, filterValue FROM test_filter WHERE x7 IS NOT NULL ORDER BY t0, a1; + +-- time +SELECT x8, filterValue FROM test_filter WHERE x8 = '12:34:50'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 < '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 > '12:34:51'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 >= '12:34:52'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 <> '12:34:55'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IN ('12:34:52'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT IN ('12:34:55'::time,'12:34:55'::time) ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 NOT BETWEEN '12:34:51'::time AND '12:34:59'::time ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NULL ORDER BY t0, a1; +SELECT x8, filterValue FROM test_filter WHERE x8 IS NOT NULL ORDER BY t0, a1; + +-- timestamp +SELECT x9, filterValue FROM test_filter WHERE x9 = '2023-01-01 12:34:50'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 < '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 > '2023-01-01 12:34:51'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 >= '2023-01-01 12:34:52'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 <> '2023-01-01 12:34:55'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IN ('2023-01-01 12:34:52'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT IN ('2023-01-01 12:34:55'::timestamp,'2023-01-01 12:34:55'::timestamp) ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 NOT BETWEEN '2023-01-01 12:34:51'::timestamp AND '2023-01-01 12:34:59'::timestamp ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NULL ORDER BY t0, a1; +SELECT x9, filterValue FROM test_filter WHERE x9 IS NOT NULL ORDER BY t0, a1; + +-- interval +SELECT x11, filterValue FROM test_filter WHERE x11 = '1 hour 30 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 < '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <= '1 hour 36 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 > '1 hour 33 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 >= '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 <> '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT IN ('1 hour 30 minutes'::interval,'1 hour 33 minutes'::interval) ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 BETWEEN '1 hour 30 minutes'::interval AND '1 hour 35 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 NOT BETWEEN '1 hour 30 minutes'::interval AND '1 hour 31 minutes'::interval ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NULL ORDER BY t0, a1; +SELECT x11, filterValue FROM test_filter WHERE x11 IS NOT NULL ORDER BY t0, a1; + +-- uuid +SELECT x12, filterValue FROM test_filter WHERE x12 = '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 < '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <= '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 > '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 >= '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 <> '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IN ('93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid,'93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT IN ('93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ,'93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid) ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a4'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 NOT BETWEEN '93d8f9c0-c314-447b-8690-60c40facb8a0'::uuid AND '93d8f9c0-c314-447b-8690-60c40facb8a2'::uuid ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NULL ORDER BY t0, a1; +SELECT x12, filterValue FROM test_filter WHERE x12 IS NOT NULL ORDER BY t0, a1; + +-- json +SELECT x13, filterValue FROM test_filter WHERE x13 IS NULL ORDER BY t0, a1; +SELECT x13, filterValue FROM test_filter WHERE x13 IS NOT NULL ORDER BY t0, a1; + +-- jsonb +SELECT x14, filterValue FROM test_filter WHERE x14 = '{"a":0}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 < '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <= '{"a":3}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 > '{"a":1}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 >= '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 <> '{"a":5}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IN ('{"a":6}' ::jsonb,'{"a":1}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT IN ('{"a":8}' ::jsonb,'{"a":4}' ::jsonb) ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 NOT BETWEEN '{"a":1}' ::jsonb AND '{"a":4}' ::jsonb ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NULL ORDER BY t0, a1; +SELECT x14, filterValue FROM test_filter WHERE x14 IS NOT NULL ORDER BY t0, a1; + +-- int2 array +SELECT x15, filterValue FROM test_filter WHERE x15 = array[0::int2, 1::int2] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 <> array[0::int2, 1::int2, null] ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IS NOT NULL ORDER BY t0, a1; +SELECT x15, filterValue FROM test_filter WHERE x15 IN (array[1::int2, 2::int2], array[5::int2, 6::int2]); +SELECT x15, filterValue FROM test_filter WHERE x15 NOT IN (array[4::int2, 5::int2], array[5::int2, 6::int2]); + +-- int4 array +SELECT x16, filterValue FROM test_filter WHERE x16 = array[2::int4, 3::int4] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 <> array[0::int4, 1::int4, null] ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IS NOT NULL ORDER BY t0, a1; +SELECT x16, filterValue FROM test_filter WHERE x16 IN (array[2::int4, 3::int4], array[5::int4, 6::int4]); +SELECT x16, filterValue FROM test_filter WHERE x16 NOT IN (array[4::int4, 5::int4], array[5::int4, 6::int4]); + +--int8array +SELECT x17, filterValue FROM test_filter WHERE x17 = array[4::bigint, 5::bigint] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 <> array[5::bigint, 4::bigint, null] ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IS NOT NULL ORDER BY t0, a1; +SELECT x17, filterValue FROM test_filter WHERE x17 IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); +SELECT x17, filterValue FROM test_filter WHERE x17 NOT IN (array[4::bigint, 5::bigint], array[5::bigint, 6::bigint]); + +-- bool array +SELECT x18, filterValue FROM test_filter WHERE x18 = array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 <> array[true, false, null] ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IS NOT NULL ORDER BY t0, a1; +SELECT x18, filterValue FROM test_filter WHERE x18 IN (array[true, false, null], array[true]); +SELECT x18, filterValue FROM test_filter WHERE x18 NOT IN (array[true, false, null], array[true]); + +-- text array +SELECT x19, filterValue FROM test_filter WHERE x19 = array['B'::text, 'B'::text] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 <> array['A'::text, 'A'::text, null] ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IS NOT NULL ORDER BY t0, a1; +SELECT x19, filterValue FROM test_filter WHERE x19 IN (array['B'::text, 'B'::text], array['A'::text, 'A'::text, null]); +SELECT x19, filterValue FROM test_filter WHERE x19 NOT IN (array['A'::text, 'A'::text], array['A'::text, 'A'::text, null]); + +-- float4 array +SELECT x20, filterValue FROM test_filter WHERE x20 = array[1.1::float4, 2.1::float4] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 <> array[0::float4, 1::float4, null] ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IS NOT NULL ORDER BY t0, a1; +SELECT x20, filterValue FROM test_filter WHERE x20 IN (array[1.1::float4, 2.1::float4], array[5::float4, 6::float4]); +SELECT x20, filterValue FROM test_filter WHERE x20 NOT IN (array[4::float4, 5::float4], array[5::float4, 6::float4]); + +-- float8 array +SELECT x21, filterValue FROM test_filter WHERE x21 = array[1.1::float8, 2.1::float8] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 <> array[0::float8, 1::float8, null] ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IS NOT NULL ORDER BY t0, a1; +SELECT x21, filterValue FROM test_filter WHERE x21 IN (array[1.1::float8, 2.1::float8], array[5::float8, 6::float8]); +SELECT x21, filterValue FROM test_filter WHERE x21 NOT IN (array[4::float8, 5::float8], array[5::float8, 6::float8]); + +-- bytea array +--start_ignore +set bytea_output = 'hex'; +--end_ignore +SELECT x22, filterValue FROM test_filter WHERE x22 = array['\x78343142'::bytea,'\x78343242'::bytea] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 <> array['\132greenplum\132'::bytea,'sdas\132'::bytea, null] ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IS NOT NULL ORDER BY t0, a1; +SELECT x22, filterValue FROM test_filter WHERE x22 IN (array['\x78343142'::bytea,'\x78343242'::bytea], array['sdas\132'::bytea]); +SELECT x22, filterValue FROM test_filter WHERE x22 NOT IN (array['\132greenplum\132'::bytea,'sdas\132'::bytea, null], array['sdas\132'::bytea]); +--start_ignore +reset bytea_output; +--end_ignore + +-- bpchar array +SELECT x23, filterValue FROM test_filter WHERE x23 = array['AA'::bpchar(2), 'AA'::bpchar(2)] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 <> array['AB'::bpchar(2), 'AB'::bpchar(2), null] ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IS NOT NULL ORDER BY t0, a1; +SELECT x23, filterValue FROM test_filter WHERE x23 IN (array['AA'::bpchar(2), 'AA'::bpchar(2)], array['AA'::bpchar(2), 'AB'::bpchar(2), null]); +SELECT x23, filterValue FROM test_filter WHERE x23 NOT IN (array['A'::bpchar(2), 'A'::bpchar(2)], array['A'::bpchar(2), 'A'::bpchar(2), null]); + +-- varchar array +SELECT x24, filterValue FROM test_filter WHERE x24 = array['AA'::varchar(2), '66'::varchar(2)] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 <> array['BB'::varchar(2), 'C'::varchar(2), null] ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IS NOT NULL ORDER BY t0, a1; +SELECT x24, filterValue FROM test_filter WHERE x24 IN (array['AA'::varchar(2), '66'::varchar(2)], array['BB'::varchar(2), 'B'::varchar(2), null]); +SELECT x24, filterValue FROM test_filter WHERE x24 NOT IN (array['A'::varchar(2), 'A'::varchar(2)], array['A'::varchar(2), 'A'::varchar(2), null]); + +-- date array +SELECT x25, filterValue FROM test_filter WHERE x25 = array['2023-01-01' ::date, '2023-01-02' ::date] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 <> array['2023-01-01' ::date, '2023-01-02' ::date, null] ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IS NOT NULL ORDER BY t0, a1; +SELECT x25, filterValue FROM test_filter WHERE x25 IN (array['2023-01-01' ::date, '2023-01-02' ::date], array['2023-01-01' ::date, '2023-01-02' ::date, null]); +SELECT x25, filterValue FROM test_filter WHERE x25 NOT IN (array['2023-01-01' ::date, '2023-01-03' ::date, null], array['2023-01-01' ::date, '2023-01-03' ::date]); + +-- uuid array +SELECT x26, filterValue FROM test_filter WHERE x26 = array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 <> array['93d8f9c0-c314-447b-8690-60d40facb8a5'::uuid, '93d8f9c0-c315-447b-8690-60c40facb8a5'::uuid] ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IS NOT NULL ORDER BY t0, a1; +SELECT x26, filterValue FROM test_filter WHERE x26 IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, 'a56bc0c8-2128-4269-9ce5-cd9c102227b0'::uuid], array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); +SELECT x26, filterValue FROM test_filter WHERE x26 NOT IN (array['93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null], array['93d8f9c1-c314-447b-8690-60c40facb8a5'::uuid, '93d8f9c0-c314-447b-8690-60c40facb8a5'::uuid, null]); + +-- numeric array +SELECT x27, filterValue FROM test_filter WHERE x27 = array[1.1::numeric, 2.1::numeric] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 <> array[0::numeric, 1::numeric, null] ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IS NOT NULL ORDER BY t0, a1; +SELECT x27, filterValue FROM test_filter WHERE x27 IN (array[1.1::numeric, 2.1::numeric], array[5::numeric, 6::numeric]); +SELECT x27, filterValue FROM test_filter WHERE x27 NOT IN (array[4::numeric, 5::numeric], array[5::numeric, 6::numeric]); + +-- time array +SELECT x28, filterValue FROM test_filter WHERE x28 = array['12:00:00' ::time, '13:00:00' ::time] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 <> array['12:00:00' ::time, '13:00:00' ::time, null] ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IS NOT NULL ORDER BY t0, a1; +SELECT x28, filterValue FROM test_filter WHERE x28 IN (array['12:00:00' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:00:00' ::time, null]); +SELECT x28, filterValue FROM test_filter WHERE x28 NOT IN (array['12:00:02' ::time, '13:00:00' ::time], array['12:00:00' ::time, '13:04:00' ::time]); + +-- timestamp array +SELECT x29, filterValue FROM test_filter WHERE x29 = array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 <> array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null] ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IS NOT NULL ORDER BY t0, a1; +SELECT x29, filterValue FROM test_filter WHERE x29 IN (array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-01 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp, null]); +SELECT x29, filterValue FROM test_filter WHERE x29 NOT IN (array['2023-01-03 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp], array['2023-01-02 12:00:00' ::timestamp, '2023-01-02 12:00:00' ::timestamp]); + +-- interval array +SELECT x31, filterValue FROM test_filter WHERE x31 = array['1 hour' ::interval, '2 hours' ::interval] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 <> array['1 hour' ::interval, '2 hours' ::interval, null] ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IS NOT NULL ORDER BY t0, a1; +SELECT x31, filterValue FROM test_filter WHERE x31 IN (array['1 hour' ::interval, '2 hours' ::interval], array['1 hour' ::interval, '2 hours' ::interval, null]); +SELECT x31, filterValue FROM test_filter WHERE x31 NOT IN (array['1 hour' ::interval, '2 hours' ::interval, null], array['12 hours' ::interval, '2 hours' ::interval]); + +-- json array +SELECT x32, filterValue FROM test_filter WHERE x32 IS NULL ORDER BY t0, a1; +SELECT x32, filterValue FROM test_filter WHERE x32 IS NOT NULL ORDER BY t0, a1; + +-- jsonb array +SELECT x33, filterValue FROM test_filter WHERE x33 = array['{"a":0}'::jsonb] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 <> array['{"a":2}'::jsonb, null] ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IS NOT NULL ORDER BY t0, a1; +SELECT x33, filterValue FROM test_filter WHERE x33 IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); +SELECT x33, filterValue FROM test_filter WHERE x33 NOT IN (array['{"a":2}'::jsonb], array['{"a":0}'::jsonb]); -- start_ignore {{ CLEAN_UP }}-- clean up used tables diff --git a/server/build.gradle b/server/build.gradle index c57cc4c76c..29c1a69732 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -135,6 +135,8 @@ configure(javaProjects) { // revert once springboot provided postgresql is upgraded to bundle postgresql:42.7.2+ dependency("org.postgresql:postgresql:42.7.2") + dependency("org.mongodb:bson:5.1.1") + dependency("org.simplify4u:slf4j-mock:2.3.0") dependency("org.threeten:threeten-extra:1.5.0") dependency("org.tukaani:xz:1.8") @@ -190,12 +192,12 @@ configure(javaProjects) { } // Parquet dependencies - dependency("org.apache.parquet:parquet-format:2.7.0") dependencySet(group:"org.apache.parquet", version:"${parquetVersion}") { entry("parquet-column") entry("parquet-common") entry("parquet-encoding") entry("parquet-generator") + entry("parquet-format-structures") entry("parquet-hadoop") entry("parquet-jackson") entry("parquet-pig") diff --git a/server/gradle.properties b/server/gradle.properties index 772b69c430..0761c45dc3 100644 --- a/server/gradle.properties +++ b/server/gradle.properties @@ -15,15 +15,15 @@ # specific language governing permissions and limitations # under the License. -version=0.0.0-SNAPSHOT -apiVersion=0 +version=6.10.1 +apiVersion=16 license=ASL 2.0 hadoopVersion=2.10.2 hiveVersion=2.3.8 hiveStorageApiVersion=2.7.2 hbaseVersion=1.3.2 junitVersion=4.11 -parquetVersion=1.11.1 +parquetVersion=1.13.1 awsJavaSdk=1.12.261 springBootVersion=2.7.18 org.gradle.daemon=true diff --git a/server/pxf-api/src/main/java/org/greenplum/pxf/api/GreenplumDateTime.java b/server/pxf-api/src/main/java/org/greenplum/pxf/api/GreenplumDateTime.java index 950efab5bb..25a6eaed0c 100644 --- a/server/pxf-api/src/main/java/org/greenplum/pxf/api/GreenplumDateTime.java +++ b/server/pxf-api/src/main/java/org/greenplum/pxf/api/GreenplumDateTime.java @@ -8,6 +8,8 @@ * Provides formatters for Greenplum DateTime */ public class GreenplumDateTime { + public static final int NANOS_IN_MICROS = 1000; + public static final int NANOS_IN_MILLIS = NANOS_IN_MICROS * 1000; public static final String DATE_FORMATTER_BASE_PATTERN = "yyyy-MM-dd"; @@ -28,8 +30,19 @@ public class GreenplumDateTime { public static final DateTimeFormatter DATETIME_FORMATTER = new DateTimeFormatterBuilder() .appendPattern(DATETIME_FORMATTER_BASE_PATTERN) - // Parsing nanos in strict mode, the number of parsed digits must be between 0 and 6 (microsecond support) - .appendFraction(ChronoField.NANO_OF_SECOND, 0, 6, true) + // Parsing nanos in strict mode, the number of parsed digits must be between 0 and 9 (nanosecond support) + .appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true) + .toFormatter(); + + /** + * Supports times with the format HH:mm:ss and + * optional microsecond + */ + public static final DateTimeFormatter TIME_FORMATTER = + new DateTimeFormatterBuilder() + .appendPattern("HH:mm:ss") + // Parsing nanos in strict mode, the number of parsed digits must be between 0 and 9 (nanosecond support) + .appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true) .toFormatter(); /** diff --git a/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/FilterParser.java b/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/FilterParser.java index fe845d4d7a..21ed9b57ef 100644 --- a/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/FilterParser.java +++ b/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/FilterParser.java @@ -93,8 +93,13 @@ public class FilterParser { DataType.BOOLEAN, DataType.DATE, DataType.TIMESTAMP, + DataType.TIMESTAMP_WITH_TIME_ZONE, DataType.TIME, - DataType.BYTEA + DataType.BYTEA, + DataType.INTERVAL, + DataType.UUID, + DataType.JSON, + DataType.JSONB ); private static final Operator[] OPERATOR_ARRAY = new Operator[]{ diff --git a/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedDataTypePruner.java b/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedDataTypePruner.java index 8059e8be68..35762eaade 100644 --- a/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedDataTypePruner.java +++ b/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedDataTypePruner.java @@ -38,8 +38,8 @@ public Node visit(Node node, int level) { DataType datatype = columnDescriptor.getDataType(); if (!supportedDataTypes.contains(datatype)) { // prune the operator node if its operand is a column of unsupported type - LOG.debug("DataType oid={} for column=(index:{} name:{}) is not supported", - datatype.getOID(), columnDescriptor.columnIndex(), columnDescriptor.columnName()); + LOG.debug("DataType (name={} oid={}) for column=(index:{} name:{}) is not supported", + datatype.name(), datatype.getOID(), columnDescriptor.columnIndex(), columnDescriptor.columnName()); return null; } } diff --git a/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedOperatorPruner.java b/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedOperatorPruner.java index aa11334afa..a76dbda217 100644 --- a/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedOperatorPruner.java +++ b/server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/SupportedOperatorPruner.java @@ -1,5 +1,7 @@ package org.greenplum.pxf.api.filter; +import org.greenplum.pxf.api.io.DataType; + import java.util.EnumSet; /** diff --git a/server/pxf-api/src/main/java/org/greenplum/pxf/api/io/DataType.java b/server/pxf-api/src/main/java/org/greenplum/pxf/api/io/DataType.java index a2da546309..ac8e034925 100644 --- a/server/pxf-api/src/main/java/org/greenplum/pxf/api/io/DataType.java +++ b/server/pxf-api/src/main/java/org/greenplum/pxf/api/io/DataType.java @@ -47,10 +47,11 @@ public enum DataType { TIME(1083, true), TIMESTAMP(1114, true), TIMESTAMP_WITH_TIME_ZONE(1184, true), + INTERVAL(1186, false), NUMERIC(1700, false), UUID(2950, false), - JSON(114, false), - JSONB(3802, false), + JSON(114, true), + JSONB(3802, true), INT2ARRAY(1005), INT4ARRAY(1007), @@ -68,6 +69,7 @@ public enum DataType { TIMEARRAY(1183), TIMESTAMPARRAY(1115), TIMESTAMP_WITH_TIMEZONE_ARRAY(1185), + INTERVALARRAY(1187), JSONARRAY(199), JSONBARRAY(3807), @@ -99,6 +101,7 @@ public enum DataType { TIMEARRAY.typeElem = TIME; TIMESTAMPARRAY.typeElem = TIMESTAMP; TIMESTAMP_WITH_TIMEZONE_ARRAY.typeElem = TIMESTAMP_WITH_TIME_ZONE; + INTERVALARRAY.typeElem = INTERVAL; JSONARRAY.typeElem = JSON; JSONBARRAY.typeElem = JSONB; @@ -118,6 +121,7 @@ public enum DataType { TIME.typeArray = TIMEARRAY; TIMESTAMP.typeArray = TIMESTAMPARRAY; TIMESTAMP_WITH_TIME_ZONE.typeArray = TIMESTAMP_WITH_TIMEZONE_ARRAY; + INTERVAL.typeArray = INTERVALARRAY; JSON.typeArray = JSONARRAY; JSONB.typeArray = JSONBARRAY; diff --git a/server/pxf-api/src/test/java/org/greenplum/pxf/api/io/DataTypeTest.java b/server/pxf-api/src/test/java/org/greenplum/pxf/api/io/DataTypeTest.java index 6550f1651b..969978b1be 100644 --- a/server/pxf-api/src/test/java/org/greenplum/pxf/api/io/DataTypeTest.java +++ b/server/pxf-api/src/test/java/org/greenplum/pxf/api/io/DataTypeTest.java @@ -71,7 +71,8 @@ private boolean needsEscapingForElementsInArray(int oid) { return oid == DataType.BYTEAARRAY.getOID() || oid == DataType.TEXTARRAY.getOID() || oid == DataType.BPCHARARRAY.getOID() || oid == DataType.VARCHARARRAY.getOID() || oid == DataType.TIMEARRAY.getOID() || oid == DataType.TIMESTAMPARRAY.getOID() || - oid == DataType.TIMESTAMP_WITH_TIMEZONE_ARRAY.getOID(); + oid == DataType.TIMESTAMP_WITH_TIMEZONE_ARRAY.getOID() || oid == DataType.JSONARRAY.getOID() || + oid == DataType.JSONBARRAY.getOID(); } } diff --git a/server/pxf-diagnostic/src/main/java/org/greenplum/pxf/diagnostic/UserDataVerifyAccessor.java b/server/pxf-diagnostic/src/main/java/org/greenplum/pxf/diagnostic/UserDataVerifyAccessor.java index 48aa6da3cc..8274dbafbf 100644 --- a/server/pxf-diagnostic/src/main/java/org/greenplum/pxf/diagnostic/UserDataVerifyAccessor.java +++ b/server/pxf-diagnostic/src/main/java/org/greenplum/pxf/diagnostic/UserDataVerifyAccessor.java @@ -46,9 +46,42 @@ public OneRow readNextObject() { .add(counter == 1 ? NULL : String.valueOf(counter)) // integer .add(counter == 2 ? NULL : String.valueOf(counter % 2 == 0)) // boolean .add(counter == 3 ? NULL : String.format("%1$d.%1$d1", counter)) // numeric, decimal, real, double precision - .add(counter == 4 ? NULL : "" + textColumn + textColumn) // bpchar + .add(counter == 4 ? NULL : "" + textColumn + textColumn) // char .add(counter == 5 ? NULL : "" + textColumn + textColumn) // varchar - .add(filter) + .add(counter == 0 ? NULL : "" + textColumn + textColumn) // bpchar + .add(counter == 1 ? NULL : String.valueOf(counter)) // int2 + .add(counter == 2 ? NULL : String.valueOf(counter)) // int8 + .add(counter == 3 ? NULL : String.format("%1$d.%1$d1", counter)) // real + .add(counter == 4 ? NULL : String.format("%1$d.%1$d1", counter)) // float8 + .add(counter == 5 ? NULL : "\\x5a677265656e706c756d5a") // bytea + .add(counter == 0 ? NULL : "2023-01-1" + counter % 10) // date + .add(counter == 1 ? NULL : "12:34:5" + counter % 10) // time + .add(counter == 2 ? NULL : "2023-01-01 12:34:5" + counter % 10) // timestamp + .add(counter == 3 ? NULL : "2023-01-01 12:34:56 +00:0" + counter % 7) // TIMESTAMP_WITH_TIME_ZONE + .add(counter == 4 ? NULL : "1 hour 3" + counter + " minutes") // INTERVAL + .add(counter == 5 ? NULL : "93d8f9c0-c314-447b-8690-60c40facb8a" + counter % 10) // UUID + .add(counter == 0 ? NULL : "\"{\"\"a\"\":" + counter + "}\"") // JSON + .add(counter == 1 ? NULL : "\"{\"\"a\"\":" + counter + "}\"") // JSONB + .add(counter == 2 ? NULL : "\"{" + counter + "," + (counter + 1) + "}\"") // INT2ARRAY + .add(counter == 3 ? NULL : "\"{" + (counter + 2) + "," + (counter + 3) + "}\"") // INT4ARRAY + .add(counter == 4 ? NULL : "\"{" + (counter + 4) + "," + (counter + 5) + "}\"") // INT8ARRAY + .add(counter == 5 ? NULL : "\"{" + String.valueOf(counter % 2 == 0) + "," + String.valueOf(counter % 2 == 1) + "," + "null" + "}\"") // BOOLARRAY + .add(counter == 0 ? NULL : "\"{" + textColumn + "," + textColumn + "}\"") // TEXTARRAY + .add(counter == 1 ? NULL : "\"{" + (counter + 1.1f) + "," + (counter + 2.1f) + "}\"") // FLOAT4ARRAY + .add(counter == 2 ? NULL : "\"{" + (counter + 1.1) + "," + (counter + 2.1) + "}\"") // FLOAT8ARRAY + .add(counter == 3 ? NULL : "\"{\\x" + Integer.toHexString(textColumn) + "B," + "\\x" + Integer.toHexString(textColumn + 1) + "B}\"") // BYTEAARRAY + .add(counter == 4 ? NULL : "\"{" + textColumn + textColumn + "," + textColumn + textColumn + "}\"") // BPCHARARRAY + .add(counter == 5 ? NULL : "\"{" + textColumn + textColumn + "," + (textColumn + 1) + "}\"") // VARCHARARRAY + .add(counter == 0 ? NULL : "\"{2023-01-01,2023-01-02}\"") // DATEARRAY + .add(counter == 1 ? NULL : "\"{93d8f9c0-c314-447b-8690-60c40facb8a5, a56bc0c8-2128-4269-9ce5-cd9c102227b0}\"") // UUIDARRAY + .add(counter == 2 ? NULL : "\"{" + (counter + 1.1) + "," + (counter + 2.1) + "}\"") // NUMERICARRAY + .add(counter == 3 ? NULL : "\"{12:00:00,13:00:00}\"") // TIMEARRAY + .add(counter == 4 ? NULL : "\"{2023-01-01 12:00:00,2023-01-02 12:00:00}\"") // TIMESTAMPARRAY + .add(counter == 5 ? NULL : "\"{2023-01-01 12:00:00+00:00,2023-01-02 12:00:00+00:00}\"") // TIMESTAMP_WITH_TIMEZONE_ARRAY + .add(counter == 0 ? NULL : "\"{1 hour,2 hours}\"") // INTERVALARRAY + .add(counter == 1 ? NULL : "\"{\"\"{\\\"\"key\\\"\":\\\"\"value\\\"\"}\"\", \"\"{\\\"\"key\\\"\":\\\"\"value\\\"\"}\"\"}\"") // JSONARRAY + .add(counter == 2 ? NULL : "\"{\"\"{\\\"\"a\\\"\":" + counter + "}\"\"}\"") // JSONBARRAY + .add(filter) // Filter .toString(); String key = Integer.toString(counter); diff --git a/server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HBaseAccessor.java b/server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HBaseAccessor.java index 5eef76a69f..50fc744ae6 100644 --- a/server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HBaseAccessor.java +++ b/server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HBaseAccessor.java @@ -38,6 +38,7 @@ import org.greenplum.pxf.api.filter.SupportedOperatorPruner; import org.greenplum.pxf.api.filter.TreeTraverser; import org.greenplum.pxf.api.filter.TreeVisitor; +import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.api.model.Accessor; import org.greenplum.pxf.api.model.BasePlugin; import org.greenplum.pxf.api.model.RequestContext; @@ -45,6 +46,7 @@ import org.greenplum.pxf.plugins.hbase.utilities.HBaseTupleDescription; import org.greenplum.pxf.plugins.hbase.utilities.HBaseUtilities; +import javax.xml.crypto.Data; import java.io.IOException; import java.util.EnumSet; @@ -75,7 +77,16 @@ public class HBaseAccessor extends BasePlugin implements Accessor { Operator.OR ); - private static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS); + static final EnumSet SUPPORTED_DATA_TYPES = + EnumSet.of( + DataType.TEXT, + DataType.SMALLINT, + DataType.INTEGER, + DataType.BIGINT, + DataType.REAL, + DataType.FLOAT8 + ); + private static final TreeTraverser TRAVERSER = new TreeTraverser(); private static final String UNSUPPORTED_ERR_MESSAGE = "HBase accessor does not support write operation."; @@ -83,6 +94,7 @@ public class HBaseAccessor extends BasePlugin implements Accessor { private Connection connection; private Table table; private SplitBoundary split; + private TreeVisitor pruner; private Scan scanDetails; private ResultScanner currentScanner; private byte[] scanStartKey; @@ -120,6 +132,7 @@ public void afterPropertiesSet() { split = null; scanStartKey = HConstants.EMPTY_START_ROW; scanEndKey = HConstants.EMPTY_END_ROW; + pruner = new HbaseFilterPruner(tupleDescription, SUPPORTED_DATA_TYPES, SUPPORTED_OPERATORS); } /** @@ -307,7 +320,7 @@ private void addFilters() throws Exception { Node root = new FilterParser().parse(context.getFilterString()); // Prune the parsed tree with valid supported operators and then // traverse the tree with the hBaseFilterBuilder to produce a filter - TRAVERSER.traverse(root, PRUNER, hBaseFilterBuilder); + TRAVERSER.traverse(root, pruner, hBaseFilterBuilder); // Retrieve the built filter Filter filter = hBaseFilterBuilder.build(); diff --git a/server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HbaseFilterPruner.java b/server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HbaseFilterPruner.java new file mode 100644 index 0000000000..1d65401f07 --- /dev/null +++ b/server/pxf-hbase/src/main/java/org/greenplum/pxf/plugins/hbase/HbaseFilterPruner.java @@ -0,0 +1,47 @@ +package org.greenplum.pxf.plugins.hbase; + +import lombok.extern.slf4j.Slf4j; +import org.greenplum.pxf.api.filter.*; +import org.greenplum.pxf.api.io.DataType; +import org.greenplum.pxf.api.utilities.ColumnDescriptor; +import org.greenplum.pxf.plugins.hbase.utilities.HBaseTupleDescription; + +import java.util.EnumSet; +import java.util.List; + +@Slf4j +public class HbaseFilterPruner extends SupportedOperatorPruner { + private final EnumSet supportedTypes; + private final HBaseTupleDescription tupleDescription; + /** + * Constructor + * + * @param tupleDescription fields description + * @param supportedTypes the set of supported data types + * @param supportedOperators the set of supported operators + */ + public HbaseFilterPruner(HBaseTupleDescription tupleDescription, EnumSet supportedTypes, EnumSet supportedOperators) { + super(supportedOperators); + this.supportedTypes = supportedTypes; + this.tupleDescription = tupleDescription; + } + + @Override + public Node visit(Node node, int level) { + if (node instanceof OperatorNode) { + OperatorNode operatorNode = (OperatorNode) node; + Operator operator = operatorNode.getOperator(); + if (!operator.isLogical()) { + ColumnIndexOperandNode columnIndexOperand = operatorNode.getColumnIndexOperand(); + ColumnDescriptor columnDescriptor = tupleDescription.getColumn(columnIndexOperand.index()); + if (!supportedTypes.contains(columnDescriptor.getDataType())) { + log.debug("DataType (name={} oid={}) for column=(index:{} name:{}) is not supported", + columnDescriptor.getDataType().name(), columnDescriptor.getDataType().getOID(), + columnDescriptor.columnIndex(), columnDescriptor.columnName()); + return null; + } + } + } + return super.visit(node, level); + } +} diff --git a/server/pxf-hdfs/build.gradle b/server/pxf-hdfs/build.gradle index a90d6fc145..f230ebef19 100644 --- a/server/pxf-hdfs/build.gradle +++ b/server/pxf-hdfs/build.gradle @@ -37,7 +37,7 @@ dependencies { implementation("org.apache.htrace:htrace-core4") { transitive = false } implementation("org.apache.hadoop:hadoop-hdfs") { transitive = false } implementation("org.apache.hadoop:hadoop-hdfs-client") { transitive = false } - implementation("org.apache.parquet:parquet-format") { transitive = false } + implementation("org.apache.parquet:parquet-format-structures") { transitive = false } implementation("org.apache.parquet:parquet-column") { transitive = false } implementation("org.apache.parquet:parquet-common") { transitive = false } implementation("org.apache.parquet:parquet-encoding") { transitive = false } @@ -45,7 +45,8 @@ dependencies { implementation("org.apache.parquet:parquet-hadoop") { transitive = false } implementation("org.apache.parquet:parquet-jackson") { transitive = false } implementation("org.apache.hive:hive-storage-api") { transitive = false } // for parquet writing - + implementation("org.postgresql:postgresql") { transitive = false } // for Interval support + implementation("org.mongodb:bson") { transitive = false } // for bson support implementation("org.codehaus.jackson:jackson-core-asl") { transitive = false } implementation("org.codehaus.jackson:jackson-mapper-asl") { transitive = false } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetFileAccessor.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetFileAccessor.java index 4dc84977ff..232f89210e 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetFileAccessor.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetFileAccessor.java @@ -61,10 +61,9 @@ import org.greenplum.pxf.api.model.BasePlugin; import org.greenplum.pxf.api.utilities.ColumnDescriptor; import org.greenplum.pxf.plugins.hdfs.filter.BPCharOperatorTransformer; -import org.greenplum.pxf.plugins.hdfs.parquet.ParquetOperatorPruner; -import org.greenplum.pxf.plugins.hdfs.parquet.ParquetRecordFilterBuilder; -import org.greenplum.pxf.plugins.hdfs.parquet.ParquetUtilities; +import org.greenplum.pxf.plugins.hdfs.parquet.*; import org.greenplum.pxf.plugins.hdfs.utilities.DecimalOverflowOption; +import org.greenplum.pxf.plugins.hdfs.utilities.DecimalUtilities; import org.greenplum.pxf.plugins.hdfs.utilities.HdfsUtilities; import java.io.IOException; @@ -91,6 +90,7 @@ import static org.apache.parquet.schema.LogicalTypeAnnotation.DecimalLogicalTypeAnnotation; import static org.greenplum.pxf.plugins.hdfs.ParquetResolver.DEFAULT_USE_LOCAL_PXF_TIMEZONE_READ; import static org.greenplum.pxf.plugins.hdfs.ParquetResolver.USE_LOCAL_PXF_TIMEZONE_READ_NAME; +import static org.greenplum.pxf.plugins.hdfs.parquet.ParquetIntervalUtilities.INTERVAL_TYPE_LENGTH; /** * Parquet file accessor. @@ -102,8 +102,12 @@ public class ParquetFileAccessor extends BasePlugin implements Accessor { private static final CompressionCodecName DEFAULT_COMPRESSION = CompressionCodecName.SNAPPY; public static final String USE_INT64_TIMESTAMPS_NAME = "USE_INT64_TIMESTAMPS"; public static final String USE_LOCAL_PXF_TIMEZONE_WRITE_NAME = "USE_LOCAL_PXF_TIMEZONE_WRITE"; + public static final String USE_LOGICAL_TYPE_INTERVAL = "USE_LOGICAL_TYPE_INTERVAL"; + public static final String USE_LOGICAL_TYPE_TIME = "USE_LOGICAL_TYPE_TIME"; + public static final String USE_LOGICAL_TYPE_UUID = "USE_LOGICAL_TYPE_UUID"; public static final boolean DEFAULT_USE_INT64_TIMESTAMPS = false; public static final boolean DEFAULT_USE_LOCAL_PXF_TIMEZONE_WRITE = true; + public static final boolean DEFAULT_USE_NEW_ANNOTATIONS = false; // From org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe public static final int[] PRECISION_TO_BYTE_COUNT = new int[38]; @@ -148,6 +152,9 @@ public class ParquetFileAccessor extends BasePlugin implements Accessor { private long totalReadTimeInNanos; private boolean useInt64Timestamps; private boolean useLocalPxfTimezoneWrite; + private boolean useLogicalTypeInterval; + private boolean useLogicalTypeTime; + private boolean useLogicalTypeUUID; /** * Opens the resource for read. @@ -244,6 +251,9 @@ public boolean openForWrite() throws IOException, InterruptedException { parquetVersion = parquetVerStr != null ? WriterVersion.fromString(parquetVerStr.toLowerCase()) : DEFAULT_WRITER_VERSION; useInt64Timestamps = context.getOption(USE_INT64_TIMESTAMPS_NAME, DEFAULT_USE_INT64_TIMESTAMPS); useLocalPxfTimezoneWrite = context.getOption(USE_LOCAL_PXF_TIMEZONE_WRITE_NAME, DEFAULT_USE_LOCAL_PXF_TIMEZONE_WRITE); + useLogicalTypeInterval = context.getOption(USE_LOGICAL_TYPE_INTERVAL, DEFAULT_USE_NEW_ANNOTATIONS); + useLogicalTypeTime = context.getOption(USE_LOGICAL_TYPE_TIME, DEFAULT_USE_NEW_ANNOTATIONS); + useLogicalTypeUUID = context.getOption(USE_LOGICAL_TYPE_UUID, DEFAULT_USE_NEW_ANNOTATIONS); LOG.debug("{}-{}: Parquet options: PAGE_SIZE = {}, ROWGROUP_SIZE = {}, DICTIONARY_PAGE_SIZE = {}, " + "PARQUET_VERSION = {}, ENABLE_DICTIONARY = {}, USE_INT64_TIMESTAMPS = {}, USE_LOCAL_PXF_TIMEZONE_WRITE = {}", context.getTransactionId(), context.getSegmentId(), pageSize, rowGroupSize, dictionarySize, @@ -321,8 +331,14 @@ private FilterCompat.Filter getRecordFilter(String filterString, Map tupleDescription = context.getTupleDescription(); DecimalOverflowOption decimalOverflowOption = DecimalOverflowOption.valueOf(configuration.get(ParquetResolver.PXF_PARQUET_WRITE_DECIMAL_OVERFLOW_PROPERTY_NAME, DecimalOverflowOption.ROUND.name()).toUpperCase()); boolean useLocalPxfTimezoneRead = context.getOption(USE_LOCAL_PXF_TIMEZONE_READ_NAME, DEFAULT_USE_LOCAL_PXF_TIMEZONE_READ); + ParquetConfig parquetConfig = ParquetConfig.builder() + .useLocalPxfTimezoneWrite(useLocalPxfTimezoneRead) + .useLocalPxfTimezoneRead(useLocalPxfTimezoneRead) + .decimalUtilities(new DecimalUtilities(decimalOverflowOption, true)) + .build(); + ParquetTypeConverterFactory parquetTypeConverterFactory = new ParquetTypeConverterFactory(parquetConfig); ParquetRecordFilterBuilder filterBuilder = new ParquetRecordFilterBuilder( - tupleDescription, originalFieldsMap, decimalOverflowOption, useLocalPxfTimezoneRead); + tupleDescription, originalFieldsMap, parquetTypeConverterFactory); TreeVisitor pruner = new ParquetOperatorPruner( tupleDescription, originalFieldsMap, SUPPORTED_OPERATORS); TreeVisitor bpCharTransformer = new BPCharOperatorTransformer(tupleDescription); @@ -578,6 +594,7 @@ private Type getTypeForColumnDescriptor(ColumnDescriptor columnDescriptor) { throw new UnsupportedTypeException(String.format("Column %s is defined as NUMERIC with precision %d " + "which exceeds the maximum supported precision %d.", columnName, precision, HiveDecimal.MAX_PRECISION)); } + //todo look at precision to determine type correctly primitiveTypeName = PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY; logicalTypeAnnotation = DecimalLogicalTypeAnnotation.decimalType(scale, precision); @@ -609,6 +626,37 @@ private Type getTypeForColumnDescriptor(ColumnDescriptor columnDescriptor) { logicalTypeAnnotation = LogicalTypeAnnotation.dateType(); break; case TIME: + primitiveTypeName = PrimitiveTypeName.INT64; + // latest spark doesn't support time + if (useLogicalTypeTime) { + // postgres supports only microsecond precision out of the box + logicalTypeAnnotation = LogicalTypeAnnotation.timeType(true, LogicalTypeAnnotation.TimeUnit.MICROS); + } + break; + case JSON: + primitiveTypeName = PrimitiveTypeName.BINARY; + logicalTypeAnnotation = LogicalTypeAnnotation.jsonType(); + break; + case JSONB: + primitiveTypeName = PrimitiveTypeName.BINARY; + logicalTypeAnnotation = LogicalTypeAnnotation.bsonType(); + break; + case INTERVAL: + primitiveTypeName = PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY; + // latest spark doesn't support time + if (useLogicalTypeInterval) { + logicalTypeAnnotation = LogicalTypeAnnotation.IntervalLogicalTypeAnnotation.getInstance(); + } + length = INTERVAL_TYPE_LENGTH; + break; + case UUID: + primitiveTypeName = PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY; + // latest spark doesn't support uuid + if (useLogicalTypeUUID) { + logicalTypeAnnotation = LogicalTypeAnnotation.uuidType(); + } + length = LogicalTypeAnnotation.UUIDLogicalTypeAnnotation.BYTES; + break; case VARCHAR: case BPCHAR: case TEXT: @@ -617,7 +665,8 @@ private Type getTypeForColumnDescriptor(ColumnDescriptor columnDescriptor) { break; default: throw new UnsupportedTypeException( - String.format("Type %d for column %s is not supported for writing Parquet.", columnTypeCode, columnName)); + String.format("Type %s(%d) for column %s is not supported for writing Parquet.", + elementType.name(), columnTypeCode, columnName)); } Types.BasePrimitiveBuilder builder; diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetResolver.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetResolver.java index f4959612b3..af15c9e5f6 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetResolver.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/ParquetResolver.java @@ -21,15 +21,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; -import org.apache.hadoop.hive.common.type.HiveDecimal; import org.apache.parquet.example.data.Group; import org.apache.parquet.example.data.simple.SimpleGroupFactory; import org.apache.parquet.io.api.Binary; -import org.apache.parquet.schema.GroupType; -import org.apache.parquet.schema.LogicalTypeAnnotation; -import org.apache.parquet.schema.MessageType; -import org.apache.parquet.schema.PrimitiveType; -import org.apache.parquet.schema.Type; +import org.apache.parquet.schema.*; import org.greenplum.pxf.api.OneField; import org.greenplum.pxf.api.OneRow; import org.greenplum.pxf.api.error.UnsupportedTypeException; @@ -46,15 +41,12 @@ import java.io.IOException; import java.nio.ByteBuffer; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.regex.Pattern; -import static org.apache.parquet.schema.LogicalTypeAnnotation.DateLogicalTypeAnnotation; -import static org.apache.parquet.schema.LogicalTypeAnnotation.DecimalLogicalTypeAnnotation; -import static org.apache.parquet.schema.LogicalTypeAnnotation.IntLogicalTypeAnnotation; -import static org.apache.parquet.schema.LogicalTypeAnnotation.StringLogicalTypeAnnotation; -import static org.apache.parquet.schema.LogicalTypeAnnotation.TimestampLogicalTypeAnnotation; +import static org.apache.parquet.schema.LogicalTypeAnnotation.*; import static org.apache.parquet.schema.Type.Repetition.REPEATED; import static org.greenplum.pxf.plugins.hdfs.ParquetFileAccessor.DEFAULT_USE_LOCAL_PXF_TIMEZONE_WRITE; import static org.greenplum.pxf.plugins.hdfs.ParquetFileAccessor.USE_LOCAL_PXF_TIMEZONE_WRITE_NAME; @@ -76,6 +68,7 @@ public class ParquetResolver extends BasePlugin implements Resolver { private DecimalUtilities decimalUtilities; private ParquetConfig parquetConfig; private ParquetTypeConverterFactory parquetTypeConverterFactory; + private List schemaConverters; @Override public void afterPropertiesSet() { @@ -88,6 +81,7 @@ public void afterPropertiesSet() { parquetConfig = ParquetConfig.builder() .useLocalPxfTimezoneWrite(useLocalPxfTimezoneWrite) .useLocalPxfTimezoneRead(useLocalPxfTimezoneRead) + .decimalUtilities(decimalUtilities) .build(); parquetTypeConverterFactory = new ParquetTypeConverterFactory(parquetConfig); } @@ -131,17 +125,6 @@ public OneRow setFields(List record) throws IOException { Group group = groupFactory.newGroup(); for (int i = 0; i < record.size(); i++) { OneField field = record.get(i); - ColumnDescriptor columnDescriptor = columnDescriptors.get(i); - - /* - * We need to right trim the incoming value from Greenplum. This is - * consistent with the behaviour in Hive, where char fields are right - * trimmed during write. Note that String and varchar Hive types are - * not right trimmed. Hive does not trim tabs or newlines - */ - if (columnDescriptor.getDataType() == DataType.BPCHAR && field.val instanceof String) { - field.val = Utilities.rightTrimWhiteSpace((String) field.val); - } fillGroup(group, i, field); } return new OneRow(null, group); @@ -159,136 +142,14 @@ private void fillGroup(Group group, int columnIndex, OneField field) { return; } - Type type = schema.getType(columnIndex); - if (type.isPrimitive()) { - fillGroupWithPrimitive(group, columnIndex, field.val, type.asPrimitiveType()); - return; - } - - LogicalTypeAnnotation logicalTypeAnnotation = type.getLogicalTypeAnnotation(); - if (logicalTypeAnnotation == null) { - throw new UnsupportedTypeException("Parquet group type without logical annotation is not supported"); - } - - if (logicalTypeAnnotation != LogicalTypeAnnotation.listType()) { - throw new UnsupportedTypeException(String.format("Parquet complex type %s is not supported", logicalTypeAnnotation)); - } - /* - * https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#lists - * Parquet LIST must always annotate a 3-level structure: - * group (LIST) { // listType, a listType always has only 1 repeatedType - * repeated group list { // repeatedType, a repeatedType always has only 1 element type - * element; // elementType - * } - * } - */ - GroupType listType = type.asGroupType(); - GroupType repeatedType = listType.getType(0).asGroupType(); - PrimitiveType elementType = repeatedType.getType(0).asPrimitiveType(); - // Decode Postgres String representation of an array into a list of Objects - List values = parquetUtilities.parsePostgresArray(field.val.toString(), elementType.getPrimitiveTypeName(), elementType.getLogicalTypeAnnotation()); - - /* - * For example, the value of a text array ["hello","",null,"test"] would look like: - * text_arr - * list - * element: hello - * list - * element: --> empty element "" - * list --> NULL element - * list - * element: test - */ - Group listGroup = group.addGroup(columnIndex); - for (Object value : values) { - Group repeatedGroup = listGroup.addGroup(0); - if (value != null) { - fillGroupWithPrimitive(repeatedGroup, 0, value, elementType); - } - } - } - - /** - * Fill the element of Parquet Group at the given index with provided field value and Parquet Primitive type - * - * @param group the Parquet Group object being filled - * @param columnIndex the index of the column in a row that needs to be filled with data - * @param fieldValue OneField object holding the value we need to fill into the Parquet Group object - * @param primitiveType the Primitive Parquet schema we need to fill into the Parquet Group object - */ - private void fillGroupWithPrimitive(Group group, int columnIndex, Object fieldValue, PrimitiveType primitiveType) { - LogicalTypeAnnotation logicalTypeAnnotation = primitiveType.getLogicalTypeAnnotation(); - PrimitiveType.PrimitiveTypeName primitiveTypeName = primitiveType.getPrimitiveTypeName(); - - switch (primitiveTypeName) { - case BINARY: - if (logicalTypeAnnotation instanceof StringLogicalTypeAnnotation) { - group.add(columnIndex, (String) fieldValue); - } else if (fieldValue instanceof ByteBuffer) { - ByteBuffer byteBuffer = (ByteBuffer) fieldValue; - group.add(columnIndex, Binary.fromReusedByteArray(byteBuffer.array(), 0, byteBuffer.limit())); - } else { - group.add(columnIndex, Binary.fromReusedByteArray((byte[]) fieldValue)); - } - break; - case INT32: - if (logicalTypeAnnotation instanceof DateLogicalTypeAnnotation) { - String dateString = (String) fieldValue; - group.add(columnIndex, ParquetTimestampUtilities.getDaysFromEpochFromDateString(dateString)); - } else if (logicalTypeAnnotation instanceof IntLogicalTypeAnnotation && - ((IntLogicalTypeAnnotation) logicalTypeAnnotation).getBitWidth() == 16) { - group.add(columnIndex, (Short) fieldValue); - } else { - group.add(columnIndex, (Integer) fieldValue); - } - break; - case INT64: - if (logicalTypeAnnotation instanceof TimestampLogicalTypeAnnotation) { - String timestamp = (String) fieldValue; - boolean isTimestampWithTimeZone = TIMESTAMP_PATTERN.matcher(timestamp).find(); - TimestampLogicalTypeAnnotation originalType = (TimestampLogicalTypeAnnotation) logicalTypeAnnotation; - group.add(columnIndex, ParquetTimestampUtilities - .getLongFromTimestamp(timestamp, originalType.isAdjustedToUTC(), isTimestampWithTimeZone)); - } else if (fieldValue instanceof Long) { - group.add(columnIndex, (Long) fieldValue); - } - break; - case DOUBLE: - group.add(columnIndex, (Double) fieldValue); - break; - case FLOAT: - group.add(columnIndex, (Float) fieldValue); - break; - case FIXED_LEN_BYTE_ARRAY: - byte[] fixedLenByteArray = getFixedLenByteArray((String) fieldValue, primitiveType, columnDescriptors.get(columnIndex).columnName()); - if (fixedLenByteArray == null) { - return; - } - group.add(columnIndex, Binary.fromReusedByteArray(fixedLenByteArray)); - break; - case INT96: // SQL standard timestamp string value with or without time zone literals: https://www.postgresql.org/docs/9.4/datatype-datetime.html - String timestamp = (String) fieldValue; - if (TIMESTAMP_PATTERN.matcher(timestamp).find()) { - // Note: this conversion convert type "timestamp with time zone" will lose timezone information - // while preserving the correct value. (as Parquet doesn't support timestamp with time zone) - group.add(columnIndex, ParquetTimestampUtilities.getBinaryFromTimestampWithTimeZone(timestamp)); - } else { - group.add(columnIndex, ParquetTimestampUtilities.getBinaryFromTimestamp(timestamp, parquetConfig.isUseLocalPxfTimezoneWrite())); - } - break; - case BOOLEAN: - group.add(columnIndex, (Boolean) fieldValue); - break; - default: - throw new UnsupportedTypeException(String.format("Parquet primitive type %s is not supported.", primitiveTypeName)); + ParquetTypeConverter converter = schemaConverters.get(columnIndex); + try { + converter.write(group, columnIndex, field.val); + } catch (UnsupportedTypeException ex) { + throw new UnsupportedTypeException(ex.getMessage().replaceAll("(?<=\\s)" + columnIndex + "(?=\\s)", columnDescriptors.get(columnIndex).columnName())); } } - private byte[] getFixedLenByteArray(String value, Type type, String columnName) { - return ParquetFixedLenByteArrayUtilities.convertFromBigDecimal(decimalUtilities, value, columnName, - (DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation()); - } - // Set schema from context if null // TODO: Fix the bridge interface so the schema is set before get/setFields is called // Then validateSchema can be done during initialize phase @@ -298,6 +159,15 @@ private void validateSchema() { if (schema == null) throw new RuntimeException("No schema detected in request context"); groupFactory = new SimpleGroupFactory(schema); + schemaConverters = new ArrayList<>(); + int i = 0; + for (ColumnDescriptor columnDescriptor : columnDescriptors) { + if (columnDescriptor.isProjected()) { + schemaConverters.add( + parquetTypeConverterFactory.create(schema.getType(i), columnDescriptor.getDataType())); + i++; + } + } } } @@ -313,7 +183,7 @@ private OneField resolveField(Group group, int columnIndex) { // get type converter based on the field data type // schema is the readSchema, if there is column projection, the schema will be a subset of tuple descriptions Type type = schema.getType(columnIndex); - ParquetTypeConverter converter = parquetTypeConverterFactory.create(type); + ParquetTypeConverter converter = schemaConverters.get(columnIndex); // determine how many values for the field are present in the column int repetitionCount = group.getFieldRepetitionCount(columnIndex); if (type.getRepetition() == REPEATED) { @@ -321,7 +191,7 @@ private OneField resolveField(Group group, int columnIndex) { // the element value will be converted into JSON value ArrayNode jsonArray = mapper.createArrayNode(); for (int repeatIndex = 0; repeatIndex < repetitionCount; repeatIndex++) { - converter.addValueToJsonArray(group, columnIndex, repeatIndex, type, jsonArray); + converter.addValueToJsonArray(group, columnIndex, repeatIndex, jsonArray); } field.type = DataType.TEXT.getOID(); try { @@ -339,12 +209,12 @@ private OneField resolveField(Group group, int columnIndex) { } else if (repetitionCount == 0) { // For non-REPEATED type, repetitionCount can only be 0 or 1 // repetitionCount == 0 means this is a null LIST/Primitive - field.type = converter.getDataType(type).getOID(); + field.type = converter.getDataType().getOID(); field.val = null; } else { // repetitionCount can only be 1 - field.type = converter.getDataType(type).getOID(); - field.val = converter.getValue(group, columnIndex, 0, type); + field.type = converter.getDataType().getOID(); + field.val = converter.read(group, columnIndex, 0); } return field; } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/filter/SearchArgumentBuilder.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/filter/SearchArgumentBuilder.java index b9a47c58bc..4ac1deb10a 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/filter/SearchArgumentBuilder.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/filter/SearchArgumentBuilder.java @@ -274,6 +274,8 @@ private static Object boxLiteral(Object literal) { // to avoid change in precision when upcasting float to double // we convert the literal to string and parse it as double. (HIVE-8460) return Double.parseDouble(literal.toString()); + } else if (literal instanceof byte[]) { + return new String((byte[]) literal); } else { throw new IllegalArgumentException("Unknown type for literal " + literal); diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/orc/ORCVectorizedAccessor.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/orc/ORCVectorizedAccessor.java index 645fe935f5..59a2c10aa8 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/orc/ORCVectorizedAccessor.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/orc/ORCVectorizedAccessor.java @@ -16,12 +16,8 @@ import org.apache.orc.TypeDescription; import org.apache.orc.Writer; import org.greenplum.pxf.api.OneRow; -import org.greenplum.pxf.api.filter.FilterParser; -import org.greenplum.pxf.api.filter.Node; -import org.greenplum.pxf.api.filter.Operator; -import org.greenplum.pxf.api.filter.SupportedOperatorPruner; -import org.greenplum.pxf.api.filter.TreeTraverser; -import org.greenplum.pxf.api.filter.TreeVisitor; +import org.greenplum.pxf.api.filter.*; +import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.api.model.Accessor; import org.greenplum.pxf.api.model.BasePlugin; import org.greenplum.pxf.api.utilities.ColumnDescriptor; @@ -43,6 +39,24 @@ public class ORCVectorizedAccessor extends BasePlugin implements Accessor { + static final EnumSet SUPPORTED_DATATYPES = + EnumSet.of( + DataType.BIGINT, + DataType.INTEGER, + DataType.SMALLINT, + DataType.REAL, + DataType.NUMERIC, + DataType.FLOAT8, + DataType.TEXT, + DataType.VARCHAR, + DataType.BPCHAR, + DataType.BOOLEAN, + DataType.DATE, + DataType.TIMESTAMP, + DataType.TIME + //DataType.BYTEA + ); + public static final EnumSet SUPPORTED_OPERATORS = EnumSet.of( Operator.NOOP, @@ -254,6 +268,8 @@ private SearchArgument getSearchArgument(String filterString, TypeDescription or SearchArgumentBuilder searchArgumentBuilder = new SearchArgumentBuilder(descriptors, configuration); + SupportedDataTypePruner supportedDataTypePruner = new SupportedDataTypePruner(context.getTupleDescription(), SUPPORTED_DATATYPES); + TreeVisitor bpCharOperatorTransformer = new BPCharOperatorTransformer(descriptors); // Parse the filter string into a expression tree Node @@ -261,7 +277,7 @@ private SearchArgument getSearchArgument(String filterString, TypeDescription or // Prune the parsed tree with valid supported operators and then // traverse the pruned tree with the searchArgumentBuilder to produce a // SearchArgument for ORC - TRAVERSER.traverse(root, PRUNER, bpCharOperatorTransformer, searchArgumentBuilder); + TRAVERSER.traverse(root, supportedDataTypePruner, PRUNER, bpCharOperatorTransformer, searchArgumentBuilder); // Build the SearchArgument object return searchArgumentBuilder.getFilterBuilder().build(); diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetConfig.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetConfig.java index ccf4648a95..df3e0abcb8 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetConfig.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetConfig.java @@ -2,10 +2,12 @@ import lombok.Builder; import lombok.Data; +import org.greenplum.pxf.plugins.hdfs.utilities.DecimalUtilities; @Data @Builder public class ParquetConfig { private final boolean useLocalPxfTimezoneWrite; private final boolean useLocalPxfTimezoneRead; + private final DecimalUtilities decimalUtilities; } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetIntervalUtilities.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetIntervalUtilities.java new file mode 100644 index 0000000000..dc71b9c88a --- /dev/null +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetIntervalUtilities.java @@ -0,0 +1,62 @@ +package org.greenplum.pxf.plugins.hdfs.parquet; + +import lombok.experimental.UtilityClass; +import lombok.extern.slf4j.Slf4j; +import org.apache.parquet.io.api.Binary; +import org.postgresql.util.PGInterval; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.nio.ByteBuffer; +import java.sql.SQLException; + +@Slf4j +@UtilityClass +public class ParquetIntervalUtilities { + public static final int INTERVAL_TYPE_LENGTH = 12; + public static String read(byte[] bytes) { + ByteBuffer bb = ByteBuffer.wrap(bytes); + int months = bb.getInt(); + int days = bb.getInt(); + int millis = bb.getInt(); + + int years = months / 12; + months -= years * 12; + int seconds = millis / 1000; + millis -= seconds * 1000; + int minutes = seconds / 60; + seconds -= minutes * 60; + int hours = minutes / 60; + minutes -= hours * 60; + // have to go long way 'cause of float issues + BigInteger bi = BigInteger.valueOf(seconds * 1000L + millis); + BigDecimal bd = new BigDecimal(bi, 3); + PGInterval iv = new PGInterval(years, months, days, hours, minutes, bd.doubleValue()); + return iv.getValue(); + } + + public static Binary write(String str) { + PGInterval iv = null; + try { + iv = new PGInterval(str); + } catch (SQLException e) { + log.error("Couldn't create postgres interval: " + e.getMessage(), e); + return null; + } + + int years = iv.getYears(); + int months = iv.getMonths(); + int days = iv.getDays(); + int hours = iv.getHours(); + int minutes = iv.getMinutes(); + int seconds = iv.getWholeSeconds(); + int micros = iv.getMicroSeconds(); + int total_seconds = (hours * 60 + minutes) * 60 + seconds; + + ByteBuffer bb = ByteBuffer.wrap(new byte[12]); + bb.putInt(years * 12 + months); + bb.putInt(days); + bb.putInt(total_seconds * 1000 + micros / 1000); + return Binary.fromReusedByteArray(bb.array()); + } +} \ No newline at end of file diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetOperatorPruner.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetOperatorPruner.java index 62f9324edd..3ed7f01293 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetOperatorPruner.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetOperatorPruner.java @@ -2,11 +2,7 @@ import org.apache.parquet.schema.PrimitiveType; import org.apache.parquet.schema.Type; -import org.greenplum.pxf.api.filter.ColumnIndexOperandNode; -import org.greenplum.pxf.api.filter.Node; -import org.greenplum.pxf.api.filter.Operator; -import org.greenplum.pxf.api.filter.OperatorNode; -import org.greenplum.pxf.api.filter.SupportedOperatorPruner; +import org.greenplum.pxf.api.filter.*; import org.greenplum.pxf.api.utilities.ColumnDescriptor; import java.util.EnumSet; @@ -19,7 +15,7 @@ * expression tree. */ public class ParquetOperatorPruner extends SupportedOperatorPruner { - // INT96 and FIXED_LEN_BYTE_ARRAY cannot be pushed down + // INT96 cannot be pushed down // for more details look at // org.apache.parquet.filter2.dictionarylevel.DictionaryFilter#expandDictionary // where INT96 are not dictionary values @@ -79,6 +75,10 @@ private PrimitiveType.PrimitiveTypeName getPrimitiveType(OperatorNode operatorNo ColumnDescriptor columnDescriptor = columnDescriptors.get(columnIndexOperand.index()); String filterColumnName = columnDescriptor.columnName(); Type type = fields.get(filterColumnName); - return type.asPrimitiveType().getPrimitiveTypeName(); + if (type.isPrimitive()) { + return type.asPrimitiveType().getPrimitiveTypeName(); + } else { + return null; + } } } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilder.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilder.java index c0986c6807..e3c5e06f96 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilder.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilder.java @@ -5,41 +5,22 @@ import org.apache.parquet.filter2.predicate.FilterPredicate; import org.apache.parquet.filter2.predicate.Operators; import org.apache.parquet.io.api.Binary; -import org.apache.parquet.schema.LogicalTypeAnnotation; +import org.apache.parquet.schema.PrimitiveType; import org.apache.parquet.schema.Type; -import org.greenplum.pxf.api.filter.ColumnIndexOperandNode; -import org.greenplum.pxf.api.filter.Node; -import org.greenplum.pxf.api.filter.OperandNode; -import org.greenplum.pxf.api.filter.Operator; -import org.greenplum.pxf.api.filter.OperatorNode; -import org.greenplum.pxf.api.filter.TreeVisitor; +import org.greenplum.pxf.api.filter.*; import org.greenplum.pxf.api.utilities.ColumnDescriptor; -import org.greenplum.pxf.plugins.hdfs.ParquetResolver; -import org.greenplum.pxf.plugins.hdfs.utilities.DecimalOverflowOption; -import org.greenplum.pxf.plugins.hdfs.utilities.DecimalUtilities; +import org.greenplum.pxf.plugins.hdfs.parquet.converters.ParquetTypeConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.time.LocalDate; -import java.time.temporal.ChronoUnit; import java.util.Deque; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.function.BiFunction; -import static org.apache.parquet.filter2.predicate.FilterApi.and; -import static org.apache.parquet.filter2.predicate.FilterApi.binaryColumn; -import static org.apache.parquet.filter2.predicate.FilterApi.booleanColumn; -import static org.apache.parquet.filter2.predicate.FilterApi.doubleColumn; -import static org.apache.parquet.filter2.predicate.FilterApi.floatColumn; -import static org.apache.parquet.filter2.predicate.FilterApi.intColumn; -import static org.apache.parquet.filter2.predicate.FilterApi.longColumn; -import static org.apache.parquet.filter2.predicate.FilterApi.not; -import static org.apache.parquet.filter2.predicate.FilterApi.or; -import static org.apache.parquet.schema.LogicalTypeAnnotation.DateLogicalTypeAnnotation; -import static org.apache.parquet.schema.LogicalTypeAnnotation.TimestampLogicalTypeAnnotation; -import static org.apache.parquet.schema.LogicalTypeAnnotation.DecimalLogicalTypeAnnotation; +import static org.apache.parquet.filter2.predicate.FilterApi.*; +import static org.greenplum.pxf.plugins.hdfs.parquet.converters.ParquetTypeConverter.FILTER_COLUMN; /** * This is the implementation of {@link TreeVisitor} for Parquet. @@ -56,8 +37,8 @@ public class ParquetRecordFilterBuilder implements TreeVisitor { private final Map fields; private final List columnDescriptors; private final Deque filterQueue; - private final DecimalUtilities decimalUtilities; - private final boolean useLocalPxfTimezoneRead; + + ParquetTypeConverterFactory parquetTypeConverterFactory; /** * Constructor @@ -66,12 +47,11 @@ public class ParquetRecordFilterBuilder implements TreeVisitor { * @param originalFields a map of field names to types */ public ParquetRecordFilterBuilder(List columnDescriptors, Map originalFields, - DecimalOverflowOption decimalOverflowOption, boolean useLocalPxfTimezone) { + ParquetTypeConverterFactory parquetTypeConverterFactory) { this.columnDescriptors = columnDescriptors; this.filterQueue = new LinkedList<>(); this.fields = originalFields; - this.decimalUtilities = new DecimalUtilities(decimalOverflowOption, true); - this.useLocalPxfTimezoneRead = useLocalPxfTimezone; + this.parquetTypeConverterFactory = parquetTypeConverterFactory; } @Override @@ -168,42 +148,58 @@ private void processSimpleColumnOperator(OperatorNode operatorNode) { ColumnDescriptor columnDescriptor = columnDescriptors.get(columnIndexOperand.index()); String filterColumnName = columnDescriptor.columnName(); Type type = fields.get(filterColumnName); + PrimitiveType.PrimitiveTypeName primitiveTypeName = type.asPrimitiveType().getPrimitiveTypeName(); + ParquetTypeConverter typeConverter = parquetTypeConverterFactory.create(type, columnDescriptor.getDataType()); + if (valueOperand != null && valueOperand.getDataType().isArrayType()) { + throw new UnsupportedOperationException("Currently not supported IN on this level(should be rewritten before this builder)."); + } + Object filterValue; + try { + // todo also look at data type of the filter value + filterValue = (valueOperand != null) ? typeConverter.filterValue(valueOperand.toString()) : null; + } catch (Exception ex) { + if (ex.getMessage().contains(FILTER_COLUMN)) { + throw new IllegalArgumentException(ex.getMessage().replace(FILTER_COLUMN, filterColumnName), ex); + } else { + throw ex; + } + } // INT96 cannot be pushed down // for more details look at org.apache.parquet.filter2.dictionarylevel.DictionaryFilter#expandDictionary // where INT96 are not dictionary values FilterPredicate simpleFilter; - switch (type.asPrimitiveType().getPrimitiveTypeName()) { + switch (primitiveTypeName) { case INT32: simpleFilter = ParquetRecordFilterBuilder.getOperatorWithLtGtSupport(operator) - .apply(intColumn(type.getName()), getIntegerForINT32(type.getLogicalTypeAnnotation(), valueOperand)); + .apply(intColumn(type.getName()), (Integer) filterValue); break; case INT64: simpleFilter = ParquetRecordFilterBuilder.getOperatorWithLtGtSupport(operator) - .apply(longColumn(type.getName()), getLongForINT64(type.getLogicalTypeAnnotation(), valueOperand)); + .apply(longColumn(type.getName()), (Long) filterValue); break; case FIXED_LEN_BYTE_ARRAY: case BINARY: simpleFilter = ParquetRecordFilterBuilder.getOperatorWithLtGtSupport(operator) - .apply(binaryColumn(type.getName()), getBinaryFromString(type.getLogicalTypeAnnotation(), valueOperand, filterColumnName)); + .apply(binaryColumn(type.getName()), (Binary) filterValue); break; case BOOLEAN: // Boolean does not SupportsLtGt simpleFilter = ParquetRecordFilterBuilder.getOperatorWithEqNotEqSupport(operator) - .apply(booleanColumn(type.getName()), valueOperand == null ? null : Boolean.parseBoolean(valueOperand.toString())); + .apply(booleanColumn(type.getName()), (Boolean) filterValue); break; case FLOAT: simpleFilter = ParquetRecordFilterBuilder.getOperatorWithLtGtSupport(operator) - .apply(floatColumn(type.getName()), valueOperand == null ? null : Float.parseFloat(valueOperand.toString())); + .apply(floatColumn(type.getName()), (Float) filterValue); break; case DOUBLE: simpleFilter = ParquetRecordFilterBuilder.getOperatorWithLtGtSupport(operator) - .apply(doubleColumn(type.getName()), valueOperand == null ? null : Double.parseDouble(valueOperand.toString())); + .apply(doubleColumn(type.getName()), (Double) filterValue); break; default: @@ -272,36 +268,4 @@ private static , C extends Operators.Column & Operato } } - private static Integer getIntegerForINT32(LogicalTypeAnnotation logicalTypeAnnotation, OperandNode valueOperand) { - if (valueOperand == null) return null; - if (logicalTypeAnnotation instanceof DateLogicalTypeAnnotation) { - // Number of days since epoch - LocalDate localDateValue = LocalDate.parse(valueOperand.toString()); - LocalDate epoch = LocalDate.ofEpochDay(0); - return (int) ChronoUnit.DAYS.between(epoch, localDateValue); - } - return Integer.parseInt(valueOperand.toString()); - } - - private Long getLongForINT64(LogicalTypeAnnotation logicalTypeAnnotation, OperandNode valueOperand) { - if (valueOperand == null) return null; - String value = valueOperand.toString(); - if (logicalTypeAnnotation instanceof TimestampLogicalTypeAnnotation) { - return ParquetTimestampUtilities.getLongFromTimestamp(value, useLocalPxfTimezoneRead, - ParquetResolver.TIMESTAMP_PATTERN.matcher(value).find()); - } - return Long.parseLong(value); - } - - private Binary getBinaryFromString(LogicalTypeAnnotation logicalTypeAnnotation, OperandNode valueOperand, - String columnName) { - if (valueOperand == null) return null; - String value = valueOperand.toString(); - if (logicalTypeAnnotation instanceof DecimalLogicalTypeAnnotation) { - DecimalLogicalTypeAnnotation decimalType = (DecimalLogicalTypeAnnotation) logicalTypeAnnotation; - byte[] tgt = ParquetFixedLenByteArrayUtilities.convertFromBigDecimal(decimalUtilities, value, columnName, decimalType); - return Binary.fromReusedByteArray(tgt); - } - return Binary.fromString(value); - } } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilities.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilities.java index 014147f66f..c88d573300 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilities.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilities.java @@ -1,6 +1,7 @@ package org.greenplum.pxf.plugins.hdfs.parquet; import org.apache.parquet.example.data.simple.NanoTime; +import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.LogicalTypeAnnotation; import org.greenplum.pxf.api.GreenplumDateTime; import org.slf4j.Logger; @@ -11,8 +12,6 @@ import java.time.*; import java.util.Base64; -import org.apache.parquet.io.api.Binary; - import static org.greenplum.pxf.plugins.hdfs.parquet.ParquetConstant.*; public class ParquetTimestampUtilities { @@ -45,6 +44,10 @@ public static long getLongFromTimestamp(String timestampString, boolean useLocal } public static String getTimestampFromLong(long value, LogicalTypeAnnotation.TimeUnit timeUnit, boolean useLocalTimezone) { + return getTimestampFromLong(value, timeUnit, useLocalTimezone, false); + } + + public static String getTimestampFromLong(long value, LogicalTypeAnnotation.TimeUnit timeUnit, boolean useLocalTimezone, boolean isTimestampWithTimeZone) { long seconds = 0L; long nanoseconds = 0L; @@ -71,8 +74,8 @@ public static String getTimestampFromLong(long value, LogicalTypeAnnotation.Time break; } Instant instant = Instant.ofEpochSecond(seconds, nanoseconds); - LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zoneId); - return localDateTime.format(GreenplumDateTime.DATETIME_FORMATTER); + ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(instant, zoneId); + return zonedDateTime.format(isTimestampWithTimeZone ? GreenplumDateTime.DATETIME_WITH_TIMEZONE_FORMATTER : GreenplumDateTime.DATETIME_FORMATTER); } /** diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactory.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactory.java index 1780239687..ffcb8772c4 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactory.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactory.java @@ -5,6 +5,7 @@ import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.error.PxfRuntimeException; import org.greenplum.pxf.api.error.UnsupportedTypeException; +import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.plugins.hdfs.parquet.converters.*; import java.util.Optional; @@ -16,65 +17,51 @@ public ParquetTypeConverterFactory(ParquetConfig parquetConfig) { this.parquetConfig = parquetConfig; } - public ParquetTypeConverter create(Type type) { + @SuppressWarnings("deprecation") + public ParquetTypeConverter create(Type type, DataType dataType) { if (type.isPrimitive()) { PrimitiveType.PrimitiveTypeName primitiveTypeName = type.asPrimitiveType().getPrimitiveTypeName(); if (primitiveTypeName == null) { throw new PxfRuntimeException("Invalid Parquet primitive schema. Parquet primitive type name is null."); } try { - PxfParquetType pxfParquetType = PxfParquetType.valueOf(primitiveTypeName.name()); - return Optional.ofNullable(createParquetTypeConverter(pxfParquetType)) + return Optional.ofNullable(createParquetTypeConverter(type, dataType, primitiveTypeName)) .orElseThrow(() -> new UnsupportedTypeException( - String.format("Primitive parquet type converter %s is not supported", pxfParquetType)) + String.format("Parquet type converter %s is not supported", primitiveTypeName.name())) ); } catch (IllegalArgumentException e) { throw new UnsupportedTypeException(String.format("Primitive parquet type %s is not supported, error: %s", primitiveTypeName, e)); } } - String complexTypeName = getComplexTypeName(type.asGroupType()); - try { - // parquet LIST type - PxfParquetType pxfParquetType = PxfParquetType.valueOf(complexTypeName); - return Optional.ofNullable(createParquetTypeConverter(pxfParquetType)) - .orElseThrow(() -> new UnsupportedTypeException(String.format("Complex parquet type converter %s is not supported", pxfParquetType))); - } catch (IllegalArgumentException e) { - // other unsupported parquet complex type - throw new UnsupportedTypeException(String.format("Parquet complex type %s is not supported, error: %s", complexTypeName, e)); + // parquet LIST type + GroupType groupType = type.asGroupType(); + if (groupType.getOriginalType() == org.apache.parquet.schema.OriginalType.LIST) { + return new ListParquetTypeConverter(type, dataType, this); + } else { + throw new UnsupportedTypeException(String.format("Parquet complex type converter [%s] is not supported", + groupType.getOriginalType() != null ? groupType.getOriginalType() : "customized struct")); } } - /** - * Get the type name of the input complex type - * - * @param complexType the GroupType we want to get the type name from - * @return the type name of the complex type - */ - private String getComplexTypeName(GroupType complexType) { - return complexType.getOriginalType() == null ? "customized struct" : complexType.getOriginalType().name(); - } - - private ParquetTypeConverter createParquetTypeConverter(PxfParquetType pxfParquetType) { - switch (pxfParquetType) { + private ParquetTypeConverter createParquetTypeConverter(Type type, DataType dataType, PrimitiveType.PrimitiveTypeName primitiveTypeName) { + switch (primitiveTypeName) { case INT32: - return new Int32ParquetTypeConverter(); + return new Int32ParquetTypeConverter(type, dataType); case INT64: - return new Int64ParquetTypeConverter(parquetConfig.isUseLocalPxfTimezoneRead()); + return new Int64ParquetTypeConverter(type, dataType, parquetConfig.isUseLocalPxfTimezoneRead(), parquetConfig.isUseLocalPxfTimezoneWrite()); case INT96: - return new Int96ParquetTypeConverter(parquetConfig.isUseLocalPxfTimezoneRead()); + return new Int96ParquetTypeConverter(parquetConfig.isUseLocalPxfTimezoneRead(), parquetConfig.isUseLocalPxfTimezoneWrite()); case BINARY: - return new BinaryParquetTypeConverter(); + return new BinaryParquetTypeConverter(type, dataType); case BOOLEAN: return new BooleanParquetTypeConverter(); case DOUBLE: return new DoubleParquetTypeConverter(); case FIXED_LEN_BYTE_ARRAY: - return new FixedLenByteArrayParquetTypeConverter(); + return new FixedLenByteArrayParquetTypeConverter(type, dataType, parquetConfig.getDecimalUtilities()); case FLOAT: return new FloatParquetTypeConverter(); - case LIST: - return new ListParquetTypeConverter(this); default: return null; } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetUUIDUtilities.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetUUIDUtilities.java new file mode 100644 index 0000000000..193bf0b533 --- /dev/null +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetUUIDUtilities.java @@ -0,0 +1,26 @@ +package org.greenplum.pxf.plugins.hdfs.parquet; + +import lombok.experimental.UtilityClass; +import org.apache.parquet.io.api.Binary; + +import java.nio.ByteBuffer; +import java.util.UUID; + +@UtilityClass +public class ParquetUUIDUtilities { + + public static String readUUID(byte[] bytes) { + ByteBuffer bb = ByteBuffer.wrap(bytes); + long most = bb.getLong(); + long least = bb.getLong(); + return new UUID(most, least).toString(); + } + + public static Binary writeUUID(String str) { + UUID uuid = UUID.fromString(str); + ByteBuffer bb = ByteBuffer.wrap(new byte[16]); + bb.putLong(uuid.getMostSignificantBits()); + bb.putLong(uuid.getLeastSignificantBits()); + return Binary.fromReusedByteArray(bb.array()); + } +} diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetUtilities.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetUtilities.java index c1f267875c..a11cb8f3a8 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetUtilities.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetUtilities.java @@ -79,7 +79,9 @@ private Object decodeString(String val, PrimitiveType.PrimitiveTypeName primitiv } switch (primitiveTypeName) { case BINARY: - if (logicalTypeAnnotation instanceof LogicalTypeAnnotation.StringLogicalTypeAnnotation) { + if (logicalTypeAnnotation instanceof LogicalTypeAnnotation.StringLogicalTypeAnnotation + || logicalTypeAnnotation instanceof LogicalTypeAnnotation.JsonLogicalTypeAnnotation + || logicalTypeAnnotation instanceof LogicalTypeAnnotation.BsonLogicalTypeAnnotation) { return val; } else { return pgUtilities.parseByteaLiteral(val); @@ -98,7 +100,9 @@ private Object decodeString(String val, PrimitiveType.PrimitiveTypeName primitiv return Integer.parseInt(val); } case INT64: - if (logicalTypeAnnotation instanceof LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) { + // ":" here is only for purpose of supporting libraries that don't support new parquet annotations (spark for example) + if (logicalTypeAnnotation instanceof LogicalTypeAnnotation.TimestampLogicalTypeAnnotation + || logicalTypeAnnotation instanceof LogicalTypeAnnotation.TimeLogicalTypeAnnotation || val.contains(":")) { return val; } else { return Long.parseLong(val); diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/PxfParquetType.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/PxfParquetType.java index 0bff7873a3..0546665b90 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/PxfParquetType.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/PxfParquetType.java @@ -12,5 +12,6 @@ public enum PxfParquetType { FLOAT, FIXED_LEN_BYTE_ARRAY, BOOLEAN, - LIST + LIST, + CUSTOM } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BinaryParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BinaryParquetTypeConverter.java index da09cc2cf6..1bae6da428 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BinaryParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BinaryParquetTypeConverter.java @@ -1,55 +1,151 @@ package org.greenplum.pxf.plugins.hdfs.parquet.converters; import com.fasterxml.jackson.databind.node.ArrayNode; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.DecoderException; import org.apache.parquet.example.data.Group; +import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.LogicalTypeAnnotation; -import org.apache.parquet.schema.PrimitiveType; import org.apache.parquet.schema.Type; +import org.bson.BsonBinaryReader; +import org.bson.BsonBinaryWriter; +import org.bson.BsonDocument; +import org.bson.codecs.BsonDocumentCodec; +import org.bson.codecs.DecoderContext; +import org.bson.codecs.EncoderContext; +import org.bson.io.BasicOutputBuffer; import org.greenplum.pxf.api.io.DataType; +import org.greenplum.pxf.api.utilities.Utilities; +import org.greenplum.pxf.plugins.hdfs.parquet.ParquetIntervalUtilities; +import org.greenplum.pxf.plugins.hdfs.parquet.ParquetUUIDUtilities; import org.greenplum.pxf.plugins.hdfs.utilities.PgUtilities; import java.nio.ByteBuffer; +import java.util.EnumSet; +@Slf4j public class BinaryParquetTypeConverter implements ParquetTypeConverter { + private static final EnumSet STRING_DATA_TYPES = EnumSet.of(DataType.TEXT, DataType.JSON, DataType.NUMERIC, + DataType.BPCHAR); private final PgUtilities pgUtilities = new PgUtilities(); + private final Type type; + private final DataType dataType; + private final DataType detectedDataType; + + public BinaryParquetTypeConverter(Type type, DataType dataType) { + this.type = type; + this.dataType = dataType; + this.detectedDataType = detectDataType(); + } + @Override - public DataType getDataType(Type type) { + public DataType getDataType() { + return detectedDataType; + } + + private DataType detectDataType() { LogicalTypeAnnotation originalType = type.getLogicalTypeAnnotation(); if (originalType == null) { - return DataType.BYTEA; + return dataType == DataType.INTERVAL || dataType == DataType.UUID || dataType == DataType.JSONB ? dataType : DataType.BYTEA; } else if (originalType instanceof LogicalTypeAnnotation.DateLogicalTypeAnnotation) { return DataType.DATE; - } else if (originalType instanceof LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) { - return DataType.TIMESTAMP; + } else if (originalType instanceof LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) { + return DataType.NUMERIC; + } else if (originalType instanceof LogicalTypeAnnotation.BsonLogicalTypeAnnotation) { + return DataType.JSONB; + } else if (originalType instanceof LogicalTypeAnnotation.JsonLogicalTypeAnnotation) { + return DataType.JSON; + } else if (dataType == DataType.BPCHAR) { + return DataType.BPCHAR; } else { return DataType.TEXT; } } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - if (getDataType(type) == DataType.BYTEA) { - jsonNode.add(group.getBinary(columnIndex, repeatIndex).getBytes()); + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + Object val = read(group, columnIndex, repeatIndex); + if (getDataType() == DataType.BYTEA) { + jsonNode.add((byte[]) val); } else { - jsonNode.add(group.getString(columnIndex, repeatIndex)); + jsonNode.add((String) val); } } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { - if (getDataType(type) == DataType.BYTEA) { + public Object read(Group group, int columnIndex, int repeatIndex) { + if (detectedDataType == DataType.BYTEA) { return group.getBinary(columnIndex, repeatIndex).getBytes(); + } else if (detectedDataType == DataType.JSONB) { + return readBSON(group.getBinary(columnIndex, repeatIndex).getBytes()); + } else if (detectedDataType == DataType.INTERVAL) { + // we don't write intervals as binary, so only reading is supported for compatibility with external sources + return ParquetIntervalUtilities.read(group.getBinary(columnIndex, repeatIndex).getBytes()); + } else if (detectedDataType == DataType.UUID) { + // we don't write uuids as binary, so only reading is supported for compatibility with external sources + return ParquetUUIDUtilities.readUUID(group.getBinary(columnIndex, repeatIndex).getBytes()); } else { return group.getString(columnIndex, repeatIndex); } } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - Object value = getValue(group, columnIndex, repeatIndex, primitiveType); - if (primitiveType.getLogicalTypeAnnotation() == null) { + public void write(Group group, int columnIndex, Object fieldValue) { + if (STRING_DATA_TYPES.contains(detectedDataType)) { + String strVal = (String) fieldValue; + /* + * We need to right trim the incoming value from Greenplum. This is + * consistent with the behaviour in Hive, where char fields are right + * trimmed during write. Note that String and varchar Hive types are + * not right trimmed. Hive does not trim tabs or newlines + */ + group.add(columnIndex, dataType == DataType.BPCHAR ? Utilities.rightTrimWhiteSpace(strVal) : strVal); + } else if (detectedDataType == DataType.JSONB) { + String strVal = (String) fieldValue; + group.add(columnIndex, writeBSON(strVal)); + } else if (fieldValue instanceof ByteBuffer) { + ByteBuffer byteBuffer = (ByteBuffer) fieldValue; + group.add(columnIndex, Binary.fromReusedByteArray(byteBuffer.array(), 0, byteBuffer.limit())); + } else { + group.add(columnIndex, Binary.fromReusedByteArray((byte[]) fieldValue)); + } + } + + private static Binary writeBSON(String strVal) { + BasicOutputBuffer outputBuffer = new BasicOutputBuffer(); + BsonBinaryWriter writer = new BsonBinaryWriter(outputBuffer); + EncoderContext encoderContext = EncoderContext.builder().isEncodingCollectibleDocument(true).build(); + BsonDocument bsonDocument = BsonDocument.parse(strVal); + new BsonDocumentCodec().encode(writer, bsonDocument, encoderContext); + return Binary.fromReusedByteArray(outputBuffer.toByteArray()); + } + + private static String readBSON(byte[] bson) { + BsonBinaryReader reader = new BsonBinaryReader(ByteBuffer.wrap(bson)); + BsonDocument bsonDocument = new BsonDocumentCodec().decode(reader, DecoderContext.builder().checkedDiscriminator(false).build()); + return bsonDocument.toJson(); + } + + @Override + public Binary filterValue(String val) { + if (detectedDataType == DataType.BYTEA) { + try { + return Binary.fromReusedByteArray(readByteArray(val)); + } catch (DecoderException e) { + throw new IllegalArgumentException(e); + } + } else if (detectedDataType == DataType.JSONB) { + return writeBSON(val); + } + return Binary.fromString(val); + } + + @Override + public String readFromList(Group group, int columnIndex, int repeatIndex) { + Object value = read(group, columnIndex, repeatIndex); + if (type.getLogicalTypeAnnotation() == null) { ByteBuffer byteBuffer = ByteBuffer.wrap((byte[]) value); return pgUtilities.encodeByteaHex(byteBuffer); } else { diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BooleanParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BooleanParquetTypeConverter.java index a8ce47d756..8cdc4ad1c5 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BooleanParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/BooleanParquetTypeConverter.java @@ -2,29 +2,32 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; -import org.apache.parquet.schema.PrimitiveType; -import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.io.DataType; public class BooleanParquetTypeConverter implements ParquetTypeConverter { @Override - public DataType getDataType(Type type) { + public DataType getDataType() { return DataType.BOOLEAN; } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { + public Object read(Group group, int columnIndex, int repeatIndex) { return group.getBoolean(columnIndex, repeatIndex); } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - jsonNode.add(group.getBoolean(columnIndex, repeatIndex)); + public void write(Group group, int columnIndex, Object fieldValue) { + group.add(columnIndex, (Boolean) fieldValue); } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public Boolean filterValue(String val) { + return val != null ? Boolean.parseBoolean(val) : null; + } + + @Override + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + jsonNode.add(group.getBoolean(columnIndex, repeatIndex)); } } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/DoubleParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/DoubleParquetTypeConverter.java index f76f4865bd..7670b3db49 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/DoubleParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/DoubleParquetTypeConverter.java @@ -2,29 +2,32 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; -import org.apache.parquet.schema.PrimitiveType; -import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.io.DataType; public class DoubleParquetTypeConverter implements ParquetTypeConverter { @Override - public DataType getDataType(Type type) { + public DataType getDataType() { return DataType.FLOAT8; } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { + public Object read(Group group, int columnIndex, int repeatIndex) { return group.getDouble(columnIndex, repeatIndex); } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - jsonNode.add(group.getDouble(columnIndex, repeatIndex)); + public void write(Group group, int columnIndex, Object fieldValue) { + group.add(columnIndex, (Double) fieldValue); } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public Double filterValue(String val) { + return val != null ? Double.parseDouble(val) : null; + } + + @Override + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + jsonNode.add(group.getDouble(columnIndex, repeatIndex)); } } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FixedLenByteArrayParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FixedLenByteArrayParquetTypeConverter.java index f242a47192..761265bcb4 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FixedLenByteArrayParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FixedLenByteArrayParquetTypeConverter.java @@ -1,35 +1,126 @@ package org.greenplum.pxf.plugins.hdfs.parquet.converters; import com.fasterxml.jackson.databind.node.ArrayNode; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.DecoderException; import org.apache.parquet.example.data.Group; +import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.LogicalTypeAnnotation; -import org.apache.parquet.schema.PrimitiveType; import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.io.DataType; +import org.greenplum.pxf.plugins.hdfs.parquet.ParquetFixedLenByteArrayUtilities; +import org.greenplum.pxf.plugins.hdfs.parquet.ParquetIntervalUtilities; +import org.greenplum.pxf.plugins.hdfs.parquet.ParquetUUIDUtilities; +import org.greenplum.pxf.plugins.hdfs.utilities.DecimalUtilities; import java.math.BigDecimal; import java.math.BigInteger; +import static org.greenplum.pxf.plugins.hdfs.parquet.ParquetIntervalUtilities.INTERVAL_TYPE_LENGTH; + +@Slf4j public class FixedLenByteArrayParquetTypeConverter implements ParquetTypeConverter { + private final Type type; + private final DataType dataType; + private final DataType detectedDataType; + private final DecimalUtilities decimalUtilities; + + public FixedLenByteArrayParquetTypeConverter(Type type, DataType dataType, DecimalUtilities decimalUtilities) { + this.type = type; + this.dataType = dataType; + this.decimalUtilities = decimalUtilities; + this.detectedDataType = detectDataType(); + } + + private DataType detectDataType() { + LogicalTypeAnnotation logicalTypeAnnotation = type.getLogicalTypeAnnotation(); + if (logicalTypeAnnotation instanceof LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) { + return DataType.NUMERIC; + } else if (logicalTypeAnnotation instanceof LogicalTypeAnnotation.IntervalLogicalTypeAnnotation + || (dataType == DataType.INTERVAL && type.asPrimitiveType().getTypeLength() == INTERVAL_TYPE_LENGTH)) { + return DataType.INTERVAL; + } else if (logicalTypeAnnotation instanceof LogicalTypeAnnotation.UUIDLogicalTypeAnnotation + || (dataType == DataType.UUID && type.asPrimitiveType().getTypeLength() == LogicalTypeAnnotation.UUIDLogicalTypeAnnotation.BYTES)) { + return DataType.UUID; + } else { + return DataType.BYTEA; + } + } + + @Override + public DataType getDataType() { + return detectedDataType; + } + @Override - public DataType getDataType(Type type) { - return DataType.NUMERIC; + public Object read(Group group, int columnIndex, int repeatIndex) { + if (detectedDataType == DataType.NUMERIC) { + int scale = ((LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation()).getScale(); + return new BigDecimal(new BigInteger(group.getBinary(columnIndex, repeatIndex).getBytes()), scale); + } else if (detectedDataType == DataType.INTERVAL) { + return ParquetIntervalUtilities.read(group.getBinary(columnIndex, repeatIndex).getBytes()); + } else if (detectedDataType == DataType.UUID) { + return ParquetUUIDUtilities.readUUID(group.getBinary(columnIndex, repeatIndex).getBytes()); + } else { + return group.getBinary(columnIndex, repeatIndex).getBytes(); + } } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { - int scale = ((LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation()).getScale(); - return new BigDecimal(new BigInteger(group.getBinary(columnIndex, repeatIndex).getBytes()), scale); + public void write(Group group, int columnIndex, Object fieldValue) { + Binary value = writeValue(fieldValue, String.valueOf(columnIndex)); + if (value != null) { + group.add(columnIndex, value); + } } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - jsonNode.add((BigDecimal) getValue(group, columnIndex, repeatIndex, type)); + public Binary filterValue(String val) { + if (val == null) { + return null; + } + if (detectedDataType == DataType.BYTEA) { + try { + return writeValue(readByteArray(val), ""); + } catch (DecoderException e) { + throw new IllegalArgumentException("Couldn't decode byte array sequence for value " + val); + } + } + return writeValue(val, FILTER_COLUMN); + } + + private Binary writeValue(Object fieldValue, String columnIndex) { + if (detectedDataType == DataType.NUMERIC) { + byte[] fixedLenByteArray = getDecimalFixedLenByteArray((String) fieldValue, type, columnIndex); + if (fixedLenByteArray == null) { + return null; + } + return Binary.fromReusedByteArray(fixedLenByteArray); + } else if (detectedDataType == DataType.INTERVAL) { + return ParquetIntervalUtilities.write((String) fieldValue); + } else if (detectedDataType == DataType.UUID) { + return ParquetUUIDUtilities.writeUUID((String) fieldValue); + } else { + return Binary.fromReusedByteArray((byte[]) fieldValue); + } + } + + private byte[] getDecimalFixedLenByteArray(String value, Type type, String columnName) { + return ParquetFixedLenByteArrayUtilities.convertFromBigDecimal(decimalUtilities, value, columnName, + (LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation()); } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + Object val = read(group, columnIndex, repeatIndex); + if (detectedDataType == DataType.NUMERIC) { + jsonNode.add((BigDecimal) val); + } else if (detectedDataType == DataType.INTERVAL || detectedDataType == DataType.UUID) { + jsonNode.add((String) val); + } else { + jsonNode.add((byte[]) val); + } + } } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FloatParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FloatParquetTypeConverter.java index e5921d3d6c..d34442b0a2 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FloatParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/FloatParquetTypeConverter.java @@ -2,29 +2,32 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; -import org.apache.parquet.schema.PrimitiveType; -import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.io.DataType; public class FloatParquetTypeConverter implements ParquetTypeConverter { @Override - public DataType getDataType(Type type) { + public DataType getDataType() { return DataType.REAL; } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { + public Object read(Group group, int columnIndex, int repeatIndex) { return group.getFloat(columnIndex, repeatIndex); } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - jsonNode.add(group.getFloat(columnIndex, repeatIndex)); + public void write(Group group, int columnIndex, Object fieldValue) { + group.add(columnIndex, (Float) fieldValue); } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public Float filterValue(String val) { + return val != null ? Float.parseFloat(val) : null; + } + + @Override + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + jsonNode.add(group.getFloat(columnIndex, repeatIndex)); } } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int32ParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int32ParquetTypeConverter.java index 9c06260f7b..39463fa76c 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int32ParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int32ParquetTypeConverter.java @@ -3,22 +3,46 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; import org.apache.parquet.schema.LogicalTypeAnnotation; -import org.apache.parquet.schema.PrimitiveType; import org.apache.parquet.schema.Type; +import org.greenplum.pxf.api.GreenplumDateTime; import org.greenplum.pxf.api.io.DataType; +import org.greenplum.pxf.plugins.hdfs.parquet.ParquetTimestampUtilities; import java.math.BigDecimal; import java.math.BigInteger; +import java.math.MathContext; +import java.math.RoundingMode; +import java.time.LocalTime; +import java.time.temporal.ChronoField; +import java.util.Objects; + +import static org.greenplum.pxf.api.GreenplumDateTime.NANOS_IN_MILLIS; public class Int32ParquetTypeConverter implements ParquetTypeConverter { + private final Type type; + private final DataType dataType; + private final DataType detectedDataType; + + public Int32ParquetTypeConverter(Type type, DataType dataType) { + this.type = type; + this.dataType = dataType; + this.detectedDataType = detectDataType(); + } + @Override - public DataType getDataType(Type type) { + public DataType getDataType() { + return detectedDataType; + } + + private DataType detectDataType() { LogicalTypeAnnotation originalType = type.getLogicalTypeAnnotation(); if (originalType instanceof LogicalTypeAnnotation.DateLogicalTypeAnnotation) { return DataType.DATE; } else if (originalType instanceof LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) { return DataType.NUMERIC; + } else if (originalType instanceof LogicalTypeAnnotation.TimeLogicalTypeAnnotation) { + return DataType.TIME; } else if (originalType instanceof LogicalTypeAnnotation.IntLogicalTypeAnnotation) { LogicalTypeAnnotation.IntLogicalTypeAnnotation intType = (LogicalTypeAnnotation.IntLogicalTypeAnnotation) originalType; if (intType.getBitWidth() == 8 || intType.getBitWidth() == 16) { @@ -29,34 +53,90 @@ public DataType getDataType(Type type) { } @Override - @SuppressWarnings("deprecation") - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { - int result = group.getInteger(columnIndex, repeatIndex); - LogicalTypeAnnotation originalType = type.getLogicalTypeAnnotation(); - if (originalType instanceof LogicalTypeAnnotation.DateLogicalTypeAnnotation) { - return new org.apache.hadoop.hive.serde2.io.DateWritable(result).get(true); - } else if (originalType instanceof LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) { - return bigDecimalFromLong((LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) originalType, result); - } else if (originalType instanceof LogicalTypeAnnotation.IntLogicalTypeAnnotation) { - LogicalTypeAnnotation.IntLogicalTypeAnnotation intType = (LogicalTypeAnnotation.IntLogicalTypeAnnotation) originalType; - if (intType.getBitWidth() == 8 || intType.getBitWidth() == 16) { - return (short) result; - } + public void write(Group group, int columnIndex, Object fieldValue) { + group.add(columnIndex, writeValue(fieldValue)); + } + + @Override + public Integer filterValue(String val) { + if (detectedDataType == DataType.SMALLINT || detectedDataType == DataType.INTEGER) { + return Integer.parseInt(val); + } + return writeValue(val); + } + + private int writeValue(Object fieldValue) { + if (detectedDataType == DataType.DATE) { + String dateString = (String) fieldValue; + return ParquetTimestampUtilities.getDaysFromEpochFromDateString(dateString); + } else if (detectedDataType == DataType.SMALLINT) { + return ((Number) fieldValue).shortValue(); + } else if (detectedDataType == DataType.NUMERIC) { + LogicalTypeAnnotation.DecimalLogicalTypeAnnotation anno32 = (LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); + return strToDecimal32((String) fieldValue, anno32); + } else if (detectedDataType == DataType.TIME) { + String timeValue = (String) fieldValue; + return writeTimeValue(timeValue); + } else { + return (Integer) fieldValue; } - return result; + } + + /** + * Converts a "time" string to a INT32. + * + * Times with time zone are not supported + * https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_timetz + * + * @param timeValue the greenplum string of the timestamp with the time zone + * @return # of time units provided by logical type annotation since Unix epoch + */ + private int writeTimeValue(String timeValue) { + LocalTime time = LocalTime.parse(timeValue, GreenplumDateTime.TIME_FORMATTER); + LogicalTypeAnnotation.TimeLogicalTypeAnnotation timeAnno = (LogicalTypeAnnotation.TimeLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); + if (Objects.requireNonNull(timeAnno.getUnit()) == LogicalTypeAnnotation.TimeUnit.MILLIS) { + return (int) time.getLong(ChronoField.MILLI_OF_DAY); + } + throw new IllegalArgumentException("Unsupported time unit " + timeAnno.getUnit()); } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - jsonNode.add(group.getInteger(columnIndex, repeatIndex)); + @SuppressWarnings("deprecation") + public Object read(Group group, int columnIndex, int repeatIndex) { + int value = group.getInteger(columnIndex, repeatIndex); + if (detectedDataType == DataType.DATE) { + return new org.apache.hadoop.hive.serde2.io.DateWritable(value).get(true); + } else if (detectedDataType == DataType.NUMERIC) { + return bigDecimalFromLong((LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation(), value); + } else if (detectedDataType == DataType.TIME) { + return readTime(value); + } else if (detectedDataType == DataType.SMALLINT) { + return (short) value; + } + return value; + } + + private String readTime(int value) { + LogicalTypeAnnotation.TimeLogicalTypeAnnotation timeAnno = (LogicalTypeAnnotation.TimeLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); + LocalTime time; + if (Objects.requireNonNull(timeAnno.getUnit()) == LogicalTypeAnnotation.TimeUnit.MILLIS) { + time = LocalTime.ofNanoOfDay((long) value * NANOS_IN_MILLIS); + } else { + throw new IllegalArgumentException("Unsupported time unit " + timeAnno.getUnit()); + } + return time.format(GreenplumDateTime.TIME_FORMATTER); } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + jsonNode.add(group.getInteger(columnIndex, repeatIndex)); } private BigDecimal bigDecimalFromLong(LogicalTypeAnnotation.DecimalLogicalTypeAnnotation decimalType, long value) { - return new BigDecimal(BigInteger.valueOf(value), decimalType.getScale()); + return new BigDecimal(BigInteger.valueOf(value), decimalType.getScale(), MathContext.DECIMAL32); + } + + private static int strToDecimal32(String fieldValue, LogicalTypeAnnotation.DecimalLogicalTypeAnnotation anno32) { + return new BigDecimal(fieldValue, MathContext.DECIMAL32).setScale(anno32.getScale(), RoundingMode.HALF_EVEN).unscaledValue().intValue(); } } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int64ParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int64ParquetTypeConverter.java index 9baf83dab9..f063300c29 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int64ParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int64ParquetTypeConverter.java @@ -3,57 +3,149 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; import org.apache.parquet.schema.LogicalTypeAnnotation; -import org.apache.parquet.schema.PrimitiveType; import org.apache.parquet.schema.Type; +import org.greenplum.pxf.api.GreenplumDateTime; import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.plugins.hdfs.parquet.ParquetTimestampUtilities; import java.math.BigDecimal; import java.math.BigInteger; +import java.math.MathContext; +import java.math.RoundingMode; +import java.time.LocalTime; +import java.time.temporal.ChronoField; + +import static org.greenplum.pxf.api.GreenplumDateTime.NANOS_IN_MICROS; +import static org.greenplum.pxf.plugins.hdfs.ParquetResolver.TIMESTAMP_PATTERN; public class Int64ParquetTypeConverter implements ParquetTypeConverter { private final boolean useLocalPxfTimezoneRead; + private final boolean useLocalPxfTimezoneWrite; + private final Type type; + private final DataType dataType; + private final DataType detectedDataType; - public Int64ParquetTypeConverter(boolean useLocalPxfTimezoneRead) { + public Int64ParquetTypeConverter(Type type, DataType dataType, boolean useLocalPxfTimezoneRead, boolean useLocalPxfTimezoneWrite) { + this.type = type; + this.dataType = dataType; this.useLocalPxfTimezoneRead = useLocalPxfTimezoneRead; + this.useLocalPxfTimezoneWrite = useLocalPxfTimezoneWrite; + this.detectedDataType = detectDataType(); } @Override - public DataType getDataType(Type type) { + public DataType getDataType() { + return detectedDataType; + } + + public DataType detectDataType() { if (type.getLogicalTypeAnnotation() instanceof LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) { return DataType.NUMERIC; } else if (type.getLogicalTypeAnnotation() instanceof LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) { - return DataType.TIMESTAMP; + return dataType == DataType.TIMESTAMP_WITH_TIME_ZONE ? DataType.TIMESTAMP_WITH_TIME_ZONE : DataType.TIMESTAMP; + } else if (type.getLogicalTypeAnnotation() instanceof LogicalTypeAnnotation.TimeLogicalTypeAnnotation || dataType == DataType.TIME) { + return DataType.TIME; } return DataType.BIGINT; } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { + public Object read(Group group, int columnIndex, int repeatIndex) { long value = group.getLong(columnIndex, repeatIndex); - if (type.getLogicalTypeAnnotation() instanceof LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) { + if (detectedDataType == DataType.NUMERIC) { return bigDecimalFromLong((LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation(), value); - } - if (type.getLogicalTypeAnnotation() instanceof LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) { - LogicalTypeAnnotation.TimestampLogicalTypeAnnotation originalType = (LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); - return ParquetTimestampUtilities.getTimestampFromLong(value, originalType.getUnit(), useLocalPxfTimezoneRead); + } else if (detectedDataType == DataType.TIMESTAMP || detectedDataType == DataType.TIMESTAMP_WITH_TIME_ZONE) { + LogicalTypeAnnotation.TimestampLogicalTypeAnnotation tsAnno = (LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); + return ParquetTimestampUtilities.getTimestampFromLong(value, tsAnno.getUnit(), useLocalPxfTimezoneRead, detectedDataType == DataType.TIMESTAMP_WITH_TIME_ZONE); + } else if (detectedDataType == DataType.TIME) { + return readTime(value); } return value; } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - if (type.getLogicalTypeAnnotation() instanceof LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) { - String timestamp = (String) getValue(group, columnIndex, repeatIndex, type); - jsonNode.add(timestamp); + public void write(Group group, int columnIndex, Object fieldValue) { + group.add(columnIndex, writeValue(fieldValue)); + } + + @Override + public Long filterValue(String val) { + if (detectedDataType == DataType.BIGINT) { + return Long.parseLong(val); + } + return writeValue(val); + } + + private long writeValue(Object fieldValue) { + if (detectedDataType == DataType.TIMESTAMP || detectedDataType == DataType.TIMESTAMP_WITH_TIME_ZONE) { + String timestamp = (String) fieldValue; + boolean isTimestampWithTimeZone = TIMESTAMP_PATTERN.matcher(timestamp).find(); + return ParquetTimestampUtilities + .getLongFromTimestamp(timestamp, useLocalPxfTimezoneWrite, isTimestampWithTimeZone); + } else if (detectedDataType == DataType.NUMERIC) { + String decimalValue = (String) fieldValue; + LogicalTypeAnnotation.DecimalLogicalTypeAnnotation decimalAnno = (LogicalTypeAnnotation.DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); + return new BigDecimal(decimalValue, MathContext.DECIMAL64).setScale(decimalAnno.getScale(), RoundingMode.HALF_EVEN).unscaledValue().longValue(); + } else if (detectedDataType == DataType.TIME) { + String timeValue = (String) fieldValue; + return writeTimeValue(timeValue); } else { - jsonNode.add(group.getLong(columnIndex, repeatIndex)); + return (Long) fieldValue; + } + } + + private String readTime(long value) { + LogicalTypeAnnotation.TimeLogicalTypeAnnotation timeAnno = (LogicalTypeAnnotation.TimeLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); + if (timeAnno == null) { + return LocalTime.ofNanoOfDay(value * NANOS_IN_MICROS).format(GreenplumDateTime.TIME_FORMATTER); + } + LocalTime time; + switch (timeAnno.getUnit()) { + case NANOS: + time = LocalTime.ofNanoOfDay(value); + break; + case MICROS: + time = LocalTime.ofNanoOfDay(value * NANOS_IN_MICROS); + break; + default: + throw new IllegalArgumentException("Unsupported time unit " + timeAnno.getUnit()); + } + return time.format(GreenplumDateTime.TIME_FORMATTER); + } + + /** + * Converts a "time" string to a INT64. + * + * Times with time zone are not supported + * https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_timetz + * + * @param timeValue the greenplum string of the timestamp with the time zone + * @return # of time units provided by logical type annotation since Unix epoch + */ + private long writeTimeValue(String timeValue) { + LocalTime time = LocalTime.parse(timeValue, GreenplumDateTime.TIME_FORMATTER); + LogicalTypeAnnotation.TimeLogicalTypeAnnotation timeAnno = (LogicalTypeAnnotation.TimeLogicalTypeAnnotation) type.getLogicalTypeAnnotation(); + if (timeAnno == null) { + return time.getLong(ChronoField.MICRO_OF_DAY); + } + switch (timeAnno.getUnit()) { + case NANOS: + return time.getLong(ChronoField.NANO_OF_DAY); + case MICROS: + return time.getLong(ChronoField.MICRO_OF_DAY); + default: + throw new IllegalArgumentException("Unsupported time unit " + timeAnno.getUnit()); } } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + if (detectedDataType == DataType.TIMESTAMP || detectedDataType == DataType.TIMESTAMP_WITH_TIME_ZONE) { + String timestamp = (String) read(group, columnIndex, repeatIndex); + jsonNode.add(timestamp); + } else { + jsonNode.add(group.getLong(columnIndex, repeatIndex)); + } } private BigDecimal bigDecimalFromLong(LogicalTypeAnnotation.DecimalLogicalTypeAnnotation decimalType, long value) { diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int96ParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int96ParquetTypeConverter.java index d629d49476..f22c000136 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int96ParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/Int96ParquetTypeConverter.java @@ -2,37 +2,48 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; -import org.apache.parquet.schema.PrimitiveType; -import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.plugins.hdfs.parquet.ParquetTimestampUtilities; +import static org.greenplum.pxf.plugins.hdfs.ParquetResolver.TIMESTAMP_PATTERN; + public class Int96ParquetTypeConverter implements ParquetTypeConverter { private final boolean useLocalPxfTimezoneRead; + private final boolean useLocalPxfTimezoneWrite; - public Int96ParquetTypeConverter(boolean useLocalPxfTimezoneRead) { + public Int96ParquetTypeConverter(boolean useLocalPxfTimezoneRead, boolean useLocalPxfTimezoneWrite) { this.useLocalPxfTimezoneRead = useLocalPxfTimezoneRead; + this.useLocalPxfTimezoneWrite = useLocalPxfTimezoneWrite; } @Override - public DataType getDataType(Type type) { + public DataType getDataType() { return DataType.TIMESTAMP; } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { + public String read(Group group, int columnIndex, int repeatIndex) { return ParquetTimestampUtilities.bytesToTimestamp(group.getInt96(columnIndex, repeatIndex).getBytes(), useLocalPxfTimezoneRead); } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - String timestamp = (String) getValue(group, columnIndex, repeatIndex, type); - jsonNode.add(timestamp); + public void write(Group group, int columnIndex, Object fieldValue) { + // SQL standard timestamp string value with or without time zone literals: https://www.postgresql.org/docs/9.4/datatype-datetime.html + String timestamp = (String) fieldValue; + if (TIMESTAMP_PATTERN.matcher(timestamp).find()) { + // Note: this conversion convert type "timestamp with time zone" will lose timezone information + // while preserving the correct value. (as Parquet doesn't support timestamp with time zone) + group.add(columnIndex, ParquetTimestampUtilities.getBinaryFromTimestampWithTimeZone(timestamp)); + } else { + group.add(columnIndex, ParquetTimestampUtilities.getBinaryFromTimestamp(timestamp, useLocalPxfTimezoneWrite)); + } } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + String timestamp = read(group, columnIndex, repeatIndex); + jsonNode.add(timestamp); } + } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ListParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ListParquetTypeConverter.java index a4b67ed5d6..4387bc30c6 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ListParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ListParquetTypeConverter.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; import org.apache.parquet.schema.GroupType; +import org.apache.parquet.schema.LogicalTypeAnnotation; import org.apache.parquet.schema.PrimitiveType; import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.error.UnsupportedTypeException; @@ -12,34 +13,46 @@ import org.greenplum.pxf.plugins.hdfs.utilities.PgArrayBuilder; import org.greenplum.pxf.plugins.hdfs.utilities.PgUtilities; +import java.util.List; + public class ListParquetTypeConverter implements ParquetTypeConverter { - private final ParquetTypeConverterFactory parquetTypeConverterFactory; + private final Type type; + private final Type elementType; + private final DataType dataType; + private final ParquetTypeConverter elementConverter; private final PgUtilities pgUtilities; + private final ParquetUtilities parquetUtilities; - public ListParquetTypeConverter(ParquetTypeConverterFactory parquetTypeConverterFactory) { - this.parquetTypeConverterFactory = parquetTypeConverterFactory; + public ListParquetTypeConverter(Type type, DataType dataType, ParquetTypeConverterFactory parquetTypeConverterFactory) { + this.type = type; + this.dataType = dataType; + this.elementType = getElementType(type.asGroupType()); + validateElementTypeInListType(elementType); + this.elementConverter = parquetTypeConverterFactory.create(elementType, dataType.isArrayType() ? dataType.getTypeElem() : dataType); this.pgUtilities = new PgUtilities(); + this.parquetUtilities = new ParquetUtilities(pgUtilities); } @Override - public DataType getDataType(Type type) { - Type elementType = getElementType(type.asGroupType()); - validateElementTypeInListType(elementType); - return parquetTypeConverterFactory.create(elementType).getDataType(elementType).getTypeArray(); + public DataType getDataType() { + DataType converterDataType = elementConverter.getDataType(); + // multidimensional arrays in gpdb don't have separate oids, they have the same oid as corresponding array type + // independent of number of dimensions + if (converterDataType.isArrayType()) { + return converterDataType; + } + return converterDataType.getTypeArray(); } @Override - public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) { + public Object read(Group group, int columnIndex, int repeatIndex) { PgArrayBuilder pgArrayBuilder = new PgArrayBuilder(pgUtilities); pgArrayBuilder.startArray(); Group listGroup = group.getGroup(columnIndex, repeatIndex); // a listGroup can have any number of repeatedGroups int repetitionCount = listGroup.getFieldRepetitionCount(0); - Type elementType = getElementType(type.asGroupType()); - validateElementTypeInListType(elementType); - ParquetTypeConverter elementConverter = parquetTypeConverterFactory.create(elementType); - boolean elementNeedsEscapingInArray = elementConverter.getDataType(elementType).getNeedsEscapingInArray(); + boolean elementNeedsEscapingInArray = elementConverter.getDataType().getNeedsEscapingInArray(); for (int i = 0; i < repetitionCount; i++) { Group repeatedGroup = listGroup.getGroup(0, i); @@ -49,8 +62,8 @@ public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) pgArrayBuilder.addElement((String) null); } else { // add the non-null element into array - String elementValue = elementConverter.getValueFromList(repeatedGroup, 0, 0, elementType.asPrimitiveType()); - pgArrayBuilder.addElement(elementValue, elementNeedsEscapingInArray); + String elementValue = elementConverter.readFromList(repeatedGroup, 0, 0); + pgArrayBuilder.addElement(elementValue, elementType.isPrimitive() && elementNeedsEscapingInArray); } } pgArrayBuilder.endArray(); @@ -58,16 +71,64 @@ public Object getValue(Group group, int columnIndex, int repeatIndex, Type type) } @Override - public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode) { - String complexTypeName = type.asGroupType().getOriginalType() == null ? - "customized struct" : - type.asGroupType().getOriginalType().name(); + public void write(Group group, int columnIndex, Object fieldValue) { + LogicalTypeAnnotation logicalTypeAnnotation = type.getLogicalTypeAnnotation(); + if (logicalTypeAnnotation == null) { + throw new UnsupportedTypeException("Parquet group type without logical annotation is not supported"); + } + + if (logicalTypeAnnotation != LogicalTypeAnnotation.listType()) { + throw new UnsupportedTypeException(String.format("Parquet complex type %s is not supported", logicalTypeAnnotation)); + } + /* + * https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#lists + * Parquet LIST must always annotate a 3-level structure: + * group (LIST) { // listType, a listType always has only 1 repeatedType + * repeated group list { // repeatedType, a repeatedType always has only 1 element type + * element; // elementType + * } + * } + */ + GroupType listType = type.asGroupType(); + GroupType repeatedType = listType.getType(0).asGroupType(); + PrimitiveType elementType = repeatedType.getType(0).asPrimitiveType(); + // Decode Postgres String representation of an array into a list of Objects + List values = parquetUtilities.parsePostgresArray(fieldValue.toString(), elementType.getPrimitiveTypeName(), elementType.getLogicalTypeAnnotation()); + + /* + * For example, the value of a text array ["hello","",null,"test"] would look like: + * text_arr + * list + * element: hello + * list + * element: --> empty element "" + * list --> NULL element + * list + * element: test + */ + Group listGroup = group.addGroup(columnIndex); + for (Object value : values) { + Group repeatedGroup = listGroup.addGroup(0); + if (value != null) { + elementConverter.write(repeatedGroup, 0, value); + } + } + } + + @Override + public Object filterValue(String val) { + throw new UnsupportedOperationException("Filtering on list values is unsupported for column " + FILTER_COLUMN); + } + + @Override + public void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode) { + String complexTypeName = getComplexTypeName(type.asGroupType()); throw new UnsupportedTypeException(String.format("Parquet LIST of %s is not supported.", complexTypeName)); } @Override - public String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType) { - return String.valueOf(getValue(group, columnIndex, repeatIndex, primitiveType)); + public String readFromList(Group group, int columnIndex, int repeatIndex) { + return String.valueOf(read(group, columnIndex, repeatIndex)); } /* @@ -96,8 +157,9 @@ private Type getElementType(GroupType listType) { * * @param elementType the element type of Parquet List type */ + @SuppressWarnings("deprecation") private void validateElementTypeInListType(Type elementType) { - if (!elementType.isPrimitive()) { + if (!elementType.isPrimitive() && !org.apache.parquet.schema.OriginalType.LIST.equals(elementType.asGroupType().getOriginalType())) { String complexTypeName = getComplexTypeName(elementType.asGroupType()); throw new UnsupportedTypeException(String.format("Parquet LIST of %s is not supported.", complexTypeName)); } diff --git a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ParquetTypeConverter.java b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ParquetTypeConverter.java index 1991bbfe10..b82b37f126 100644 --- a/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ParquetTypeConverter.java +++ b/server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/converters/ParquetTypeConverter.java @@ -1,18 +1,38 @@ package org.greenplum.pxf.plugins.hdfs.parquet.converters; import com.fasterxml.jackson.databind.node.ArrayNode; +import org.apache.commons.codec.DecoderException; +import org.apache.commons.codec.binary.Hex; import org.apache.parquet.example.data.Group; -import org.apache.parquet.schema.PrimitiveType; -import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.io.DataType; +import java.nio.charset.StandardCharsets; + public interface ParquetTypeConverter { + String HEX_PREPEND = "\\x"; + String HEX_PREPEND_2 = "\\\\x"; + String FILTER_COLUMN = "~~filter~~"; + + DataType getDataType(); + + Object read(Group group, int columnIndex, int repeatIndex); - DataType getDataType(Type type); + void write(Group group, int columnIndex, Object fieldValue); - Object getValue(Group group, int columnIndex, int repeatIndex, Type type); + default Object filterValue(String val) { + return val; + } + + default byte[] readByteArray(String val) throws DecoderException { + int beginIndex = val.startsWith(HEX_PREPEND) ? HEX_PREPEND.length() : (val.startsWith(HEX_PREPEND_2) ? HEX_PREPEND.length() : -1); + if (beginIndex > 0) { + return Hex.decodeHex(val.substring(beginIndex)); + } else { + return val.getBytes(StandardCharsets.UTF_8); + } + } - void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, Type type, ArrayNode jsonNode); + void addValueToJsonArray(Group group, int columnIndex, int repeatIndex, ArrayNode jsonNode); /** * Get the String value of each primitive element from the list @@ -20,8 +40,9 @@ public interface ParquetTypeConverter { * @param group contains parquet schema and data for a row * @param columnIndex is the index of the column in the row that needs to be resolved * @param repeatIndex is the index of each repeated group in the list group at the column - * @param primitiveType is the primitive type of the primitive element we are going to get * @return the String value of the primitive element */ - String getValueFromList(Group group, int columnIndex, int repeatIndex, PrimitiveType primitiveType); + default String readFromList(Group group, int columnIndex, int repeatIndex) { + return String.valueOf(read(group, columnIndex, repeatIndex)); + } } diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetResolverTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetResolverTest.java index fb4053eb08..a666d3d060 100644 --- a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetResolverTest.java +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetResolverTest.java @@ -784,17 +784,17 @@ public void testGetFields_Unsupported_Map_List() { @Test @SuppressWarnings("deprecation") - public void testGetFields_Unsupported_List_List() { + public void testGetFields_List_List() { List columnDescriptors = new ArrayList<>(); - ColumnDescriptor listColumnDescriptor = new ColumnDescriptor("unsupported_list", -1, 1, "", new Integer[]{}); + ColumnDescriptor listColumnDescriptor = new ColumnDescriptor("supported_list", -1, 1, "", new Integer[]{}); columnDescriptors.add(listColumnDescriptor); // LIST of LIST - schema = getParquetSchemaForUnsupportedListType()[2]; + schema = getListOfList(); // schema has changed, set metadata again context.setMetadata(schema); columnDescriptors = new ArrayList<>(); - listColumnDescriptor = new ColumnDescriptor("unsupported_list", -1, 1, "", new Integer[]{}); + listColumnDescriptor = new ColumnDescriptor("supported_list", DataType.INTEGER.getOID(), 1, "", new Integer[]{}); columnDescriptors.add(listColumnDescriptor); context.setTupleDescription(columnDescriptors); resolver.setRequestContext(context); @@ -805,6 +805,7 @@ public void testGetFields_Unsupported_List_List() { GroupType innerListElementGroupType = new GroupType(Type.Repetition.OPTIONAL, "element", innerListElementFields); Group innerListElementGroup = new SimpleGroup(innerListElementGroupType); + innerListElementGroup.add("id", 666); GroupType innerListRepeatedGroupType = new GroupType(Type.Repetition.REPEATED, "inner_repeated_list", innerListElementGroupType); Group innerRepeatedGroup = new SimpleGroup(innerListRepeatedGroupType); @@ -824,10 +825,10 @@ public void testGetFields_Unsupported_List_List() { List groups = new ArrayList<>(); groups.add(listGroup); - - Exception e = assertThrows(UnsupportedTypeException.class, - () -> assertRow(groups, 0, 1)); - assertEquals("Parquet LIST of LIST is not supported.", e.getMessage()); + List fields = assertRow(groups, 0, 1); + assertEquals(fields.size(), 1); + assertEquals("{{666}}", fields.get(0).val); + assertEquals(DataType.INT4ARRAY.getOID(), fields.get(0).type); } @Test @@ -837,7 +838,7 @@ public void testGetFields_Unsupported_Complex() { context.setMetadata(schema); Exception e = assertThrows(UnsupportedTypeException.class, () -> context.setTupleDescription(getColumnDescriptorsFromSchema(schema))); - assertEquals("Parquet complex type MAP is not supported, error: java.lang.IllegalArgumentException: No enum constant org.greenplum.pxf.plugins.hdfs.parquet.PxfParquetType.MAP", e.getMessage()); + assertEquals("Parquet complex type converter [MAP] is not supported", e.getMessage()); } @Test @@ -978,7 +979,7 @@ private GroupType generateListSchema(Type.Repetition groupRepetition, String rep @SuppressWarnings("deprecation") private MessageType[] getParquetSchemaForUnsupportedListType() { - MessageType[] messageTypes = new MessageType[3]; + MessageType[] messageTypes = new MessageType[2]; // List of customized Struct List structFields = new ArrayList<>(); @@ -1009,6 +1010,14 @@ private MessageType[] getParquetSchemaForUnsupportedListType() { fields.add(listGroupType); messageTypes[1] = new MessageType("spark_schema", fields); + return messageTypes; + } + + @SuppressWarnings("deprecation") + private static MessageType getListOfList() { + GroupType listGroupType; + GroupType listRepeatedGroupType; + List fields; // List of List List innerListElementFields = new ArrayList<>(); @@ -1021,8 +1030,7 @@ private MessageType[] getParquetSchemaForUnsupportedListType() { fields = new ArrayList<>(); fields.add(listGroupType); - messageTypes[2] = new MessageType("spark_schema", fields); - return messageTypes; + return new MessageType("spark_schema", fields); } @SuppressWarnings("deprecation") @@ -1067,8 +1075,8 @@ private List getColumnDescriptorsFromSchema(MessageType schema .map(f -> { Type type = f.isPrimitive() ? f.asPrimitiveType() : f.asGroupType(); ParquetConfig parquetConfig = ParquetConfig.builder().build(); - ParquetTypeConverter converter = new ParquetTypeConverterFactory(parquetConfig).create(type); - return new ColumnDescriptor(f.getName(), converter.getDataType(f).getOID(), 1, "", new Integer[]{}); + ParquetTypeConverter converter = new ParquetTypeConverterFactory(parquetConfig).create(type, DataType.UNSUPPORTED_TYPE); + return new ColumnDescriptor(f.getName(), converter.getDataType().getOID(), 1, "", new Integer[]{}); }) .collect(Collectors.toList()); } diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetWriteTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetWriteTest.java index 01135b9dea..aa6ea3300f 100644 --- a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetWriteTest.java +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/ParquetWriteTest.java @@ -614,7 +614,7 @@ public void testWriteTimestampWithInt64() throws Exception { ParquetConfig config = ParquetConfig.builder() .useLocalPxfTimezoneRead(DEFAULT_USE_LOCAL_PXF_TIMEZONE_READ) .build(); - ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type); + ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type, DataType.TIMESTAMP); assertTrue(converter instanceof Int64ParquetTypeConverter); for (int i = 0; i < 10; i++) { @@ -678,7 +678,7 @@ public void testWriteTimestampWithInt64DisableUseLocalPxfTimezoneForReadAndWrite ParquetConfig config = ParquetConfig.builder() .useLocalPxfTimezoneRead(false) .build(); - ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type); + ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type, DataType.TIMESTAMP); assertTrue(converter instanceof Int64ParquetTypeConverter); // We don't use PXF local server time zone for write and read. So, the timestamp will be the same. @@ -743,7 +743,7 @@ public void testWriteTimestampWithInt64DisableUseLocalPxfTimezoneForWrite() thro ParquetConfig config = ParquetConfig.builder() .useLocalPxfTimezoneRead(DEFAULT_USE_LOCAL_PXF_TIMEZONE_READ) .build(); - ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type); + ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type, DataType.TIMESTAMP); assertTrue(converter instanceof Int64ParquetTypeConverter); // For write operation we didn't use local time zone. So, the timestamp was saved as is. @@ -810,7 +810,7 @@ public void testWriteTimestampWithInt64DisableUseLocalPxfTimezoneForRead() throw ParquetConfig config = ParquetConfig.builder() .useLocalPxfTimezoneRead(false) .build(); - ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type); + ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type, DataType.TIMESTAMP); assertTrue(converter instanceof Int64ParquetTypeConverter); // For write operation we used default pxf server time zone to convert the timestamp from the local time to the UTC. @@ -2123,7 +2123,7 @@ public void testWriteTimestampWithTimezoneInt64() throws Exception { ParquetConfig config = ParquetConfig.builder() .useLocalPxfTimezoneRead(DEFAULT_USE_LOCAL_PXF_TIMEZONE_READ) .build(); - ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type); + ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type, DataType.TIMESTAMP); assertTrue(converter instanceof Int64ParquetTypeConverter); // For write operation we always convert the timestamp to UTC using the offset from GP. @@ -2194,7 +2194,7 @@ public void testWriteTimestampWithTimezoneInt64DisableUseLocalPxfTimezoneForRead ParquetConfig config = ParquetConfig.builder() .useLocalPxfTimezoneRead(false) .build(); - ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type); + ParquetTypeConverter converter = new ParquetTypeConverterFactory(config).create(type, DataType.TIMESTAMP); assertTrue(converter instanceof Int64ParquetTypeConverter); // For write operation we always convert the timestamp to UTC using the offset from GP. diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetBaseTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetBaseTest.java index 1505157015..7314b3aa34 100644 --- a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetBaseTest.java +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetBaseTest.java @@ -18,7 +18,9 @@ public class ParquetBaseTest { protected static final TreeTraverser TRAVERSER = new TreeTraverser(); protected Map originalFieldsMap; + protected Map extendedOriginalFieldsMap; protected List columnDescriptors; + protected List extendedColumnDescriptors; @BeforeEach public void setup() throws Exception { @@ -62,6 +64,28 @@ public void setup() throws Exception { "}"); originalFieldsMap = getOriginalFieldsMap(schema); + + extendedColumnDescriptors = new ArrayList<>(); + // (id int, tm1 time, intrv1 interval, uuid1 uuid, json1 json, bson1 jsonb) + extendedColumnDescriptors.add(new ColumnDescriptor("id", DataType.INTEGER.getOID(), 0, "int4", null)); + extendedColumnDescriptors.add(new ColumnDescriptor("tm1", DataType.TIME.getOID(), 1, "time", null)); + extendedColumnDescriptors.add(new ColumnDescriptor("intrv1", DataType.INTERVAL.getOID(), 2, "interval", null)); + extendedColumnDescriptors.add(new ColumnDescriptor("uuid1", DataType.UUID.getOID(), 3, "uuid", null)); + extendedColumnDescriptors.add(new ColumnDescriptor("json1", DataType.JSON.getOID(), 4, "json", null)); + extendedColumnDescriptors.add(new ColumnDescriptor("bson1", DataType.JSONB.getOID(), 4, "jsonb", null)); + extendedColumnDescriptors.add(new ColumnDescriptor("dec1", DataType.NUMERIC.getOID(), 4, "numeric", new Integer[]{12, 2})); + + MessageType extendedSchema = MessageTypeParser.parseMessageType("message hive_schema {\n" + + " optional int32 id;\n" + + " optional int64 tm1 (TIME(MICROS, true));\n" + + " optional fixed_len_byte_array(12) intrv1 (INTERVAL);\n" + + " optional fixed_len_byte_array(16) uuid1 (UUID);\n" + + " optional binary json1 (JSON);\n" + + " optional binary bson1 (BSON);\n" + + " optional fixed_len_byte_array(16) dec1 (DECIMAL(12, 2));\n" + + "}"); + + extendedOriginalFieldsMap = getOriginalFieldsMap(extendedSchema); } private Map getOriginalFieldsMap(MessageType originalSchema) { diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetExtendedFilterPushDownTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetExtendedFilterPushDownTest.java new file mode 100644 index 0000000000..668ca3af09 --- /dev/null +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetExtendedFilterPushDownTest.java @@ -0,0 +1,438 @@ +package org.greenplum.pxf.plugins.hdfs.parquet; + +import org.apache.hadoop.conf.Configuration; +import org.greenplum.pxf.api.OneField; +import org.greenplum.pxf.api.OneRow; +import org.greenplum.pxf.api.io.DataType; +import org.greenplum.pxf.api.model.Accessor; +import org.greenplum.pxf.api.model.RequestContext; +import org.greenplum.pxf.api.model.Resolver; +import org.greenplum.pxf.api.utilities.ColumnDescriptor; +import org.greenplum.pxf.plugins.hdfs.HcfsFragmentMetadata; +import org.greenplum.pxf.plugins.hdfs.ParquetFileAccessor; +import org.greenplum.pxf.plugins.hdfs.ParquetResolver; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.postgresql.util.PGInterval; + +import java.math.BigDecimal; +import java.sql.SQLException; +import java.util.List; +import java.util.Objects; + +import static org.junit.jupiter.api.Assertions.*; + +/** + * Test for filtering extended types (time, interval etc) + * Memo for comparison operators in filters + * + *

+ * Example filter list: + *

+ * Column(0) > 1 AND Column(0) < 5 AND Column(2) == "third" + *

+ * Yields the following serialized string: + *

+ * a0c23s1d1o2a1c23s1d5o1a2c25s5dthirdo5l0l0 + *

+ * Where: + *

+ * a0 - first column of table + * c23 - scalar constant with type oid 23(INT4) + * s1 - size of constant in bytes + * d1 - serialized constant value + * o2 - greater than operation + * a1 - second column of table + * c23 - scalar constant with type oid 23(INT4) + * s1 - size of constant in bytes + * d5 - serialized constant value + * o1 - less than operation + * a2 - third column of table + * c25 - scalar constant with type oid 25(TEXT) + * s5 - size of constant in bytes + * dthird - serialized constant value + * o5 - equals operation + * l0 - AND operator + * l0 - AND operator + * o0 - noop (translates to == still) + * o1 - < + * o2 - > + * o3 - <= + * o4 - >= + * o5 - == + * o6 - != + * o7 - like + * o8 - is null + * o9 - is not null + * o10 - in + */ +public class ParquetExtendedFilterPushDownTest extends ParquetBaseTest { + + // From resources/parquet/extended_types.parquet + private static final int[] ID_COL = {1, 2, 3, 4, 5}; + private static final String[] TIME_COL = {"13:13:00", "18:54:00", "23:15:00", null, "19:35:00"}; + private static final String[] INTERVAL_COL = {"3 month 4 day 5 hour 6 minute 7 second", "2 year 3 month 4 day 5 hour 6 minute 7 second", "4 day 5 hour 6 minute 7 second", "11 second", null}; + private static final String[] UUID_COL = {"666b7805-a0f3-4ac0-90d7-4fc33ef9e25a", "4350f1fa-dead-beef-ba5d-b84af90d7954", "6d1903b4-d64d-47b1-949b-003307ad84f4", "dead03b4-dead-47b1-beef-003307adbeef", null}; + private static final String[] JSON_COL = {"{\"a\": 1, \"a\": 2}", "{\"a\": 4, \"a\": 5}", "{\"a\": 6, \"a\": 7}", null, "{\"a\": 12, \"a\": 13}"}; + private static final String[] BSON_COL = {"{\"a\": 1}", "{\"a\": 3}", "{\"a\": 11}", "{\"a\": 11}", null}; + private static final String[] DECIMAL_COL = {"666666.66", null, "12345.67", "333777.99", "1000000000.00"}; + private static final int[] ALL = ID_COL; + + private Accessor accessor; + private Resolver resolver; + private RequestContext context; + + @BeforeEach + public void setup() throws Exception { + super.setup(); + + accessor = new ParquetFileAccessor(); + resolver = new ParquetResolver(); + context = new RequestContext(); + + String path = Objects.requireNonNull(getClass().getClassLoader().getResource("parquet/extended_types.parquet")).getPath(); + + context.setConfig("fakeConfig"); + context.setServerName("fakeServerName"); + context.setUser("fakeUser"); + context.setUser("test-user"); + context.setProfileScheme("localfile"); + context.setRequestType(RequestContext.RequestType.READ_BRIDGE); + context.setDataSource(path); + context.setFragmentMetadata(new HcfsFragmentMetadata(0, 4196)); + context.setTupleDescription(super.extendedColumnDescriptors); + context.setConfiguration(new Configuration()); + + accessor.setRequestContext(context); + resolver.setRequestContext(context); + accessor.afterPropertiesSet(); + resolver.afterPropertiesSet(); + } + + @Test + public void testNoFilter() throws Exception { + // all rows are expected + assertRowsReturned(ALL); + } + + @Test + public void testTimePushDown() throws Exception { + int[] expectedRows = {1}; + // a1 == 13:13 + context.setFilterString("a1c1083s8d13:13:00o5"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2, 3, 5}; + // a1 > 13:13 + context.setFilterString("a1c1083s8d13:13:00o2"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 5}; + // a1 < 23:15 + context.setFilterString("a1c1083s8d23:15:00o1"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2, 3, 4, 5}; + // a1 <> 13:13 + context.setFilterString("a1c1083s8d13:13:00o6"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2, 3, 5}; + // a1 >= 18:54 + context.setFilterString("a1c1083s8d18:54:00o4"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2}; + // a1 <= 18:54 + context.setFilterString("a1c1083s8d18:54:00o3"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {4}; + // a1 is null + context.setFilterString("a1o8"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 3, 5}; + // a1 is not null + context.setFilterString("a1o9"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2}; + // a1 in (18:54, 13:13) + context.setFilterString("a1m1183s8d18:54:00s8d13:13:00o10"); + assertRowsReturned(expectedRows); + } + + @Test + public void testIntervalPushDown() throws Exception { + int[] expectedRows = {1}; + // a2 == 3 month 4 day 5 hour 6 minute 7 second + context.setFilterString("a2c1186s38d3 month 4 day 5 hour 6 minute 7 secondo5"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2}; + // a2 > 3 month 4 day 5 hour 6 minute 7 second + context.setFilterString("a2c1186s38d3 month 4 day 5 hour 6 minute 7 secondo2"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 3, 4}; + // a2 < 2 year 3 month 4 day 5 hour 6 minute 7 second + context.setFilterString("a2c1186s45d2 year 3 month 4 day 5 hour 6 minute 7 secondo1"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 4, 5}; + // a2 <> 4 day 5 hour 6 minute 7 seconds + context.setFilterString("a2c1186s31d4 day 5 hour 6 minute 7 secondso6"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 3}; + // a2 >= 4 day 5 hour 6 minute 7 seconds + context.setFilterString("a2c1186s31d4 day 5 hour 6 minute 7 secondso4"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 3, 4}; + // a2 <= 2 year 3 month 4 day 5 hour 6 minute 7 second + context.setFilterString("a2c1186s45d2 year 3 month 4 day 5 hour 6 minute 7 secondo3"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {5}; + // a2 is null + context.setFilterString("a2o8"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 3, 4}; + // a2 is not null + context.setFilterString("a2o9"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 3}; + // a2 in (4 day 5 hour 6 minute 7 second, 3 month 4 day 5 hour 6 minute 7 second) + context.setFilterString("a2m1187s30d4 day 5 hour 6 minute 7 seconds38d3 month 4 day 5 hour 6 minute 7 secondo10"); + assertRowsReturned(expectedRows); + } + + @Test + public void testUUIDPushDown() throws Exception { + int[] expectedRows = {1}; + // a3 == 666b7805-a0f3-4ac0-90d7-4fc33ef9e25a + context.setFilterString("a3c2950s36d666b7805-a0f3-4ac0-90d7-4fc33ef9e25ao5"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2, 3, 4, 5}; + // a3 <> 666b7805-a0f3-4ac0-90d7-4fc33ef9e25a + context.setFilterString("a3c2950s36d666b7805-a0f3-4ac0-90d7-4fc33ef9e25ao6"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {5}; + // a3 is null + context.setFilterString("a3o8"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 3, 4}; + // a3 is not null + context.setFilterString("a3o9"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 3}; + // a3 in (6d1903b4-d64d-47b1-949b-003307ad84f4, 666b7805-a0f3-4ac0-90d7-4fc33ef9e25a) + context.setFilterString("a3m2951s36d666b7805-a0f3-4ac0-90d7-4fc33ef9e25as36d6d1903b4-d64d-47b1-949b-003307ad84f4o10"); + assertRowsReturned(expectedRows); + } + + @Test + public void testJsonPushDown() throws Exception { + int[] expectedRows = {1}; + // a4 == {"a": 1, "a": 2} + context.setFilterString("a4c114s16d{\"a\": 1, \"a\": 2}o5"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2, 3, 4, 5}; + // a4 <> {"a": 1, "a": 2} + context.setFilterString("a4c114s16d{\"a\": 1, \"a\": 2}o6"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {4}; + // a4 is null + context.setFilterString("a4o8"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 3, 5}; + // a4 is not null + context.setFilterString("a4o9"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2, 3}; + // a4 in ({"a": 4, "a": 5}, {"a": 6, "a": 7}) + context.setFilterString("a4m199s16d{\"a\": 4, \"a\": 5}s16d{\"a\": 6, \"a\": 7}o10"); + assertRowsReturned(expectedRows); + } + + @Test + public void testBsonPushDown() throws Exception { + int[] expectedRows = {3, 4}; + // a5 == {"a": 11} + context.setFilterString("a5c3802s9d{\"a\": 11}o5"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 5}; + // a5 <> {"a": 11} + context.setFilterString("a5c3802s9d{\"a\": 11}o6"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {5}; + // a5 is null + context.setFilterString("a5o8"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 3, 4}; + // a5 is not null + context.setFilterString("a5o9"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2}; + // a5 in ({"a": 1}, {"a": 3}) + context.setFilterString("a5m3807s8d{\"a\": 1}s8d{\"a\": 3}o10"); + assertRowsReturned(expectedRows); + } + + @Test + public void testDecimalPushDown() throws Exception { + int[] expectedRows = {1}; + // a6 == 666666.66 + context.setFilterString("a6c1700s9d666666.66o5"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 5}; + // a6 > 333777.99 + context.setFilterString("a6c1700s9d333777.99o2"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {3}; + // a6 < 333777.99 + context.setFilterString("a6c1700s9d333777.99o1"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 2, 4, 5}; + // a6 <> 12345.67 + context.setFilterString("a6c1700s8d12345.67o6"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 4, 5}; + // a6 >= 333777.99 + context.setFilterString("a6c1700s9d333777.99o4"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 3, 4}; + // a6 <= 666666.66 + context.setFilterString("a6c1700s9d666666.66o3"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {2}; + // a6 is null + context.setFilterString("a6o8"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 3, 4, 5}; + // a6 is not null + context.setFilterString("a6o9"); + assertRowsReturned(expectedRows); + + expectedRows = new int[] {1, 5}; + // a6 in (1000000000.00, 666666.66) + context.setFilterString("a6m1231s13d1000000000.00s9d666666.66o10"); + assertRowsReturned(expectedRows); + } + + private void assertRowsReturned(int[] expectedRows) throws Exception { + assertTrue(accessor.openForRead()); + + OneRow oneRow; + for (int expectedRow : expectedRows) { + oneRow = accessor.readNextObject(); + assertNotNull(oneRow, "Row " + expectedRow); + List fieldList = resolver.getFields(oneRow); + assertNotNull(fieldList, "Row " + expectedRow); + assertEquals(7, fieldList.size(), "Row " + expectedRow); + + assertTypes(fieldList); + assertValues(fieldList, expectedRow - 1); + } + oneRow = accessor.readNextObject(); + assertNull(oneRow, "No more rows expected"); + + accessor.closeForRead(); + } + + private void assertTypes(List fieldList) { + List columnDescriptors = context.getTupleDescription(); + + if (columnDescriptors.get(0).isProjected()) { + assertEquals(DataType.INTEGER.getOID(), fieldList.get(0).type); + } + if (columnDescriptors.get(1).isProjected()) { + assertEquals(DataType.TIME.getOID(), fieldList.get(1).type); + } + if (columnDescriptors.get(2).isProjected()) { + assertEquals(DataType.INTERVAL.getOID(), fieldList.get(2).type); + } + if (columnDescriptors.get(3).isProjected()) { + assertEquals(DataType.UUID.getOID(), fieldList.get(3).type); + } + if (columnDescriptors.get(4).isProjected()) { + assertEquals(DataType.JSON.getOID(), fieldList.get(4).type); + } + if (columnDescriptors.get(5).isProjected()) { + assertEquals(DataType.JSONB.getOID(), fieldList.get(5).type); + } + if (columnDescriptors.get(6).isProjected()) { + assertEquals(DataType.NUMERIC.getOID(), fieldList.get(6).type); + } + } + + private void assertValues(List fieldList, final int row) throws SQLException { + List columnDescriptors = context.getTupleDescription(); + + if (columnDescriptors.get(0).isProjected()) { + assertEquals(ID_COL[row], fieldList.get(0).val, "Row " + row); + } else { + assertNull(fieldList.get(0).val, "Row " + row); + } + + if (columnDescriptors.get(1).isProjected()) { + assertEquals(TIME_COL[row], fieldList.get(1).val, "Row " + row); + } else { + assertNull(fieldList.get(1).val, "Row " + row); + } + + if (columnDescriptors.get(2).isProjected() && INTERVAL_COL[row] != null) { + assertEquals(new PGInterval(INTERVAL_COL[row]).toString(), fieldList.get(2).val, "Row " + row); + } else { + assertNull(fieldList.get(2).val, "Row " + row); + } + + if (columnDescriptors.get(3).isProjected() && UUID_COL[row] != null) { + assertEquals(UUID_COL[row], fieldList.get(3).val, "Row " + row); + } else { + assertNull(fieldList.get(3).val, "Row " + row); + } + + if (columnDescriptors.get(4).isProjected() && JSON_COL[row] != null) { + assertEquals(JSON_COL[row], fieldList.get(4).val, "Row " + row); + } else { + assertNull(fieldList.get(4).val, "Row " + row); + } + + if (columnDescriptors.get(5).isProjected() && BSON_COL[row] != null) { + assertEquals(BSON_COL[row], fieldList.get(5).val, "Row " + row); + } else { + assertNull(fieldList.get(5).val, "Row " + row); + } + + if (columnDescriptors.get(6).isProjected() && DECIMAL_COL[row] != null) { + assertEquals(new BigDecimal(DECIMAL_COL[row]), fieldList.get(6).val, "Row " + row); + } else { + assertNull(fieldList.get(6).val, "Row " + row); + } + } + +} diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetFilterPushDownTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetFilterPushDownTest.java index 08d7ba0ac2..2e43585486 100644 --- a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetFilterPushDownTest.java +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetFilterPushDownTest.java @@ -769,7 +769,7 @@ private void assertTypes(List fieldList) { assertEquals(DataType.TEXT.getOID(), fieldList.get(11).type); } if (columnDescriptors.get(12).isProjected()) { - assertEquals(DataType.TEXT.getOID(), fieldList.get(12).type); + assertEquals(DataType.BPCHAR.getOID(), fieldList.get(12).type); } if (columnDescriptors.get(13).isProjected()) { assertEquals(DataType.NUMERIC.getOID(), fieldList.get(13).type); diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetIntervalUtilitiesTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetIntervalUtilitiesTest.java new file mode 100644 index 0000000000..5112eeb30f --- /dev/null +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetIntervalUtilitiesTest.java @@ -0,0 +1,52 @@ +package org.greenplum.pxf.plugins.hdfs.parquet; + +import org.apache.parquet.io.api.Binary; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class ParquetIntervalUtilitiesTest { + + @Test + void read() { + byte[] bytes = new byte[] {0, 0, 0, 14, 0, 0, 0, 3, 0, -32, 101, 80}; + String actual = ParquetIntervalUtilities.read(bytes); + assertEquals("1 years 2 mons 3 days 4 hours 5 mins 6.0 secs", actual); + bytes = new byte[] {0, 0, 0, 14, 0, 0, 0, 3, 0, -32, 104, 101}; + actual = ParquetIntervalUtilities.read(bytes); + assertEquals("1 years 2 mons 3 days 4 hours 5 mins 6.789 secs", actual); + } + + @Test + void write() { + Binary binary = ParquetIntervalUtilities.write("1 year 2 month 3 day 4 hour 5 minute 6 second"); + byte[] actualBytes = binary.getBytes(); + assertEquals(ParquetIntervalUtilities.INTERVAL_TYPE_LENGTH, actualBytes.length); + byte[] expectedBytes = new byte[] {0, 0, 0, 14, 0, 0, 0, 3, 0, -32, 101, 80}; + assertArrayEquals(expectedBytes, actualBytes); + + binary = ParquetIntervalUtilities.write("1 year 2 month 3 day 4 hour 5 minute 6.789 second"); + actualBytes = binary.getBytes(); + assertEquals(ParquetIntervalUtilities.INTERVAL_TYPE_LENGTH, actualBytes.length); + expectedBytes = new byte[] {0, 0, 0, 14, 0, 0, 0, 3, 0, -32, 104, 101}; + assertArrayEquals(expectedBytes, actualBytes); + } + + @Test + void testRoundTripString() { + String round = ParquetIntervalUtilities.read(ParquetIntervalUtilities.write("1 year 2 month 3 day 4 hour 5 minute 6 second").getBytes()); + assertEquals("1 years 2 mons 3 days 4 hours 5 mins 6.0 secs", round); + round = ParquetIntervalUtilities.read(ParquetIntervalUtilities.write("1 year 2 month 3 day 4 hour 5 minute 6.789 second").getBytes()); + assertEquals("1 years 2 mons 3 days 4 hours 5 mins 6.789 secs", round); + } + + @Test + void testRoundTripBytes() { + byte[] expectedBytes = new byte[] {0, 0, 0, 14, 0, 0, 0, 3, 0, -32, 101, 80}; + byte[] actualBytes = ParquetIntervalUtilities.write(ParquetIntervalUtilities.read(expectedBytes)).getBytes(); + assertArrayEquals(expectedBytes, actualBytes); + expectedBytes = new byte[] {0, 0, 0, 14, 0, 0, 0, 3, 0, -32, 104, 101}; + actualBytes = ParquetIntervalUtilities.write(ParquetIntervalUtilities.read(expectedBytes)).getBytes(); + assertArrayEquals(expectedBytes, actualBytes); + } +} \ No newline at end of file diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilderTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilderTest.java index 7b426b7b94..97af510ff1 100644 --- a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilderTest.java +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetRecordFilterBuilderTest.java @@ -5,18 +5,22 @@ import org.greenplum.pxf.api.filter.FilterParser; import org.greenplum.pxf.api.filter.Node; import org.greenplum.pxf.plugins.hdfs.utilities.DecimalOverflowOption; +import org.greenplum.pxf.plugins.hdfs.utilities.DecimalUtilities; +import org.hamcrest.Matchers; +import org.hamcrest.core.StringContains; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.*; public class ParquetRecordFilterBuilderTest extends ParquetBaseTest { @Test - public void testUnsupportedOperationError() { + public void testUnsupportedInOperationError() { // a16 in (11, 12) Exception e = assertThrows(UnsupportedOperationException.class, () -> filterBuilderFromFilterString("a16m1007s2d11s2d12o10")); - assertEquals("not supported IN", e.getMessage()); + assertThat(e.getMessage(), new StringContains("not supported IN")); } @Test @@ -157,9 +161,14 @@ private static FilterPredicate getFilterPredicate(ParquetRecordFilterBuilder fil } private ParquetRecordFilterBuilder filterBuilderFromFilterString(String filterString) throws Exception { - + ParquetConfig parquetConfig = ParquetConfig.builder() + .useLocalPxfTimezoneWrite(true) + .useLocalPxfTimezoneRead(true) + .decimalUtilities(new DecimalUtilities(DecimalOverflowOption.IGNORE, true)) + .build(); + ParquetTypeConverterFactory parquetTypeConverterFactory = new ParquetTypeConverterFactory(parquetConfig); ParquetRecordFilterBuilder filterBuilder = new ParquetRecordFilterBuilder(columnDescriptors, originalFieldsMap, - DecimalOverflowOption.IGNORE, true); + parquetTypeConverterFactory); // Parse the filter string into a expression tree Node Node root = new FilterParser().parse(filterString); diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilitiesTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilitiesTest.java index b6bc7b9995..bfd1581b53 100644 --- a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilitiesTest.java +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTimestampUtilitiesTest.java @@ -5,6 +5,7 @@ import org.apache.parquet.schema.LogicalTypeAnnotation; import org.apache.parquet.schema.Type; import org.greenplum.pxf.api.GreenplumDateTime; +import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.plugins.hdfs.parquet.converters.Int64ParquetTypeConverter; import org.greenplum.pxf.plugins.hdfs.parquet.converters.ParquetTypeConverter; import org.junit.jupiter.api.Test; @@ -57,14 +58,6 @@ public void testBinaryConversionRoundTrip() { assertArrayEquals(source, binary.getBytes()); } - @Test - public void testUnsupportedNanoSeconds() { - String timestamp = "2019-03-14 20:52:48.1234567"; - Exception e = assertThrows(DateTimeParseException.class, - () -> ParquetTimestampUtilities.getBinaryFromTimestamp(timestamp, true)); - assertEquals("Text '2019-03-14 20:52:48.1234567' could not be parsed, unparsed text found at index 26", e.getMessage()); - } - @Test public void testBinaryWithNanos() { Instant instant = Instant.parse("2019-03-15T03:52:48.123456Z"); // UTC @@ -175,13 +168,14 @@ public void getTimestampFromLongWithConvertToLocalMicros() { // Europe/Moscow time zone: 1977-12-11 10:01:02.3545 long value = 250671662354500L; boolean useLocalPxfTimezoneRead = true; + boolean useLocalPxfTimezoneWrite = true; when(group.getLong(columnIndex, repeatIndex)).thenReturn(value); when(type.getLogicalTypeAnnotation()).thenReturn(logicalTypeAnnotation); when(logicalTypeAnnotation.getUnit()).thenReturn(LogicalTypeAnnotation.TimeUnit.MICROS); TimeZone defaultTimeZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow")); - ParquetTypeConverter converter = new Int64ParquetTypeConverter(useLocalPxfTimezoneRead); - String timestamp = (String) converter.getValue(group, columnIndex, repeatIndex, type); + ParquetTypeConverter converter = new Int64ParquetTypeConverter(type, DataType.TIMESTAMP, useLocalPxfTimezoneRead, useLocalPxfTimezoneWrite); + String timestamp = (String) converter.read(group, columnIndex, repeatIndex); assertEquals("1977-12-11 10:01:02.3545", timestamp); TimeZone.setDefault(defaultTimeZone); } @@ -192,13 +186,14 @@ public void getTimestampFromLongWithoutConvertToLocalMicros() { // Europe/Moscow time zone: 1977-12-11 10:01:02.3545 long value = 250671662354500L; boolean useLocalPxfTimezoneRead = false; + boolean useLocalPxfTimezoneWrite = false; when(group.getLong(columnIndex, repeatIndex)).thenReturn(value); when(logicalTypeAnnotation.getUnit()).thenReturn(LogicalTypeAnnotation.TimeUnit.MICROS); when(type.getLogicalTypeAnnotation()).thenReturn(logicalTypeAnnotation); TimeZone defaultTimeZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow")); - ParquetTypeConverter converter = new Int64ParquetTypeConverter(useLocalPxfTimezoneRead); - String timestamp = (String) converter.getValue(group, columnIndex, repeatIndex, type); + ParquetTypeConverter converter = new Int64ParquetTypeConverter(type, DataType.TIMESTAMP, useLocalPxfTimezoneRead, useLocalPxfTimezoneWrite); + String timestamp = (String) converter.read(group, columnIndex, repeatIndex); assertEquals("1977-12-11 07:01:02.3545", timestamp); TimeZone.setDefault(defaultTimeZone); } @@ -209,13 +204,14 @@ public void getTimestampFromLongWithConvertToLocalMillis() { // Europe/Moscow time zone: 1977-12-11 10:01:02.354 long value = 250671662354L; boolean useLocalPxfTimezoneRead = true; + boolean useLocalPxfTimezoneWrite = true; when(group.getLong(columnIndex, repeatIndex)).thenReturn(value); when(type.getLogicalTypeAnnotation()).thenReturn(logicalTypeAnnotation); when(logicalTypeAnnotation.getUnit()).thenReturn(LogicalTypeAnnotation.TimeUnit.MILLIS); TimeZone defaultTimeZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow")); - ParquetTypeConverter converter = new Int64ParquetTypeConverter(useLocalPxfTimezoneRead); - String timestamp = (String) converter.getValue(group, columnIndex, repeatIndex, type); + ParquetTypeConverter converter = new Int64ParquetTypeConverter(type, DataType.TIMESTAMP, useLocalPxfTimezoneRead, useLocalPxfTimezoneWrite); + String timestamp = (String) converter.read(group, columnIndex, repeatIndex); assertEquals("1977-12-11 10:01:02.354", timestamp); TimeZone.setDefault(defaultTimeZone); } @@ -226,13 +222,14 @@ public void getTimestampFromLongWithoutConvertToLocalMillis() { // Europe/Moscow time zone: 1977-12-11 10:01:02.354 long value = 250671662354L; boolean useLocalPxfTimezoneRead = false; + boolean useLocalPxfTimezoneWrite = false; when(group.getLong(columnIndex, repeatIndex)).thenReturn(value); when(type.getLogicalTypeAnnotation()).thenReturn(logicalTypeAnnotation); when(logicalTypeAnnotation.getUnit()).thenReturn(LogicalTypeAnnotation.TimeUnit.MILLIS); TimeZone defaultTimeZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow")); - ParquetTypeConverter converter = new Int64ParquetTypeConverter(useLocalPxfTimezoneRead); - String timestamp = (String) converter.getValue(group, columnIndex, repeatIndex, type); + ParquetTypeConverter converter = new Int64ParquetTypeConverter(type, DataType.TIMESTAMP, useLocalPxfTimezoneRead, useLocalPxfTimezoneWrite); + String timestamp = (String) converter.read(group, columnIndex, repeatIndex); assertEquals("1977-12-11 07:01:02.354", timestamp); TimeZone.setDefault(defaultTimeZone); } @@ -243,15 +240,16 @@ public void getTimestampFromLongWithConvertToLocalNanos() { // Europe/Moscow time zone: 1977-12-11 10:01:02.123456789 long value = 250671662123456789L; boolean useLocalPxfTimezoneRead = true; + boolean useLocalPxfTimezoneWrite = true; when(group.getLong(columnIndex, repeatIndex)).thenReturn(value); when(type.getLogicalTypeAnnotation()).thenReturn(logicalTypeAnnotation); when(logicalTypeAnnotation.getUnit()).thenReturn(LogicalTypeAnnotation.TimeUnit.NANOS); TimeZone defaultTimeZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow")); - ParquetTypeConverter converter = new Int64ParquetTypeConverter(useLocalPxfTimezoneRead); - String timestamp = (String) converter.getValue(group, columnIndex, repeatIndex, type); + ParquetTypeConverter converter = new Int64ParquetTypeConverter(type, DataType.TIMESTAMP, useLocalPxfTimezoneRead, useLocalPxfTimezoneWrite); + String timestamp = (String) converter.read(group, columnIndex, repeatIndex); // Postgres Timestamp type support only microseconds - assertEquals("1977-12-11 10:01:02.123456", timestamp); + assertEquals("1977-12-11 10:01:02.123456789", timestamp); TimeZone.setDefault(defaultTimeZone); } @@ -261,15 +259,16 @@ public void getTimestampFromLongWithoutConvertToLocalNanos() { // Europe/Moscow time zone: 1977-12-11 10:01:02.123456789 long value = 250671662123456789L; boolean useLocalPxfTimezoneRead = false; + boolean useLocalPxfTimezoneWrite = false; when(group.getLong(columnIndex, repeatIndex)).thenReturn(value); when(type.getLogicalTypeAnnotation()).thenReturn(logicalTypeAnnotation); when(logicalTypeAnnotation.getUnit()).thenReturn(LogicalTypeAnnotation.TimeUnit.NANOS); TimeZone defaultTimeZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow")); - ParquetTypeConverter converter = new Int64ParquetTypeConverter(useLocalPxfTimezoneRead); - String timestamp = (String) converter.getValue(group, columnIndex, repeatIndex, type); + ParquetTypeConverter converter = new Int64ParquetTypeConverter(type, DataType.TIMESTAMP, useLocalPxfTimezoneRead, useLocalPxfTimezoneWrite); + String timestamp = (String) converter.read(group, columnIndex, repeatIndex); // Postgres Timestamp type support only microsecond - assertEquals("1977-12-11 07:01:02.123456", timestamp); + assertEquals("1977-12-11 07:01:02.123456789", timestamp); TimeZone.setDefault(defaultTimeZone); } diff --git a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactoryTest.java b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactoryTest.java index b09d03fc71..7384cee9cb 100644 --- a/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactoryTest.java +++ b/server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverterFactoryTest.java @@ -3,6 +3,7 @@ import org.apache.parquet.schema.*; import org.greenplum.pxf.api.error.PxfRuntimeException; import org.greenplum.pxf.api.error.UnsupportedTypeException; +import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.plugins.hdfs.parquet.converters.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -28,23 +29,11 @@ void createWithNullTypeName() { when(type.asPrimitiveType()).thenReturn(primitiveType); when(primitiveType.getPrimitiveTypeName()).thenReturn(null); Exception e = assertThrows(PxfRuntimeException.class, - () -> factory.create(type)); + () -> factory.create(type, DataType.UNSUPPORTED_TYPE)); String expectedMessage = "Invalid Parquet primitive schema. Parquet primitive type name is null."; assertEquals(expectedMessage, e.getMessage()); } - @Test - void createWithNotSupportedPxfParquetType() { - Type type = mock(Type.class); - PrimitiveType primitiveType = mock(PrimitiveType.class); - PrimitiveType.PrimitiveTypeName typeName = mock(PrimitiveType.PrimitiveTypeName.class); - when(type.isPrimitive()).thenReturn(true); - when(type.asPrimitiveType()).thenReturn(primitiveType); - when(primitiveType.getPrimitiveTypeName()).thenReturn(typeName); - when(typeName.name()).thenReturn("dummy"); - assertThrows(UnsupportedTypeException.class, () -> factory.create(type)); - } - @Test void createWithNotSupportedComplexType() { Type type = mock(Type.class); @@ -53,63 +42,63 @@ void createWithNotSupportedComplexType() { when(type.asGroupType()).thenReturn(complexType); when(complexType.getOriginalType()).thenReturn(null); Exception e = assertThrows(UnsupportedTypeException.class, - () -> factory.create(type)); - assertTrue(e.getMessage().contains("Parquet complex type customized struct is not supported")); + () -> factory.create(type, DataType.UNSUPPORTED_TYPE)); + assertTrue(e.getMessage().contains("Parquet complex type converter [customized struct] is not supported")); } @Test void createBinaryConverter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.BINARY, "BINARY"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.VARCHAR); assertTrue(converter instanceof BinaryParquetTypeConverter); } @Test void createBooleanConverter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.BOOLEAN, "BOOLEAN"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.BOOLEAN); assertTrue(converter instanceof BooleanParquetTypeConverter); } @Test void createDoubleConverter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.DOUBLE, "DOUBLE"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.FLOAT8); assertTrue(converter instanceof DoubleParquetTypeConverter); } @Test void createFixedLenByteArrayConverter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY, "FIXED_LEN_BYTE_ARRAY"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.NUMERIC); assertTrue(converter instanceof FixedLenByteArrayParquetTypeConverter); } @Test void createFloatConverter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.FLOAT, "FLOAT"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.REAL); assertTrue(converter instanceof FloatParquetTypeConverter); } @Test void createInt32Converter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.INT32, "INT32"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.INTEGER); assertTrue(converter instanceof Int32ParquetTypeConverter); } @Test void createInt64Converter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.INT64, "INT64"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.BIGINT); assertTrue(converter instanceof Int64ParquetTypeConverter); } @Test void createInt96Converter() { Type type = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.INT96, "INT96"); - ParquetTypeConverter converter = factory.create(type); + ParquetTypeConverter converter = factory.create(type, DataType.TIMESTAMP); assertTrue(converter instanceof Int96ParquetTypeConverter); } @@ -119,7 +108,7 @@ void createListComplexTypeConverter() { Type complexType = Types.optionalList() .setElementType(type1) .named("LIST"); - ParquetTypeConverter converter = factory.create(complexType); + ParquetTypeConverter converter = factory.create(complexType, DataType.TIMESTAMP); assertTrue(converter instanceof ListParquetTypeConverter); } } diff --git a/server/pxf-hdfs/src/test/resources/parquet/extended_types.parquet b/server/pxf-hdfs/src/test/resources/parquet/extended_types.parquet new file mode 100644 index 0000000000..4d93bb8c42 Binary files /dev/null and b/server/pxf-hdfs/src/test/resources/parquet/extended_types.parquet differ diff --git a/server/pxf-hive/src/main/java/org/greenplum/pxf/plugins/hive/HiveAccessor.java b/server/pxf-hive/src/main/java/org/greenplum/pxf/plugins/hive/HiveAccessor.java index cc17c5217d..6811a5c75c 100644 --- a/server/pxf-hive/src/main/java/org/greenplum/pxf/plugins/hive/HiveAccessor.java +++ b/server/pxf-hive/src/main/java/org/greenplum/pxf/plugins/hive/HiveAccessor.java @@ -176,8 +176,8 @@ public class HiveAccessor extends HdfsSplittableDataAccessor { DataType.BOOLEAN, DataType.DATE, DataType.TIMESTAMP, - DataType.TIME, - DataType.BYTEA + DataType.TIME + //DataType.BYTEA ); private static final TreeTraverser TRAVERSER = new TreeTraverser(); diff --git a/server/pxf-jdbc/src/main/java/org/greenplum/pxf/plugins/jdbc/SQLQueryBuilder.java b/server/pxf-jdbc/src/main/java/org/greenplum/pxf/plugins/jdbc/SQLQueryBuilder.java index a472305a73..27076b5c12 100644 --- a/server/pxf-jdbc/src/main/java/org/greenplum/pxf/plugins/jdbc/SQLQueryBuilder.java +++ b/server/pxf-jdbc/src/main/java/org/greenplum/pxf/plugins/jdbc/SQLQueryBuilder.java @@ -1,11 +1,7 @@ package org.greenplum.pxf.plugins.jdbc; -import org.greenplum.pxf.api.filter.FilterParser; -import org.greenplum.pxf.api.filter.Node; -import org.greenplum.pxf.api.filter.Operator; -import org.greenplum.pxf.api.filter.SupportedOperatorPruner; -import org.greenplum.pxf.api.filter.TreeTraverser; -import org.greenplum.pxf.api.filter.TreeVisitor; +import org.greenplum.pxf.api.filter.*; +import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.api.model.RequestContext; import org.greenplum.pxf.api.utilities.ColumnDescriptor; import org.greenplum.pxf.plugins.jdbc.partitioning.JdbcFragmentMetadata; @@ -66,6 +62,22 @@ public class SQLQueryBuilder { Operator.NOT, Operator.OR ); + + static final EnumSet SUPPORTED_DATA_TYPES = + EnumSet.of( + DataType.SMALLINT, + DataType.INTEGER, + DataType.BIGINT, + DataType.FLOAT8, + DataType.REAL, + DataType.NUMERIC, + DataType.BOOLEAN, + DataType.TEXT, + DataType.VARCHAR, + DataType.BPCHAR, + DataType.DATE, + DataType.TIMESTAMP + ); private static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS); private static final TreeTraverser TRAVERSER = new TreeTraverser(); @@ -73,7 +85,7 @@ public class SQLQueryBuilder { private final DatabaseMetaData databaseMetaData; private final DbProduct dbProduct; - private final List columns; + protected final List columns; private final String source; private String quoteString; private boolean wrapDateWithTime = false; @@ -307,7 +319,7 @@ private void buildWhereSQL(StringBuilder query) { LOG.debug("FILTER source: {}", context.getFilterString()); // Prune the parsed tree with the provided pruner and then // traverse the tree with the JDBC predicate builder to produce a predicate - TRAVERSER.traverse(root, getPruner(), jdbcPredicateBuilder); + TRAVERSER.traverse(root, getDataTypePruner(), getPruner(), jdbcPredicateBuilder); // No exceptions were thrown, change the provided query String where = jdbcPredicateBuilder.toString(); LOG.debug("FILTER target: {}", where); @@ -318,6 +330,10 @@ private void buildWhereSQL(StringBuilder query) { } } + protected SupportedDataTypePruner getDataTypePruner() { + return new SupportedDataTypePruner(columns, SUPPORTED_DATA_TYPES); + } + /** * Insert fragment constraints into the SQL query. * diff --git a/server/pxf-s3/src/main/java/org/greenplum/pxf/plugins/s3/S3SelectQueryBuilder.java b/server/pxf-s3/src/main/java/org/greenplum/pxf/plugins/s3/S3SelectQueryBuilder.java index f6d2c5cb83..c55e16532a 100644 --- a/server/pxf-s3/src/main/java/org/greenplum/pxf/plugins/s3/S3SelectQueryBuilder.java +++ b/server/pxf-s3/src/main/java/org/greenplum/pxf/plugins/s3/S3SelectQueryBuilder.java @@ -1,8 +1,10 @@ package org.greenplum.pxf.plugins.s3; import org.greenplum.pxf.api.filter.Operator; +import org.greenplum.pxf.api.filter.SupportedDataTypePruner; import org.greenplum.pxf.api.filter.SupportedOperatorPruner; import org.greenplum.pxf.api.filter.TreeVisitor; +import org.greenplum.pxf.api.io.DataType; import org.greenplum.pxf.api.model.RequestContext; import org.greenplum.pxf.api.utilities.ColumnDescriptor; import org.greenplum.pxf.plugins.jdbc.JdbcPredicateBuilder; @@ -39,9 +41,23 @@ public class S3SelectQueryBuilder extends SQLQueryBuilder { Operator.NOT, Operator.OR ); - static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS); - private List columns; + static final EnumSet SUPPORTED_DATA_TYPES = + EnumSet.of( + DataType.SMALLINT, + DataType.INTEGER, + DataType.BIGINT, + DataType.FLOAT8, + DataType.REAL, + DataType.NUMERIC, + DataType.BOOLEAN, + DataType.TEXT, + DataType.VARCHAR, + DataType.BPCHAR, + DataType.DATE, + DataType.TIMESTAMP + ); + private static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS); private boolean usePositionToIdentifyColumn; /** @@ -56,7 +72,6 @@ public S3SelectQueryBuilder(RequestContext context, boolean usePositionToIdentifyColumn) throws SQLException { super(context, new S3SelectDatabaseMetaData()); this.usePositionToIdentifyColumn = usePositionToIdentifyColumn; - this.columns = context.getTupleDescription(); } @Override @@ -75,7 +90,7 @@ protected String getSource() { protected JdbcPredicateBuilder getPredicateBuilder() { return new S3SelectPredicateBuilder( usePositionToIdentifyColumn, - context.getTupleDescription()); + columns); } @Override @@ -83,6 +98,11 @@ protected TreeVisitor getPruner() { return PRUNER; } + @Override + protected SupportedDataTypePruner getDataTypePruner() { + return new SupportedDataTypePruner(columns, SUPPORTED_DATA_TYPES); + } + @Override public void buildFragmenterSql(RequestContext context, DbProduct dbProduct, String quoteString, StringBuilder query) { // DO NOTHING: fragmenter is not supported by S3 Select yet diff --git a/server/pxf-service/src/main/java/org/greenplum/pxf/service/BridgeOutputBuilder.java b/server/pxf-service/src/main/java/org/greenplum/pxf/service/BridgeOutputBuilder.java index 99205f709e..2675685bd9 100644 --- a/server/pxf-service/src/main/java/org/greenplum/pxf/service/BridgeOutputBuilder.java +++ b/server/pxf-service/src/main/java/org/greenplum/pxf/service/BridgeOutputBuilder.java @@ -433,6 +433,7 @@ void fillOneGPDBWritableField(OneField oneField, int colIdx) case TIMESTAMP_WITH_TIME_ZONE: case TIME: case DATE: + case INTERVAL: case JSON: case JSONB: case BOOLARRAY: @@ -453,6 +454,7 @@ void fillOneGPDBWritableField(OneField oneField, int colIdx) case TIMESTAMP_WITH_TIMEZONE_ARRAY: case JSONARRAY: case JSONBARRAY: + case INTERVALARRAY: /* * If resolvers support sending arrays to GPDB, they are expected to serialize arrays into Postgres * array external text representation.