framely / community

MIT License
0 stars 2 forks source link

[Bug]: The return type does not align with its definition #1328

Closed hisunnymay closed 10 months ago

hisunnymay commented 10 months ago

Is there an existing issue for this?

Make sure you are using OpenCUI on Google Chrome!

Current Behavior

foodOrderingProvider 中,Postgrest function _getDishes 的 return type 中第五个 column options 的类型是 text

image

Expected Behavior

由于该 return type 对应的 composite type 是 me.test.foodOrdering.IDish,这个 type 的 options 的类型是 text[]

image

所以 function _getDishes 的 return type 中第五个 column options 的类型应该是 text[]

Use Case

目前由于类型不匹配,使用 function testing 会有报错: Returned type text[] does not match expected type text in column 5.

image

Steps To Reproduce

  1. 进入 foodOrderingProvider
  2. 点击 Debug,选择 function getDishes,传入参数 Pizza
  3. 点击 Execute 即可看到报错

Label of org.project

me.test

OpenCUI Link

https://build.opencui.io/org/me.test/agent/foodOrderingProvider/struct/service_schema

Test Case

No response

Additional information

No response

hisunnymay commented 10 months ago

@HuiCheng 这是之前相关的 issue:[Bug]: Inappropriate return type generated in the postgrest function#1287

之前这个 issue 和现在的 issue 的区别是:

hisunnymay commented 10 months ago

The data structure has been changed, there is no need to fix this issue for now.