Skip to content

The dict_id was lost when constructing the logic plan. #6784

@tanruixiang

Description

@tanruixiang

Describe the bug

One of the simplest sql statements: select * from table; In the construction of the logical plan, Projection will use to_field at the bottom to construct DFField, and then to_field ignore the dict_id. This will lead to encoding errors when using IPC if there are dictionary columns.
We are glad to contribute to the community and solve this problem.
To solve this problem, it may be necessary to add interfaces to the ExprSchema, for example by adding dict_is_ordered and dict_id interfaces, or by adding a direct get_dffield interface. Or there is a better way other than the two mentioned above. Both methods have a certain amount of work and we are not sure which one to use or if there is a better way. We hope community can provide some comments and help.

Here is a draft of one of the methods:
CeresDB#3

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions