eval_python3_ann.sql 340 B

12345678910111213141516
  1. /* syntax version 1 */
  2. /* postgres can not */
  3. $script = @@
  4. from yql.typing import *
  5. def f(x:Int32, y:Int32)->Int32:
  6. """
  7. a simple sum UDF
  8. """
  9. return x + y
  10. @@;
  11. --$f = Python3::f(EvaluateType(ParseTypeHandle(Core::PythonFuncSignature(AsAtom("Python3"), $script, "f"))), $script);
  12. $f = Python3::f($script);
  13. select $f(1, 2);