Skip to content

Commit

Permalink
[multistage] Evaluate literal expression during query parsing (#11438)
Browse files Browse the repository at this point in the history
* Evaluate literal expression during query parsing

* make string/bytes literal working with cast

* simplify EvaluateLiteralRule

* Support decimal as a literal in thrift

* address comments
  • Loading branch information
xiangfu0 committed Sep 2, 2023
1 parent c48d7f8 commit a485778
Show file tree
Hide file tree
Showing 32 changed files with 1,218 additions and 904 deletions.
Expand Up @@ -25,7 +25,7 @@
package org.apache.pinot.common.request;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2022-05-02")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-08-31")
public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, BrokerRequest._Fields>, java.io.Serializable, Cloneable, Comparable<BrokerRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BrokerRequest");

Expand All @@ -35,8 +35,8 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BrokerRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BrokerRequestTupleSchemeFactory();

public @org.apache.thrift.annotation.Nullable QuerySource querySource; // optional
public @org.apache.thrift.annotation.Nullable org.apache.pinot.common.request.PinotQuery pinotQuery; // optional
private @org.apache.thrift.annotation.Nullable QuerySource querySource; // optional
private @org.apache.thrift.annotation.Nullable org.apache.pinot.common.request.PinotQuery pinotQuery; // optional

/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
Expand Down Expand Up @@ -144,9 +144,8 @@ public QuerySource getQuerySource() {
return this.querySource;
}

public BrokerRequest setQuerySource(@org.apache.thrift.annotation.Nullable QuerySource querySource) {
public void setQuerySource(@org.apache.thrift.annotation.Nullable QuerySource querySource) {
this.querySource = querySource;
return this;
}

public void unsetQuerySource() {
Expand All @@ -169,9 +168,8 @@ public org.apache.pinot.common.request.PinotQuery getPinotQuery() {
return this.pinotQuery;
}

public BrokerRequest setPinotQuery(@org.apache.thrift.annotation.Nullable org.apache.pinot.common.request.PinotQuery pinotQuery) {
public void setPinotQuery(@org.apache.thrift.annotation.Nullable org.apache.pinot.common.request.PinotQuery pinotQuery) {
this.pinotQuery = pinotQuery;
return this;
}

public void unsetPinotQuery() {
Expand Down Expand Up @@ -428,8 +426,6 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, BrokerRequest struc
iprot.readFieldEnd();
}
iprot.readStructEnd();

// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}

Expand Down

0 comments on commit a485778

Please sign in to comment.