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

ColumnExpression encode and decode are not matched #4412

Closed
Linary opened this issue Jul 13, 2022 · 0 comments · Fixed by #4413
Closed

ColumnExpression encode and decode are not matched #4412

Linary opened this issue Jul 13, 2022 · 0 comments · Fixed by #4413
Labels
severity/minor Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@Linary
Copy link
Contributor

Linary commented Jul 13, 2022

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Can't decode ColumnExpression, it will report failed like:

F20220713 17:35:04.868080 830015 Value.cpp:749] Check failed: type_ == Type::INT (__EMPTY__ vs. INT) 

The reason is that the implementation of encode and decode methods do not match.

void ColumnExpression::writeTo(Encoder &encoder) const {
  encoder << kind_;
  // call Expression::Encoder::operator<<(size_t size)
  encoder << index_;
}

void ColumnExpression::resetFrom(Decoder &decoder) {
  // Expression::Decoder::readValue()
  index_ = decoder.readValue().getInt();
}

Your Environments (required)

  • OS: Linux hw-ecs 4.18.0-348.7.1.el8_5.x86_64 Parser framework #1 SMP
  • Compiler: g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)
  • CPU: x86_64
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:

  1. make a ColumnExpression object
  2. encode it to string
  3. decode string

Expected behavior

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants