in3.sql 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* syntax version 1 */
  2. /* postgres can not */
  3. /* dq can not */
  4. /* dqfile can not */
  5. /* yt can not */
  6. pragma warning("disable", "4510");
  7. pragma warning("disable", "1108");
  8. $Input = [(4, 100), (5, 100)];
  9. select YQL::RangeComputeFor(
  10. Struct<
  11. a:Int32?,
  12. b:Int32?,
  13. c:Int32?,
  14. d:Int32?,
  15. e:Int32?,
  16. >,
  17. ($row) -> (((
  18. $row.a,
  19. $row.d)
  20. IN $Input) ?? false),
  21. AsTuple(
  22. AsAtom("a"),
  23. AsAtom("b"),
  24. AsAtom("c"),
  25. AsAtom("d"),
  26. )
  27. );
  28. $Input2 = [(30, 20, 88), (31, 21, 99)];
  29. select YQL::RangeComputeFor(
  30. Struct<
  31. a:Int32?,
  32. b:Int32?,
  33. c:Int32?,
  34. d:Int32?,
  35. e:Int32?,
  36. >,
  37. ($row) -> ((((
  38. $row.c,
  39. $row.b,
  40. $row.e)
  41. IN $Input2) AND $row.a == 10) ?? false),
  42. AsTuple(
  43. AsAtom("a"),
  44. AsAtom("b"),
  45. AsAtom("c"),
  46. AsAtom("d"),
  47. AsAtom("e"),
  48. )
  49. );
  50. $Input3 = [(20, 10, 30, 99), (21, 10, 31, 88)];
  51. select YQL::RangeComputeFor(
  52. Struct<
  53. a:Int32?,
  54. b:Int32?,
  55. c:Int32?,
  56. d:Int32?,
  57. e:Int32?,
  58. >,
  59. ($row) -> ((($row.c = 33 AND $row.d = 44 AND (
  60. $row.b,
  61. $row.a,
  62. $row.b,
  63. $row.e)
  64. IN $Input3)) ?? false),
  65. AsTuple(
  66. AsAtom("a"),
  67. AsAtom("b"),
  68. AsAtom("c"),
  69. AsAtom("d"),
  70. AsAtom("e"),
  71. )
  72. );