hash.slt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 T
  11. SELECT crc32('')
  12. ----
  13. 0
  14. query T
  15. SELECT crc32('foobar')
  16. ----
  17. 2666930069
  18. query T
  19. SELECT crc32('\x666f6f626172'::bytea)
  20. ----
  21. 2666930069
  22. query T
  23. SELECT kafka_murmur2('21')
  24. ----
  25. 1173551340
  26. query T
  27. SELECT kafka_murmur2('foobar')
  28. ----
  29. 1357151166
  30. query T
  31. SELECT kafka_murmur2('\x666f6f626172'::bytea)
  32. ----
  33. 1357151166
  34. query T
  35. SELECT kafka_murmur2('a-little-bit-long-string')
  36. ----
  37. 1161502112
  38. query T
  39. SELECT kafka_murmur2('a-little-bit-longer-string')
  40. ----
  41. 661178819
  42. query T
  43. SELECT kafka_murmur2('lkjh234lh9fiuh90y23oiuhsafujhadof229phr9h19h89h8')
  44. ----
  45. 2088585677
  46. query T
  47. SELECT seahash('');
  48. ----
  49. 14492805990617963705
  50. query T
  51. SELECT seahash('foobar');
  52. ----
  53. 5348458858952426560
  54. query T
  55. SELECT seahash('\x666f6f626172'::bytea);
  56. ----
  57. 5348458858952426560