12float.mql 913 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. -- ============================================================
  2. -- float 类型搜索测试
  3. -- ============================================================
  4. -- 1. 等值搜索 float
  5. select * from /test/aaa/test_search where s_float=10.5
  6. /**
  7. output()
  8. **/
  9. ;
  10. -- 2. 大于搜索 float
  11. select * from /test/aaa/test_search where s_float>30.0
  12. /**
  13. output()
  14. **/
  15. ;
  16. -- 3. 小于搜索 float
  17. select * from /test/aaa/test_search where s_float<1.0
  18. /**
  19. output()
  20. **/
  21. ;
  22. -- 4. 区间搜索 float
  23. select * from /test/aaa/test_search where s_float>=10.0 and s_float<=60.0
  24. /**
  25. output()
  26. **/
  27. ;
  28. -- 5. double 类型搜索
  29. select * from /test/aaa/test_search where s_double=10.555
  30. /**
  31. output()
  32. **/
  33. ;
  34. -- 6. 搜索不存在的 float 值
  35. select * from /test/aaa/test_search where s_float=99999.99
  36. /**
  37. output()
  38. count(0)
  39. **/
  40. ;
  41. -- 7. 搜索浮点范围的边界值
  42. select * from /test/aaa/test_search where s_double<1.0
  43. /**
  44. output()
  45. **/
  46. ;