Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

add serialization support for expression #712

Merged

Conversation

penghuo
Copy link
Contributor

@penghuo penghuo commented Aug 26, 2020

Description of changes:*

  1. Move all the Function to the new Expression DSL solution which support serialization by default.
  2. Add ExprShortValue.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dai-chen
Copy link
Member

Could you help remove the following try-catch in FilterQueryBuilder?

  public QueryBuilder build(Expression expr) {
    try {
      return expr.accept(this, null);
    } catch (IllegalStateException e) {
      //TODO: remove this try-catch once arithmetic and all expressions are serializable
      return null;
    }
  }

Copy link
Member

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@penghuo penghuo merged commit bbbfc75 into opendistro-for-elasticsearch:develop Aug 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants