comparison.slt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. mode cockroach
  10. query B
  11. SELECT 1 is null
  12. ----
  13. false
  14. query B
  15. SELECT 1 isnull
  16. ----
  17. false
  18. query B
  19. SELECT null is null
  20. ----
  21. true
  22. query B
  23. select null isnull
  24. ----
  25. true
  26. query B
  27. select 1 = 1 is true
  28. ----
  29. true
  30. query B
  31. select 1 = 1 is false
  32. ----
  33. false
  34. query B
  35. select NULL = 1 is unknown
  36. ----
  37. true
  38. query B
  39. select 2 = 1 is not unknown
  40. ----
  41. true
  42. query B
  43. select 'true' is true
  44. ----
  45. true
  46. query error clause must have type boolean
  47. select 'true'::text is true
  48. query error clause must have type boolean
  49. select 'true'::text is unknown
  50. query B
  51. select 'true'::text is NULL
  52. ----
  53. false
  54. query B
  55. select NULL is true
  56. ----
  57. false
  58. query error invalid input syntax for type boolean
  59. select '1 = 1' is true
  60. query B
  61. select '1 = 1' is null
  62. ----
  63. false
  64. query error clause must have type boolean
  65. select 2 is true