yield_off.sql 488 B

1234567891011121314151617181920212223
  1. /* syntax version 1 */
  2. /* postgres can not */
  3. USE plato;
  4. pragma config.flags("UdfSupportsYield","false");
  5. $s = @@
  6. import yql
  7. def f(input, a):
  8. for x in input:
  9. yield x
  10. @@;
  11. $f = Python::f(Callable<(Stream<Struct<key:String,subkey:String,value:String>>,Int32)->Stream<Struct<key:String,subkey:String,value:String>>>, $s);
  12. SELECT * FROM (
  13. PROCESS Input using $f(TableRows(), 1)
  14. UNION ALL
  15. PROCESS Input using $f(TableRows(), 2)
  16. ) AS x
  17. ORDER BY key, subkey, value
  18. ;