Skip to content

iris python iris and python sqlproc with using iris  #12

@daimor

Description

@daimor

Describe the bug
python crashes when executed SQL Query with sql function written in Python and uses iris module
And it even does something with STDIN, because it does not work as expected after crash, do not let enter at all, and ignores Ctrl+D

iris version/image
IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2023.2 (Build 227U) Mon Jul 31 2023 17:43:25 EDT

python version
iris python iris

To Reproduce

irisowner@53b363b07dfb:~/app$ 
irisowner@53b363b07dfb:~/app$ iris python iris

Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type quit() or Ctrl-D to exit this shell.
>>> iris.cls('%SQL.Statement')._ExecDirect(iris.cls('%SQL.Statement')._New(),"select vector.norm_py('[1,2,3]')")._Display()
irisowner@53b363b07dfb:~/app$ 

Expected behavior
The same function written in ObjectScript works well

irisowner@53b363b07dfb:~/app$ 
irisowner@53b363b07dfb:~/app$ iris python iris

Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type quit() or Ctrl-D to exit this shell.
>>> iris.cls('%SQL.Statement')._ExecDirect(iris.cls('%SQL.Statement')._New(),"select vector.norm('[1,2,3]')")._Display()
Expression_1
3.741657386773941386

1 Rows(s) Affected>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions