Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] 修复了接口 /api/job/{$job_id} 取数结果因缺少 table schema 信息导致可能缺列的问题.Fix the problem that the interface/API /job/{$job_id} may be missing columns due to the lack of table schema information. #94

Closed
ZhengshuaiPENG opened this issue Feb 18, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ZhengshuaiPENG
Copy link
Contributor

如果后端返回给前端的任务结果表,目前不携带 table schema 信息返回给前端。

如果当返回的结果中,有一列全是 null,那么在 api 返回的 json 中,这一列会丢掉,导致前端渲染结果表的时候,缺少一列。
而且也会存在列错位的问题。

期望行为:后端 api 返回的时候,需要将 table schema 和数据列完全返回,并且可以一一对应,在前端正确渲染结果表

@ZhengshuaiPENG ZhengshuaiPENG added the bug Something isn't working label Feb 18, 2022
@ZhengshuaiPENG ZhengshuaiPENG added this to the Sprint-02/25 milestone Feb 18, 2022
@MichelZhan MichelZhan modified the milestones: Sprint-02/25, Sprint-03/11 Feb 28, 2022
@MichelZhan MichelZhan added enhancement New feature or request and removed bug Something isn't working labels Feb 28, 2022
@MichelZhan
Copy link

请求引擎 run/script 接口时增加 includeSchema=true 可获取结果的字段结构

@chengwang15 按此结构更改结果显示

{
    "schema":{
        "type":"struct",
        "fields":[
            {
                "name":"a",
                "type":"double",
                "nullable":true,
                "metadata":{

                }
            },
            {
                "name":"b",
                "type":"double",
                "nullable":true,
                "metadata":{

                }
            },
            {
                "name":"c",
                "type":"null",
                "nullable":true,
                "metadata":{

                }
            }
        ]
    },
    "data":[
        {
            "a":5.1,
            "b":3.5
        },
        {
            "a":5.1,
            "b":3.5
        }
    ]
}

wangcheng15 added a commit to wangcheng15/byzer-notebook-vue that referenced this issue Mar 2, 2022
wangcheng15 added a commit to wangcheng15/byzer-notebook-vue that referenced this issue Mar 2, 2022
githubnameting pushed a commit that referenced this issue Mar 2, 2022
@Lindsaylin Lindsaylin changed the title 接口 /api/job/{$job_id} 取数据表结果,缺少 table schema 信息导致可能缺列 [bug] 修复了接口 /api/job/{$job_id} 取数结果因缺少 table schema 信息导致可能缺列的问题.Fix the problem that the interface/API /job/{$job_id} may be missing columns due to the lack of table schema information. Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants