From a0198ce8aef3d18d739cd9599ded1b2ae8937b5b Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Fri, 11 Aug 2023 17:09:30 +0800 Subject: [PATCH] Support json contains feature (#25384) Signed-off-by: cai.zhang --- internal/core/src/common/Types.h | 1 + internal/core/src/pb/plan.pb.cc | 995 +++++++++++++++--- internal/core/src/pb/plan.pb.h | 955 ++++++++++++++++- internal/core/src/query/Expr.h | 24 + internal/core/src/query/ExprImpl.h | 15 + internal/core/src/query/PlanProto.cpp | 88 ++ internal/core/src/query/PlanProto.h | 3 + .../src/query/generated/ExecExprVisitor.h | 23 + internal/core/src/query/generated/Expr.cpp | 5 + .../core/src/query/generated/ExprVisitor.h | 3 + .../query/generated/ExtractInfoExprVisitor.h | 3 + .../src/query/generated/ShowExprVisitor.h | 3 + .../src/query/generated/VerifyExprVisitor.h | 3 + .../src/query/visitors/ExecExprVisitor.cpp | 468 +++++++- .../query/visitors/ExtractInfoExprVisitor.cpp | 5 + .../src/query/visitors/ShowExprVisitor.cpp | 17 + .../src/query/visitors/VerifyExprVisitor.cpp | 5 + internal/core/unittest/test_expr.cpp | 811 ++++++++++++++ internal/core/unittest/test_utils/DataGen.h | 7 +- internal/parser/planparserv2/Plan.g4 | 5 + .../parser/planparserv2/generated/Plan.interp | 6 +- .../parser/planparserv2/generated/Plan.tokens | 18 +- .../planparserv2/generated/PlanLexer.interp | 8 +- .../planparserv2/generated/PlanLexer.tokens | 18 +- .../generated/plan_base_visitor.go | 12 + .../planparserv2/generated/plan_lexer.go | 541 +++++----- .../planparserv2/generated/plan_parser.go | 607 ++++++++--- .../planparserv2/generated/plan_visitor.go | 9 + .../parser/planparserv2/parser_visitor.go | 145 ++- .../planparserv2/plan_parser_v2_test.go | 280 ++++- internal/proto/plan.proto | 24 + internal/proto/planpb/plan.pb.go | 433 +++++--- tests/integration/jsonexpr/json_expr_test.go | 127 ++- 33 files changed, 4907 insertions(+), 760 deletions(-) diff --git a/internal/core/src/common/Types.h b/internal/core/src/common/Types.h index 023d51af8..0846b8cb5 100644 --- a/internal/core/src/common/Types.h +++ b/internal/core/src/common/Types.h @@ -83,6 +83,7 @@ using VectorArray = proto::schema::VectorField; using IdArray = proto::schema::IDs; using InsertData = proto::segcore::InsertRecord; using PkType = std::variant; +using ContainsType = proto::plan::JSONContainsExpr_JSONOp; inline bool IsPrimaryKeyDataType(DataType data_type) { diff --git a/internal/core/src/pb/plan.pb.cc b/internal/core/src/pb/plan.pb.cc index fa5753e05..592b90fa6 100644 --- a/internal/core/src/pb/plan.pb.cc +++ b/internal/core/src/pb/plan.pb.cc @@ -37,6 +37,20 @@ struct GenericValueDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GenericValueDefaultTypeInternal _GenericValue_default_instance_; +PROTOBUF_CONSTEXPR Array::Array( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.array_)*/{} + , /*decltype(_impl_.same_type_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ArrayDefaultTypeInternal { + PROTOBUF_CONSTEXPR ArrayDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ArrayDefaultTypeInternal() {} + union { + Array _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArrayDefaultTypeInternal _Array_default_instance_; PROTOBUF_CONSTEXPR QueryInfo::QueryInfo( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.metric_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} @@ -172,6 +186,22 @@ struct TermExprDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TermExprDefaultTypeInternal _TermExpr_default_instance_; +PROTOBUF_CONSTEXPR JSONContainsExpr::JSONContainsExpr( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.elements_)*/{} + , /*decltype(_impl_.column_info_)*/nullptr + , /*decltype(_impl_.op_)*/0 + , /*decltype(_impl_.elements_same_type_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct JSONContainsExprDefaultTypeInternal { + PROTOBUF_CONSTEXPR JSONContainsExprDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~JSONContainsExprDefaultTypeInternal() {} + union { + JSONContainsExpr _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JSONContainsExprDefaultTypeInternal _JSONContainsExpr_default_instance_; PROTOBUF_CONSTEXPR UnaryExpr::UnaryExpr( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.child_)*/nullptr @@ -324,8 +354,8 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace plan } // namespace proto } // namespace milvus -static ::_pb::Metadata file_level_metadata_plan_2eproto[20]; -static const ::_pb::EnumDescriptor* file_level_enum_descriptors_plan_2eproto[4]; +static ::_pb::Metadata file_level_metadata_plan_2eproto[22]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_plan_2eproto[5]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_plan_2eproto = nullptr; const uint32_t TableStruct_plan_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -339,8 +369,17 @@ const uint32_t TableStruct_plan_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(pro ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::GenericValue, _impl_.val_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::Array, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::Array, _impl_.array_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::Array, _impl_.same_type_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::QueryInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -422,6 +461,16 @@ const uint32_t TableStruct_plan_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(pro PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::TermExpr, _impl_.values_), PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::TermExpr, _impl_.is_in_field_), ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::JSONContainsExpr, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::JSONContainsExpr, _impl_.column_info_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::JSONContainsExpr, _impl_.elements_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::JSONContainsExpr, _impl_.op_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::JSONContainsExpr, _impl_.elements_same_type_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::UnaryExpr, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -491,6 +540,7 @@ const uint32_t TableStruct_plan_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(pro ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::Expr, _impl_.expr_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::VectorANNS, _internal_metadata_), @@ -526,29 +576,32 @@ const uint32_t TableStruct_plan_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(pro }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::milvus::proto::plan::GenericValue)}, - { 11, -1, -1, sizeof(::milvus::proto::plan::QueryInfo)}, - { 21, -1, -1, sizeof(::milvus::proto::plan::ColumnInfo)}, - { 33, -1, -1, sizeof(::milvus::proto::plan::ColumnExpr)}, - { 40, -1, -1, sizeof(::milvus::proto::plan::ExistsExpr)}, - { 47, -1, -1, sizeof(::milvus::proto::plan::ValueExpr)}, - { 54, -1, -1, sizeof(::milvus::proto::plan::UnaryRangeExpr)}, - { 63, -1, -1, sizeof(::milvus::proto::plan::BinaryRangeExpr)}, - { 74, -1, -1, sizeof(::milvus::proto::plan::CompareExpr)}, - { 83, -1, -1, sizeof(::milvus::proto::plan::TermExpr)}, - { 92, -1, -1, sizeof(::milvus::proto::plan::UnaryExpr)}, - { 100, -1, -1, sizeof(::milvus::proto::plan::BinaryExpr)}, - { 109, -1, -1, sizeof(::milvus::proto::plan::BinaryArithOp)}, - { 118, -1, -1, sizeof(::milvus::proto::plan::BinaryArithExpr)}, - { 127, -1, -1, sizeof(::milvus::proto::plan::BinaryArithOpEvalRangeExpr)}, - { 138, -1, -1, sizeof(::milvus::proto::plan::AlwaysTrueExpr)}, - { 144, -1, -1, sizeof(::milvus::proto::plan::Expr)}, - { 163, -1, -1, sizeof(::milvus::proto::plan::VectorANNS)}, - { 174, -1, -1, sizeof(::milvus::proto::plan::QueryPlanNode)}, - { 183, -1, -1, sizeof(::milvus::proto::plan::PlanNode)}, + { 12, -1, -1, sizeof(::milvus::proto::plan::Array)}, + { 20, -1, -1, sizeof(::milvus::proto::plan::QueryInfo)}, + { 30, -1, -1, sizeof(::milvus::proto::plan::ColumnInfo)}, + { 42, -1, -1, sizeof(::milvus::proto::plan::ColumnExpr)}, + { 49, -1, -1, sizeof(::milvus::proto::plan::ExistsExpr)}, + { 56, -1, -1, sizeof(::milvus::proto::plan::ValueExpr)}, + { 63, -1, -1, sizeof(::milvus::proto::plan::UnaryRangeExpr)}, + { 72, -1, -1, sizeof(::milvus::proto::plan::BinaryRangeExpr)}, + { 83, -1, -1, sizeof(::milvus::proto::plan::CompareExpr)}, + { 92, -1, -1, sizeof(::milvus::proto::plan::TermExpr)}, + { 101, -1, -1, sizeof(::milvus::proto::plan::JSONContainsExpr)}, + { 111, -1, -1, sizeof(::milvus::proto::plan::UnaryExpr)}, + { 119, -1, -1, sizeof(::milvus::proto::plan::BinaryExpr)}, + { 128, -1, -1, sizeof(::milvus::proto::plan::BinaryArithOp)}, + { 137, -1, -1, sizeof(::milvus::proto::plan::BinaryArithExpr)}, + { 146, -1, -1, sizeof(::milvus::proto::plan::BinaryArithOpEvalRangeExpr)}, + { 157, -1, -1, sizeof(::milvus::proto::plan::AlwaysTrueExpr)}, + { 163, -1, -1, sizeof(::milvus::proto::plan::Expr)}, + { 183, -1, -1, sizeof(::milvus::proto::plan::VectorANNS)}, + { 194, -1, -1, sizeof(::milvus::proto::plan::QueryPlanNode)}, + { 203, -1, -1, sizeof(::milvus::proto::plan::PlanNode)}, }; static const ::_pb::Message* const file_default_instances[] = { &::milvus::proto::plan::_GenericValue_default_instance_._instance, + &::milvus::proto::plan::_Array_default_instance_._instance, &::milvus::proto::plan::_QueryInfo_default_instance_._instance, &::milvus::proto::plan::_ColumnInfo_default_instance_._instance, &::milvus::proto::plan::_ColumnExpr_default_instance_._instance, @@ -558,6 +611,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::milvus::proto::plan::_BinaryRangeExpr_default_instance_._instance, &::milvus::proto::plan::_CompareExpr_default_instance_._instance, &::milvus::proto::plan::_TermExpr_default_instance_._instance, + &::milvus::proto::plan::_JSONContainsExpr_default_instance_._instance, &::milvus::proto::plan::_UnaryExpr_default_instance_._instance, &::milvus::proto::plan::_BinaryExpr_default_instance_._instance, &::milvus::proto::plan::_BinaryArithOp_default_instance_._instance, @@ -572,109 +626,120 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_plan_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\nplan.proto\022\021milvus.proto.plan\032\014schema." - "proto\"i\n\014GenericValue\022\022\n\010bool_val\030\001 \001(\010H" - "\000\022\023\n\tint64_val\030\002 \001(\003H\000\022\023\n\tfloat_val\030\003 \001(" - "\001H\000\022\024\n\nstring_val\030\004 \001(\tH\000B\005\n\003val\"\\\n\tQuer" - "yInfo\022\014\n\004topk\030\001 \001(\003\022\023\n\013metric_type\030\003 \001(\t" - "\022\025\n\rsearch_params\030\004 \001(\t\022\025\n\rround_decimal" - "\030\005 \001(\003\"\252\001\n\nColumnInfo\022\020\n\010field_id\030\001 \001(\003\022" - "0\n\tdata_type\030\002 \001(\0162\035.milvus.proto.schema" - ".DataType\022\026\n\016is_primary_key\030\003 \001(\010\022\021\n\tis_" - "autoID\030\004 \001(\010\022\023\n\013nested_path\030\005 \003(\t\022\030\n\020is_" - "partition_key\030\006 \001(\010\"9\n\nColumnExpr\022+\n\004inf" - "o\030\001 \001(\0132\035.milvus.proto.plan.ColumnInfo\"9" - "\n\nExistsExpr\022+\n\004info\030\001 \001(\0132\035.milvus.prot" - "o.plan.ColumnInfo\";\n\tValueExpr\022.\n\005value\030" - "\001 \001(\0132\037.milvus.proto.plan.GenericValue\"\233" - "\001\n\016UnaryRangeExpr\0222\n\013column_info\030\001 \001(\0132\035" - ".milvus.proto.plan.ColumnInfo\022%\n\002op\030\002 \001(" - "\0162\031.milvus.proto.plan.OpType\022.\n\005value\030\003 " - "\001(\0132\037.milvus.proto.plan.GenericValue\"\343\001\n" - "\017BinaryRangeExpr\0222\n\013column_info\030\001 \001(\0132\035." - "milvus.proto.plan.ColumnInfo\022\027\n\017lower_in" - "clusive\030\002 \001(\010\022\027\n\017upper_inclusive\030\003 \001(\010\0224" - "\n\013lower_value\030\004 \001(\0132\037.milvus.proto.plan." - "GenericValue\0224\n\013upper_value\030\005 \001(\0132\037.milv" - "us.proto.plan.GenericValue\"\247\001\n\013CompareEx" - "pr\0227\n\020left_column_info\030\001 \001(\0132\035.milvus.pr" - "oto.plan.ColumnInfo\0228\n\021right_column_info" - "\030\002 \001(\0132\035.milvus.proto.plan.ColumnInfo\022%\n" - "\002op\030\003 \001(\0162\031.milvus.proto.plan.OpType\"\204\001\n" - "\010TermExpr\0222\n\013column_info\030\001 \001(\0132\035.milvus." - "proto.plan.ColumnInfo\022/\n\006values\030\002 \003(\0132\037." - "milvus.proto.plan.GenericValue\022\023\n\013is_in_" - "field\030\003 \001(\010\"\206\001\n\tUnaryExpr\0220\n\002op\030\001 \001(\0162$." - "milvus.proto.plan.UnaryExpr.UnaryOp\022&\n\005c" - "hild\030\002 \001(\0132\027.milvus.proto.plan.Expr\"\037\n\007U" - "naryOp\022\013\n\007Invalid\020\000\022\007\n\003Not\020\001\"\307\001\n\nBinaryE" - "xpr\0222\n\002op\030\001 \001(\0162&.milvus.proto.plan.Bina" - "ryExpr.BinaryOp\022%\n\004left\030\002 \001(\0132\027.milvus.p" - "roto.plan.Expr\022&\n\005right\030\003 \001(\0132\027.milvus.p" - "roto.plan.Expr\"6\n\010BinaryOp\022\013\n\007Invalid\020\000\022" - "\016\n\nLogicalAnd\020\001\022\r\n\tLogicalOr\020\002\"\255\001\n\rBinar" - "yArithOp\0222\n\013column_info\030\001 \001(\0132\035.milvus.p" - "roto.plan.ColumnInfo\0220\n\010arith_op\030\002 \001(\0162\036" - ".milvus.proto.plan.ArithOpType\0226\n\rright_" - "operand\030\003 \001(\0132\037.milvus.proto.plan.Generi" - "cValue\"\214\001\n\017BinaryArithExpr\022%\n\004left\030\001 \001(\013" - "2\027.milvus.proto.plan.Expr\022&\n\005right\030\002 \001(\013" - "2\027.milvus.proto.plan.Expr\022*\n\002op\030\003 \001(\0162\036." - "milvus.proto.plan.ArithOpType\"\221\002\n\032Binary" - "ArithOpEvalRangeExpr\0222\n\013column_info\030\001 \001(" - "\0132\035.milvus.proto.plan.ColumnInfo\0220\n\010arit" - "h_op\030\002 \001(\0162\036.milvus.proto.plan.ArithOpTy" - "pe\0226\n\rright_operand\030\003 \001(\0132\037.milvus.proto" - ".plan.GenericValue\022%\n\002op\030\004 \001(\0162\031.milvus." - "proto.plan.OpType\022.\n\005value\030\005 \001(\0132\037.milvu" - "s.proto.plan.GenericValue\"\020\n\016AlwaysTrueE" - "xpr\"\334\005\n\004Expr\0220\n\tterm_expr\030\001 \001(\0132\033.milvus" - ".proto.plan.TermExprH\000\0222\n\nunary_expr\030\002 \001" - "(\0132\034.milvus.proto.plan.UnaryExprH\000\0224\n\013bi" - "nary_expr\030\003 \001(\0132\035.milvus.proto.plan.Bina" - "ryExprH\000\0226\n\014compare_expr\030\004 \001(\0132\036.milvus." - "proto.plan.CompareExprH\000\022=\n\020unary_range_" - "expr\030\005 \001(\0132!.milvus.proto.plan.UnaryRang" - "eExprH\000\022\?\n\021binary_range_expr\030\006 \001(\0132\".mil" - "vus.proto.plan.BinaryRangeExprH\000\022X\n\037bina" - "ry_arith_op_eval_range_expr\030\007 \001(\0132-.milv" - "us.proto.plan.BinaryArithOpEvalRangeExpr" - "H\000\022\?\n\021binary_arith_expr\030\010 \001(\0132\".milvus.p" - "roto.plan.BinaryArithExprH\000\0222\n\nvalue_exp" - "r\030\t \001(\0132\034.milvus.proto.plan.ValueExprH\000\022" - "4\n\013column_expr\030\n \001(\0132\035.milvus.proto.plan" - ".ColumnExprH\000\0224\n\013exists_expr\030\013 \001(\0132\035.mil" - "vus.proto.plan.ExistsExprH\000\022=\n\020always_tr" - "ue_expr\030\014 \001(\0132!.milvus.proto.plan.Always" - "TrueExprH\000B\006\n\004expr\"\251\001\n\nVectorANNS\022\021\n\tis_" - "binary\030\001 \001(\010\022\020\n\010field_id\030\002 \001(\003\022+\n\npredic" - "ates\030\003 \001(\0132\027.milvus.proto.plan.Expr\0220\n\nq" - "uery_info\030\004 \001(\0132\034.milvus.proto.plan.Quer" - "yInfo\022\027\n\017placeholder_tag\030\005 \001(\t\"]\n\rQueryP" - "lanNode\022+\n\npredicates\030\001 \001(\0132\027.milvus.pro" - "to.plan.Expr\022\020\n\010is_count\030\002 \001(\010\022\r\n\005limit\030" - "\003 \001(\003\"\304\001\n\010PlanNode\0224\n\013vector_anns\030\001 \001(\0132" - "\035.milvus.proto.plan.VectorANNSH\000\022-\n\npred" - "icates\030\002 \001(\0132\027.milvus.proto.plan.ExprH\000\022" - "1\n\005query\030\004 \001(\0132 .milvus.proto.plan.Query" - "PlanNodeH\000\022\030\n\020output_field_ids\030\003 \003(\003B\006\n\004" - "node*\272\001\n\006OpType\022\013\n\007Invalid\020\000\022\017\n\013GreaterT" - "han\020\001\022\020\n\014GreaterEqual\020\002\022\014\n\010LessThan\020\003\022\r\n" - "\tLessEqual\020\004\022\t\n\005Equal\020\005\022\014\n\010NotEqual\020\006\022\017\n" - "\013PrefixMatch\020\007\022\020\n\014PostfixMatch\020\010\022\t\n\005Matc" - "h\020\t\022\t\n\005Range\020\n\022\006\n\002In\020\013\022\t\n\005NotIn\020\014*G\n\013Ari" - "thOpType\022\013\n\007Unknown\020\000\022\007\n\003Add\020\001\022\007\n\003Sub\020\002\022" - "\007\n\003Mul\020\003\022\007\n\003Div\020\004\022\007\n\003Mod\020\005B3Z1github.com" - "/milvus-io/milvus/internal/proto/planpbb" - "\006proto3" + "proto\"\230\001\n\014GenericValue\022\022\n\010bool_val\030\001 \001(\010" + "H\000\022\023\n\tint64_val\030\002 \001(\003H\000\022\023\n\tfloat_val\030\003 \001" + "(\001H\000\022\024\n\nstring_val\030\004 \001(\tH\000\022-\n\tarray_val\030" + "\005 \001(\0132\030.milvus.proto.plan.ArrayH\000B\005\n\003val" + "\"J\n\005Array\022.\n\005array\030\001 \003(\0132\037.milvus.proto." + "plan.GenericValue\022\021\n\tsame_type\030\002 \001(\010\"\\\n\t" + "QueryInfo\022\014\n\004topk\030\001 \001(\003\022\023\n\013metric_type\030\003" + " \001(\t\022\025\n\rsearch_params\030\004 \001(\t\022\025\n\rround_dec" + "imal\030\005 \001(\003\"\252\001\n\nColumnInfo\022\020\n\010field_id\030\001 " + "\001(\003\0220\n\tdata_type\030\002 \001(\0162\035.milvus.proto.sc" + "hema.DataType\022\026\n\016is_primary_key\030\003 \001(\010\022\021\n" + "\tis_autoID\030\004 \001(\010\022\023\n\013nested_path\030\005 \003(\t\022\030\n" + "\020is_partition_key\030\006 \001(\010\"9\n\nColumnExpr\022+\n" + "\004info\030\001 \001(\0132\035.milvus.proto.plan.ColumnIn" + "fo\"9\n\nExistsExpr\022+\n\004info\030\001 \001(\0132\035.milvus." + "proto.plan.ColumnInfo\";\n\tValueExpr\022.\n\005va" + "lue\030\001 \001(\0132\037.milvus.proto.plan.GenericVal" + "ue\"\233\001\n\016UnaryRangeExpr\0222\n\013column_info\030\001 \001" + "(\0132\035.milvus.proto.plan.ColumnInfo\022%\n\002op\030" + "\002 \001(\0162\031.milvus.proto.plan.OpType\022.\n\005valu" + "e\030\003 \001(\0132\037.milvus.proto.plan.GenericValue" + "\"\343\001\n\017BinaryRangeExpr\0222\n\013column_info\030\001 \001(" + "\0132\035.milvus.proto.plan.ColumnInfo\022\027\n\017lowe" + "r_inclusive\030\002 \001(\010\022\027\n\017upper_inclusive\030\003 \001" + "(\010\0224\n\013lower_value\030\004 \001(\0132\037.milvus.proto.p" + "lan.GenericValue\0224\n\013upper_value\030\005 \001(\0132\037." + "milvus.proto.plan.GenericValue\"\247\001\n\013Compa" + "reExpr\0227\n\020left_column_info\030\001 \001(\0132\035.milvu" + "s.proto.plan.ColumnInfo\0228\n\021right_column_" + "info\030\002 \001(\0132\035.milvus.proto.plan.ColumnInf" + "o\022%\n\002op\030\003 \001(\0162\031.milvus.proto.plan.OpType" + "\"\204\001\n\010TermExpr\0222\n\013column_info\030\001 \001(\0132\035.mil" + "vus.proto.plan.ColumnInfo\022/\n\006values\030\002 \003(" + "\0132\037.milvus.proto.plan.GenericValue\022\023\n\013is" + "_in_field\030\003 \001(\010\"\224\002\n\020JSONContainsExpr\0222\n\013" + "column_info\030\001 \001(\0132\035.milvus.proto.plan.Co" + "lumnInfo\0221\n\010elements\030\002 \003(\0132\037.milvus.prot" + "o.plan.GenericValue\0226\n\002op\030\003 \001(\0162*.milvus" + ".proto.plan.JSONContainsExpr.JSONOp\022\032\n\022e" + "lements_same_type\030\004 \001(\010\"E\n\006JSONOp\022\013\n\007Inv" + "alid\020\000\022\014\n\010Contains\020\001\022\017\n\013ContainsAll\020\002\022\017\n" + "\013ContainsAny\020\003\"\206\001\n\tUnaryExpr\0220\n\002op\030\001 \001(\016" + "2$.milvus.proto.plan.UnaryExpr.UnaryOp\022&" + "\n\005child\030\002 \001(\0132\027.milvus.proto.plan.Expr\"\037" + "\n\007UnaryOp\022\013\n\007Invalid\020\000\022\007\n\003Not\020\001\"\307\001\n\nBina" + "ryExpr\0222\n\002op\030\001 \001(\0162&.milvus.proto.plan.B" + "inaryExpr.BinaryOp\022%\n\004left\030\002 \001(\0132\027.milvu" + "s.proto.plan.Expr\022&\n\005right\030\003 \001(\0132\027.milvu" + "s.proto.plan.Expr\"6\n\010BinaryOp\022\013\n\007Invalid" + "\020\000\022\016\n\nLogicalAnd\020\001\022\r\n\tLogicalOr\020\002\"\255\001\n\rBi" + "naryArithOp\0222\n\013column_info\030\001 \001(\0132\035.milvu" + "s.proto.plan.ColumnInfo\0220\n\010arith_op\030\002 \001(" + "\0162\036.milvus.proto.plan.ArithOpType\0226\n\rrig" + "ht_operand\030\003 \001(\0132\037.milvus.proto.plan.Gen" + "ericValue\"\214\001\n\017BinaryArithExpr\022%\n\004left\030\001 " + "\001(\0132\027.milvus.proto.plan.Expr\022&\n\005right\030\002 " + "\001(\0132\027.milvus.proto.plan.Expr\022*\n\002op\030\003 \001(\016" + "2\036.milvus.proto.plan.ArithOpType\"\221\002\n\032Bin" + "aryArithOpEvalRangeExpr\0222\n\013column_info\030\001" + " \001(\0132\035.milvus.proto.plan.ColumnInfo\0220\n\010a" + "rith_op\030\002 \001(\0162\036.milvus.proto.plan.ArithO" + "pType\0226\n\rright_operand\030\003 \001(\0132\037.milvus.pr" + "oto.plan.GenericValue\022%\n\002op\030\004 \001(\0162\031.milv" + "us.proto.plan.OpType\022.\n\005value\030\005 \001(\0132\037.mi" + "lvus.proto.plan.GenericValue\"\020\n\016AlwaysTr" + "ueExpr\"\237\006\n\004Expr\0220\n\tterm_expr\030\001 \001(\0132\033.mil" + "vus.proto.plan.TermExprH\000\0222\n\nunary_expr\030" + "\002 \001(\0132\034.milvus.proto.plan.UnaryExprH\000\0224\n" + "\013binary_expr\030\003 \001(\0132\035.milvus.proto.plan.B" + "inaryExprH\000\0226\n\014compare_expr\030\004 \001(\0132\036.milv" + "us.proto.plan.CompareExprH\000\022=\n\020unary_ran" + "ge_expr\030\005 \001(\0132!.milvus.proto.plan.UnaryR" + "angeExprH\000\022\?\n\021binary_range_expr\030\006 \001(\0132\"." + "milvus.proto.plan.BinaryRangeExprH\000\022X\n\037b" + "inary_arith_op_eval_range_expr\030\007 \001(\0132-.m" + "ilvus.proto.plan.BinaryArithOpEvalRangeE" + "xprH\000\022\?\n\021binary_arith_expr\030\010 \001(\0132\".milvu" + "s.proto.plan.BinaryArithExprH\000\0222\n\nvalue_" + "expr\030\t \001(\0132\034.milvus.proto.plan.ValueExpr" + "H\000\0224\n\013column_expr\030\n \001(\0132\035.milvus.proto.p" + "lan.ColumnExprH\000\0224\n\013exists_expr\030\013 \001(\0132\035." + "milvus.proto.plan.ExistsExprH\000\022=\n\020always" + "_true_expr\030\014 \001(\0132!.milvus.proto.plan.Alw" + "aysTrueExprH\000\022A\n\022json_contains_expr\030\r \001(" + "\0132#.milvus.proto.plan.JSONContainsExprH\000" + "B\006\n\004expr\"\251\001\n\nVectorANNS\022\021\n\tis_binary\030\001 \001" + "(\010\022\020\n\010field_id\030\002 \001(\003\022+\n\npredicates\030\003 \001(\013" + "2\027.milvus.proto.plan.Expr\0220\n\nquery_info\030" + "\004 \001(\0132\034.milvus.proto.plan.QueryInfo\022\027\n\017p" + "laceholder_tag\030\005 \001(\t\"]\n\rQueryPlanNode\022+\n" + "\npredicates\030\001 \001(\0132\027.milvus.proto.plan.Ex" + "pr\022\020\n\010is_count\030\002 \001(\010\022\r\n\005limit\030\003 \001(\003\"\304\001\n\010" + "PlanNode\0224\n\013vector_anns\030\001 \001(\0132\035.milvus.p" + "roto.plan.VectorANNSH\000\022-\n\npredicates\030\002 \001" + "(\0132\027.milvus.proto.plan.ExprH\000\0221\n\005query\030\004" + " \001(\0132 .milvus.proto.plan.QueryPlanNodeH\000" + "\022\030\n\020output_field_ids\030\003 \003(\003B\006\n\004node*\272\001\n\006O" + "pType\022\013\n\007Invalid\020\000\022\017\n\013GreaterThan\020\001\022\020\n\014G" + "reaterEqual\020\002\022\014\n\010LessThan\020\003\022\r\n\tLessEqual" + "\020\004\022\t\n\005Equal\020\005\022\014\n\010NotEqual\020\006\022\017\n\013PrefixMat" + "ch\020\007\022\020\n\014PostfixMatch\020\010\022\t\n\005Match\020\t\022\t\n\005Ran" + "ge\020\n\022\006\n\002In\020\013\022\t\n\005NotIn\020\014*G\n\013ArithOpType\022\013" + "\n\007Unknown\020\000\022\007\n\003Add\020\001\022\007\n\003Sub\020\002\022\007\n\003Mul\020\003\022\007" + "\n\003Div\020\004\022\007\n\003Mod\020\005B3Z1github.com/milvus-io" + "/milvus/internal/proto/planpbb\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_plan_2eproto_deps[1] = { &::descriptor_table_schema_2eproto, }; static ::_pbi::once_flag descriptor_table_plan_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_plan_2eproto = { - false, false, 3767, descriptor_table_protodef_plan_2eproto, + false, false, 4237, descriptor_table_protodef_plan_2eproto, "plan.proto", - &descriptor_table_plan_2eproto_once, descriptor_table_plan_2eproto_deps, 1, 20, + &descriptor_table_plan_2eproto_once, descriptor_table_plan_2eproto_deps, 1, 22, schemas, file_default_instances, TableStruct_plan_2eproto::offsets, file_level_metadata_plan_2eproto, file_level_enum_descriptors_plan_2eproto, file_level_service_descriptors_plan_2eproto, @@ -688,10 +753,35 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_in namespace milvus { namespace proto { namespace plan { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* UnaryExpr_UnaryOp_descriptor() { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* JSONContainsExpr_JSONOp_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_plan_2eproto); return file_level_enum_descriptors_plan_2eproto[0]; } +bool JSONContainsExpr_JSONOp_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr JSONContainsExpr_JSONOp JSONContainsExpr::Invalid; +constexpr JSONContainsExpr_JSONOp JSONContainsExpr::Contains; +constexpr JSONContainsExpr_JSONOp JSONContainsExpr::ContainsAll; +constexpr JSONContainsExpr_JSONOp JSONContainsExpr::ContainsAny; +constexpr JSONContainsExpr_JSONOp JSONContainsExpr::JSONOp_MIN; +constexpr JSONContainsExpr_JSONOp JSONContainsExpr::JSONOp_MAX; +constexpr int JSONContainsExpr::JSONOp_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* UnaryExpr_UnaryOp_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_plan_2eproto); + return file_level_enum_descriptors_plan_2eproto[1]; +} bool UnaryExpr_UnaryOp_IsValid(int value) { switch (value) { case 0: @@ -711,7 +801,7 @@ constexpr int UnaryExpr::UnaryOp_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BinaryExpr_BinaryOp_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_plan_2eproto); - return file_level_enum_descriptors_plan_2eproto[1]; + return file_level_enum_descriptors_plan_2eproto[2]; } bool BinaryExpr_BinaryOp_IsValid(int value) { switch (value) { @@ -734,7 +824,7 @@ constexpr int BinaryExpr::BinaryOp_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* OpType_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_plan_2eproto); - return file_level_enum_descriptors_plan_2eproto[2]; + return file_level_enum_descriptors_plan_2eproto[3]; } bool OpType_IsValid(int value) { switch (value) { @@ -759,7 +849,7 @@ bool OpType_IsValid(int value) { const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ArithOpType_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_plan_2eproto); - return file_level_enum_descriptors_plan_2eproto[3]; + return file_level_enum_descriptors_plan_2eproto[4]; } bool ArithOpType_IsValid(int value) { switch (value) { @@ -780,8 +870,28 @@ bool ArithOpType_IsValid(int value) { class GenericValue::_Internal { public: + static const ::milvus::proto::plan::Array& array_val(const GenericValue* msg); }; +const ::milvus::proto::plan::Array& +GenericValue::_Internal::array_val(const GenericValue* msg) { + return *msg->_impl_.val_.array_val_; +} +void GenericValue::set_allocated_array_val(::milvus::proto::plan::Array* array_val) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_val(); + if (array_val) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(array_val); + if (message_arena != submessage_arena) { + array_val = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, array_val, submessage_arena); + } + set_has_array_val(); + _impl_.val_.array_val_ = array_val; + } + // @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.GenericValue.array_val) +} GenericValue::GenericValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -815,6 +925,11 @@ GenericValue::GenericValue(const GenericValue& from) _this->_internal_set_string_val(from._internal_string_val()); break; } + case kArrayVal: { + _this->_internal_mutable_array_val()->::milvus::proto::plan::Array::MergeFrom( + from._internal_array_val()); + break; + } case VAL_NOT_SET: { break; } @@ -873,6 +988,12 @@ void GenericValue::clear_val() { _impl_.val_.string_val_.Destroy(); break; } + case kArrayVal: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.val_.array_val_; + } + break; + } case VAL_NOT_SET: { break; } @@ -931,6 +1052,14 @@ const char* GenericValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; + // .milvus.proto.plan.Array array_val = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_array_val(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -988,6 +1117,13 @@ uint8_t* GenericValue::_InternalSerialize( 4, this->_internal_string_val(), target); } + // .milvus.proto.plan.Array array_val = 5; + if (_internal_has_array_val()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::array_val(this), + _Internal::array_val(this).GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -1027,6 +1163,13 @@ size_t GenericValue::ByteSizeLong() const { this->_internal_string_val()); break; } + // .milvus.proto.plan.Array array_val = 5; + case kArrayVal: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.val_.array_val_); + break; + } case VAL_NOT_SET: { break; } @@ -1066,6 +1209,11 @@ void GenericValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P _this->_internal_set_string_val(from._internal_string_val()); break; } + case kArrayVal: { + _this->_internal_mutable_array_val()->::milvus::proto::plan::Array::MergeFrom( + from._internal_array_val()); + break; + } case VAL_NOT_SET: { break; } @@ -1099,6 +1247,218 @@ void GenericValue::InternalSwap(GenericValue* other) { // =================================================================== +class Array::_Internal { + public: +}; + +Array::Array(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:milvus.proto.plan.Array) +} +Array::Array(const Array& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Array* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.array_){from._impl_.array_} + , decltype(_impl_.same_type_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.same_type_ = from._impl_.same_type_; + // @@protoc_insertion_point(copy_constructor:milvus.proto.plan.Array) +} + +inline void Array::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.array_){arena} + , decltype(_impl_.same_type_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +Array::~Array() { + // @@protoc_insertion_point(destructor:milvus.proto.plan.Array) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Array::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.array_.~RepeatedPtrField(); +} + +void Array::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Array::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.proto.plan.Array) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.array_.Clear(); + _impl_.same_type_ = false; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Array::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .milvus.proto.plan.GenericValue array = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_array(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + // bool same_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.same_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Array::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.plan.Array) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .milvus.proto.plan.GenericValue array = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_array_size()); i < n; i++) { + const auto& repfield = this->_internal_array(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + // bool same_type = 2; + if (this->_internal_same_type() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_same_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.plan.Array) + return target; +} + +size_t Array::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.proto.plan.Array) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .milvus.proto.plan.GenericValue array = 1; + total_size += 1UL * this->_internal_array_size(); + for (const auto& msg : this->_impl_.array_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // bool same_type = 2; + if (this->_internal_same_type() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Array::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Array::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Array::GetClassData() const { return &_class_data_; } + + +void Array::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.plan.Array) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.array_.MergeFrom(from._impl_.array_); + if (from._internal_same_type() != 0) { + _this->_internal_set_same_type(from._internal_same_type()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Array::CopyFrom(const Array& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.plan.Array) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Array::IsInitialized() const { + return true; +} + +void Array::InternalSwap(Array* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.array_.InternalSwap(&other->_impl_.array_); + swap(_impl_.same_type_, other->_impl_.same_type_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Array::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, + file_level_metadata_plan_2eproto[1]); +} + +// =================================================================== + class QueryInfo::_Internal { public: }; @@ -1407,7 +1767,7 @@ void QueryInfo::InternalSwap(QueryInfo* other) { ::PROTOBUF_NAMESPACE_ID::Metadata QueryInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[1]); + file_level_metadata_plan_2eproto[2]); } // =================================================================== @@ -1732,7 +2092,7 @@ void ColumnInfo::InternalSwap(ColumnInfo* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ColumnInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[2]); + file_level_metadata_plan_2eproto[3]); } // =================================================================== @@ -1925,7 +2285,7 @@ void ColumnExpr::InternalSwap(ColumnExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ColumnExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[3]); + file_level_metadata_plan_2eproto[4]); } // =================================================================== @@ -2118,7 +2478,7 @@ void ExistsExpr::InternalSwap(ExistsExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ExistsExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[4]); + file_level_metadata_plan_2eproto[5]); } // =================================================================== @@ -2311,7 +2671,7 @@ void ValueExpr::InternalSwap(ValueExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ValueExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[5]); + file_level_metadata_plan_2eproto[6]); } // =================================================================== @@ -2579,7 +2939,7 @@ void UnaryRangeExpr::InternalSwap(UnaryRangeExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata UnaryRangeExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[6]); + file_level_metadata_plan_2eproto[7]); } // =================================================================== @@ -2913,7 +3273,7 @@ void BinaryRangeExpr::InternalSwap(BinaryRangeExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BinaryRangeExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[7]); + file_level_metadata_plan_2eproto[8]); } // =================================================================== @@ -3181,7 +3541,7 @@ void CompareExpr::InternalSwap(CompareExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata CompareExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[8]); + file_level_metadata_plan_2eproto[9]); } // =================================================================== @@ -3439,7 +3799,296 @@ void TermExpr::InternalSwap(TermExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata TermExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[9]); + file_level_metadata_plan_2eproto[10]); +} + +// =================================================================== + +class JSONContainsExpr::_Internal { + public: + static const ::milvus::proto::plan::ColumnInfo& column_info(const JSONContainsExpr* msg); +}; + +const ::milvus::proto::plan::ColumnInfo& +JSONContainsExpr::_Internal::column_info(const JSONContainsExpr* msg) { + return *msg->_impl_.column_info_; +} +JSONContainsExpr::JSONContainsExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:milvus.proto.plan.JSONContainsExpr) +} +JSONContainsExpr::JSONContainsExpr(const JSONContainsExpr& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + JSONContainsExpr* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.elements_){from._impl_.elements_} + , decltype(_impl_.column_info_){nullptr} + , decltype(_impl_.op_){} + , decltype(_impl_.elements_same_type_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_column_info()) { + _this->_impl_.column_info_ = new ::milvus::proto::plan::ColumnInfo(*from._impl_.column_info_); + } + ::memcpy(&_impl_.op_, &from._impl_.op_, + static_cast(reinterpret_cast(&_impl_.elements_same_type_) - + reinterpret_cast(&_impl_.op_)) + sizeof(_impl_.elements_same_type_)); + // @@protoc_insertion_point(copy_constructor:milvus.proto.plan.JSONContainsExpr) +} + +inline void JSONContainsExpr::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.elements_){arena} + , decltype(_impl_.column_info_){nullptr} + , decltype(_impl_.op_){0} + , decltype(_impl_.elements_same_type_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +JSONContainsExpr::~JSONContainsExpr() { + // @@protoc_insertion_point(destructor:milvus.proto.plan.JSONContainsExpr) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void JSONContainsExpr::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.elements_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.column_info_; +} + +void JSONContainsExpr::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void JSONContainsExpr::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.proto.plan.JSONContainsExpr) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.elements_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.column_info_ != nullptr) { + delete _impl_.column_info_; + } + _impl_.column_info_ = nullptr; + ::memset(&_impl_.op_, 0, static_cast( + reinterpret_cast(&_impl_.elements_same_type_) - + reinterpret_cast(&_impl_.op_)) + sizeof(_impl_.elements_same_type_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* JSONContainsExpr::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .milvus.proto.plan.ColumnInfo column_info = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_column_info(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .milvus.proto.plan.GenericValue elements = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_elements(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // .milvus.proto.plan.JSONContainsExpr.JSONOp op = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_op(static_cast<::milvus::proto::plan::JSONContainsExpr_JSONOp>(val)); + } else + goto handle_unusual; + continue; + // bool elements_same_type = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _impl_.elements_same_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* JSONContainsExpr::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.plan.JSONContainsExpr) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .milvus.proto.plan.ColumnInfo column_info = 1; + if (this->_internal_has_column_info()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::column_info(this), + _Internal::column_info(this).GetCachedSize(), target, stream); + } + + // repeated .milvus.proto.plan.GenericValue elements = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_elements_size()); i < n; i++) { + const auto& repfield = this->_internal_elements(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + // .milvus.proto.plan.JSONContainsExpr.JSONOp op = 3; + if (this->_internal_op() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_op(), target); + } + + // bool elements_same_type = 4; + if (this->_internal_elements_same_type() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_elements_same_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.plan.JSONContainsExpr) + return target; +} + +size_t JSONContainsExpr::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.proto.plan.JSONContainsExpr) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .milvus.proto.plan.GenericValue elements = 2; + total_size += 1UL * this->_internal_elements_size(); + for (const auto& msg : this->_impl_.elements_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // .milvus.proto.plan.ColumnInfo column_info = 1; + if (this->_internal_has_column_info()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.column_info_); + } + + // .milvus.proto.plan.JSONContainsExpr.JSONOp op = 3; + if (this->_internal_op() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_op()); + } + + // bool elements_same_type = 4; + if (this->_internal_elements_same_type() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData JSONContainsExpr::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + JSONContainsExpr::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*JSONContainsExpr::GetClassData() const { return &_class_data_; } + + +void JSONContainsExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.plan.JSONContainsExpr) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.elements_.MergeFrom(from._impl_.elements_); + if (from._internal_has_column_info()) { + _this->_internal_mutable_column_info()->::milvus::proto::plan::ColumnInfo::MergeFrom( + from._internal_column_info()); + } + if (from._internal_op() != 0) { + _this->_internal_set_op(from._internal_op()); + } + if (from._internal_elements_same_type() != 0) { + _this->_internal_set_elements_same_type(from._internal_elements_same_type()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void JSONContainsExpr::CopyFrom(const JSONContainsExpr& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.plan.JSONContainsExpr) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool JSONContainsExpr::IsInitialized() const { + return true; +} + +void JSONContainsExpr::InternalSwap(JSONContainsExpr* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.elements_.InternalSwap(&other->_impl_.elements_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(JSONContainsExpr, _impl_.elements_same_type_) + + sizeof(JSONContainsExpr::_impl_.elements_same_type_) + - PROTOBUF_FIELD_OFFSET(JSONContainsExpr, _impl_.column_info_)>( + reinterpret_cast(&_impl_.column_info_), + reinterpret_cast(&other->_impl_.column_info_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata JSONContainsExpr::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, + file_level_metadata_plan_2eproto[11]); } // =================================================================== @@ -3666,7 +4315,7 @@ void UnaryExpr::InternalSwap(UnaryExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata UnaryExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[10]); + file_level_metadata_plan_2eproto[12]); } // =================================================================== @@ -3934,7 +4583,7 @@ void BinaryExpr::InternalSwap(BinaryExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BinaryExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[11]); + file_level_metadata_plan_2eproto[13]); } // =================================================================== @@ -4202,7 +4851,7 @@ void BinaryArithOp::InternalSwap(BinaryArithOp* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BinaryArithOp::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[12]); + file_level_metadata_plan_2eproto[14]); } // =================================================================== @@ -4470,7 +5119,7 @@ void BinaryArithExpr::InternalSwap(BinaryArithExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata BinaryArithExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[13]); + file_level_metadata_plan_2eproto[15]); } // =================================================================== @@ -4810,7 +5459,7 @@ void BinaryArithOpEvalRangeExpr::InternalSwap(BinaryArithOpEvalRangeExpr* other) ::PROTOBUF_NAMESPACE_ID::Metadata BinaryArithOpEvalRangeExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[14]); + file_level_metadata_plan_2eproto[16]); } // =================================================================== @@ -4850,7 +5499,7 @@ const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AlwaysTrueExpr::GetClassData() ::PROTOBUF_NAMESPACE_ID::Metadata AlwaysTrueExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[15]); + file_level_metadata_plan_2eproto[17]); } // =================================================================== @@ -4869,6 +5518,7 @@ class Expr::_Internal { static const ::milvus::proto::plan::ColumnExpr& column_expr(const Expr* msg); static const ::milvus::proto::plan::ExistsExpr& exists_expr(const Expr* msg); static const ::milvus::proto::plan::AlwaysTrueExpr& always_true_expr(const Expr* msg); + static const ::milvus::proto::plan::JSONContainsExpr& json_contains_expr(const Expr* msg); }; const ::milvus::proto::plan::TermExpr& @@ -4919,6 +5569,10 @@ const ::milvus::proto::plan::AlwaysTrueExpr& Expr::_Internal::always_true_expr(const Expr* msg) { return *msg->_impl_.expr_.always_true_expr_; } +const ::milvus::proto::plan::JSONContainsExpr& +Expr::_Internal::json_contains_expr(const Expr* msg) { + return *msg->_impl_.expr_.json_contains_expr_; +} void Expr::set_allocated_term_expr(::milvus::proto::plan::TermExpr* term_expr) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_expr(); @@ -5099,6 +5753,21 @@ void Expr::set_allocated_always_true_expr(::milvus::proto::plan::AlwaysTrueExpr* } // @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.Expr.always_true_expr) } +void Expr::set_allocated_json_contains_expr(::milvus::proto::plan::JSONContainsExpr* json_contains_expr) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_expr(); + if (json_contains_expr) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(json_contains_expr); + if (message_arena != submessage_arena) { + json_contains_expr = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, json_contains_expr, submessage_arena); + } + set_has_json_contains_expr(); + _impl_.expr_.json_contains_expr_ = json_contains_expr; + } + // @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.Expr.json_contains_expr) +} Expr::Expr(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -5176,6 +5845,11 @@ Expr::Expr(const Expr& from) from._internal_always_true_expr()); break; } + case kJsonContainsExpr: { + _this->_internal_mutable_json_contains_expr()->::milvus::proto::plan::JSONContainsExpr::MergeFrom( + from._internal_json_contains_expr()); + break; + } case EXPR_NOT_SET: { break; } @@ -5290,6 +5964,12 @@ void Expr::clear_expr() { } break; } + case kJsonContainsExpr: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.expr_.json_contains_expr_; + } + break; + } case EXPR_NOT_SET: { break; } @@ -5410,6 +6090,14 @@ const char* Expr::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { } else goto handle_unusual; continue; + // .milvus.proto.plan.JSONContainsExpr json_contains_expr = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { + ptr = ctx->ParseMessage(_internal_mutable_json_contains_expr(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -5523,6 +6211,13 @@ uint8_t* Expr::_InternalSerialize( _Internal::always_true_expr(this).GetCachedSize(), target, stream); } + // .milvus.proto.plan.JSONContainsExpr json_contains_expr = 13; + if (_internal_has_json_contains_expr()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(13, _Internal::json_contains_expr(this), + _Internal::json_contains_expr(this).GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -5624,6 +6319,13 @@ size_t Expr::ByteSizeLong() const { *_impl_.expr_.always_true_expr_); break; } + // .milvus.proto.plan.JSONContainsExpr json_contains_expr = 13; + case kJsonContainsExpr: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.expr_.json_contains_expr_); + break; + } case EXPR_NOT_SET: { break; } @@ -5707,6 +6409,11 @@ void Expr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_ from._internal_always_true_expr()); break; } + case kJsonContainsExpr: { + _this->_internal_mutable_json_contains_expr()->::milvus::proto::plan::JSONContainsExpr::MergeFrom( + from._internal_json_contains_expr()); + break; + } case EXPR_NOT_SET: { break; } @@ -5735,7 +6442,7 @@ void Expr::InternalSwap(Expr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Expr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[16]); + file_level_metadata_plan_2eproto[18]); } // =================================================================== @@ -6080,7 +6787,7 @@ void VectorANNS::InternalSwap(VectorANNS* other) { ::PROTOBUF_NAMESPACE_ID::Metadata VectorANNS::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[17]); + file_level_metadata_plan_2eproto[19]); } // =================================================================== @@ -6332,7 +7039,7 @@ void QueryPlanNode::InternalSwap(QueryPlanNode* other) { ::PROTOBUF_NAMESPACE_ID::Metadata QueryPlanNode::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[18]); + file_level_metadata_plan_2eproto[20]); } // =================================================================== @@ -6737,7 +7444,7 @@ void PlanNode::InternalSwap(PlanNode* other) { ::PROTOBUF_NAMESPACE_ID::Metadata PlanNode::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_plan_2eproto_getter, &descriptor_table_plan_2eproto_once, - file_level_metadata_plan_2eproto[19]); + file_level_metadata_plan_2eproto[21]); } // @@protoc_insertion_point(namespace_scope) @@ -6749,6 +7456,10 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::plan::GenericValue* Arena::CreateMaybeMessage< ::milvus::proto::plan::GenericValue >(Arena* arena) { return Arena::CreateMessageInternal< ::milvus::proto::plan::GenericValue >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::proto::plan::Array* +Arena::CreateMaybeMessage< ::milvus::proto::plan::Array >(Arena* arena) { + return Arena::CreateMessageInternal< ::milvus::proto::plan::Array >(arena); +} template<> PROTOBUF_NOINLINE ::milvus::proto::plan::QueryInfo* Arena::CreateMaybeMessage< ::milvus::proto::plan::QueryInfo >(Arena* arena) { return Arena::CreateMessageInternal< ::milvus::proto::plan::QueryInfo >(arena); @@ -6785,6 +7496,10 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::plan::TermExpr* Arena::CreateMaybeMessage< ::milvus::proto::plan::TermExpr >(Arena* arena) { return Arena::CreateMessageInternal< ::milvus::proto::plan::TermExpr >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::proto::plan::JSONContainsExpr* +Arena::CreateMaybeMessage< ::milvus::proto::plan::JSONContainsExpr >(Arena* arena) { + return Arena::CreateMessageInternal< ::milvus::proto::plan::JSONContainsExpr >(arena); +} template<> PROTOBUF_NOINLINE ::milvus::proto::plan::UnaryExpr* Arena::CreateMaybeMessage< ::milvus::proto::plan::UnaryExpr >(Arena* arena) { return Arena::CreateMessageInternal< ::milvus::proto::plan::UnaryExpr >(arena); diff --git a/internal/core/src/pb/plan.pb.h b/internal/core/src/pb/plan.pb.h index 625582e71..4f1f181f8 100644 --- a/internal/core/src/pb/plan.pb.h +++ b/internal/core/src/pb/plan.pb.h @@ -53,6 +53,9 @@ namespace plan { class AlwaysTrueExpr; struct AlwaysTrueExprDefaultTypeInternal; extern AlwaysTrueExprDefaultTypeInternal _AlwaysTrueExpr_default_instance_; +class Array; +struct ArrayDefaultTypeInternal; +extern ArrayDefaultTypeInternal _Array_default_instance_; class BinaryArithExpr; struct BinaryArithExprDefaultTypeInternal; extern BinaryArithExprDefaultTypeInternal _BinaryArithExpr_default_instance_; @@ -86,6 +89,9 @@ extern ExprDefaultTypeInternal _Expr_default_instance_; class GenericValue; struct GenericValueDefaultTypeInternal; extern GenericValueDefaultTypeInternal _GenericValue_default_instance_; +class JSONContainsExpr; +struct JSONContainsExprDefaultTypeInternal; +extern JSONContainsExprDefaultTypeInternal _JSONContainsExpr_default_instance_; class PlanNode; struct PlanNodeDefaultTypeInternal; extern PlanNodeDefaultTypeInternal _PlanNode_default_instance_; @@ -115,6 +121,7 @@ extern VectorANNSDefaultTypeInternal _VectorANNS_default_instance_; } // namespace milvus PROTOBUF_NAMESPACE_OPEN template<> ::milvus::proto::plan::AlwaysTrueExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::AlwaysTrueExpr>(Arena*); +template<> ::milvus::proto::plan::Array* Arena::CreateMaybeMessage<::milvus::proto::plan::Array>(Arena*); template<> ::milvus::proto::plan::BinaryArithExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::BinaryArithExpr>(Arena*); template<> ::milvus::proto::plan::BinaryArithOp* Arena::CreateMaybeMessage<::milvus::proto::plan::BinaryArithOp>(Arena*); template<> ::milvus::proto::plan::BinaryArithOpEvalRangeExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::BinaryArithOpEvalRangeExpr>(Arena*); @@ -126,6 +133,7 @@ template<> ::milvus::proto::plan::CompareExpr* Arena::CreateMaybeMessage<::milvu template<> ::milvus::proto::plan::ExistsExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::ExistsExpr>(Arena*); template<> ::milvus::proto::plan::Expr* Arena::CreateMaybeMessage<::milvus::proto::plan::Expr>(Arena*); template<> ::milvus::proto::plan::GenericValue* Arena::CreateMaybeMessage<::milvus::proto::plan::GenericValue>(Arena*); +template<> ::milvus::proto::plan::JSONContainsExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::JSONContainsExpr>(Arena*); template<> ::milvus::proto::plan::PlanNode* Arena::CreateMaybeMessage<::milvus::proto::plan::PlanNode>(Arena*); template<> ::milvus::proto::plan::QueryInfo* Arena::CreateMaybeMessage<::milvus::proto::plan::QueryInfo>(Arena*); template<> ::milvus::proto::plan::QueryPlanNode* Arena::CreateMaybeMessage<::milvus::proto::plan::QueryPlanNode>(Arena*); @@ -139,6 +147,33 @@ namespace milvus { namespace proto { namespace plan { +enum JSONContainsExpr_JSONOp : int { + JSONContainsExpr_JSONOp_Invalid = 0, + JSONContainsExpr_JSONOp_Contains = 1, + JSONContainsExpr_JSONOp_ContainsAll = 2, + JSONContainsExpr_JSONOp_ContainsAny = 3, + JSONContainsExpr_JSONOp_JSONContainsExpr_JSONOp_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + JSONContainsExpr_JSONOp_JSONContainsExpr_JSONOp_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool JSONContainsExpr_JSONOp_IsValid(int value); +constexpr JSONContainsExpr_JSONOp JSONContainsExpr_JSONOp_JSONOp_MIN = JSONContainsExpr_JSONOp_Invalid; +constexpr JSONContainsExpr_JSONOp JSONContainsExpr_JSONOp_JSONOp_MAX = JSONContainsExpr_JSONOp_ContainsAny; +constexpr int JSONContainsExpr_JSONOp_JSONOp_ARRAYSIZE = JSONContainsExpr_JSONOp_JSONOp_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* JSONContainsExpr_JSONOp_descriptor(); +template +inline const std::string& JSONContainsExpr_JSONOp_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function JSONContainsExpr_JSONOp_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + JSONContainsExpr_JSONOp_descriptor(), enum_t_value); +} +inline bool JSONContainsExpr_JSONOp_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, JSONContainsExpr_JSONOp* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + JSONContainsExpr_JSONOp_descriptor(), name, value); +} enum UnaryExpr_UnaryOp : int { UnaryExpr_UnaryOp_Invalid = 0, UnaryExpr_UnaryOp_Not = 1, @@ -305,6 +340,7 @@ class GenericValue final : kInt64Val = 2, kFloatVal = 3, kStringVal = 4, + kArrayVal = 5, VAL_NOT_SET = 0, }; @@ -390,6 +426,7 @@ class GenericValue final : kInt64ValFieldNumber = 2, kFloatValFieldNumber = 3, kStringValFieldNumber = 4, + kArrayValFieldNumber = 5, }; // bool bool_val = 1; bool has_bool_val() const; @@ -448,6 +485,24 @@ class GenericValue final : std::string* _internal_mutable_string_val(); public: + // .milvus.proto.plan.Array array_val = 5; + bool has_array_val() const; + private: + bool _internal_has_array_val() const; + public: + void clear_array_val(); + const ::milvus::proto::plan::Array& array_val() const; + PROTOBUF_NODISCARD ::milvus::proto::plan::Array* release_array_val(); + ::milvus::proto::plan::Array* mutable_array_val(); + void set_allocated_array_val(::milvus::proto::plan::Array* array_val); + private: + const ::milvus::proto::plan::Array& _internal_array_val() const; + ::milvus::proto::plan::Array* _internal_mutable_array_val(); + public: + void unsafe_arena_set_allocated_array_val( + ::milvus::proto::plan::Array* array_val); + ::milvus::proto::plan::Array* unsafe_arena_release_array_val(); + void clear_val(); ValCase val_case() const; // @@protoc_insertion_point(class_scope:milvus.proto.plan.GenericValue) @@ -457,6 +512,7 @@ class GenericValue final : void set_has_int64_val(); void set_has_float_val(); void set_has_string_val(); + void set_has_array_val(); inline bool has_val() const; inline void clear_has_val(); @@ -472,6 +528,7 @@ class GenericValue final : int64_t int64_val_; double float_val_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_val_; + ::milvus::proto::plan::Array* array_val_; } val_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -482,6 +539,174 @@ class GenericValue final : }; // ------------------------------------------------------------------- +class Array final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.plan.Array) */ { + public: + inline Array() : Array(nullptr) {} + ~Array() override; + explicit PROTOBUF_CONSTEXPR Array(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Array(const Array& from); + Array(Array&& from) noexcept + : Array() { + *this = ::std::move(from); + } + + inline Array& operator=(const Array& from) { + CopyFrom(from); + return *this; + } + inline Array& operator=(Array&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Array& default_instance() { + return *internal_default_instance(); + } + static inline const Array* internal_default_instance() { + return reinterpret_cast( + &_Array_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Array& a, Array& b) { + a.Swap(&b); + } + inline void Swap(Array* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Array* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Array* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Array& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Array& from) { + Array::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Array* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.proto.plan.Array"; + } + protected: + explicit Array(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kArrayFieldNumber = 1, + kSameTypeFieldNumber = 2, + }; + // repeated .milvus.proto.plan.GenericValue array = 1; + int array_size() const; + private: + int _internal_array_size() const; + public: + void clear_array(); + ::milvus::proto::plan::GenericValue* mutable_array(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >* + mutable_array(); + private: + const ::milvus::proto::plan::GenericValue& _internal_array(int index) const; + ::milvus::proto::plan::GenericValue* _internal_add_array(); + public: + const ::milvus::proto::plan::GenericValue& array(int index) const; + ::milvus::proto::plan::GenericValue* add_array(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >& + array() const; + + // bool same_type = 2; + void clear_same_type(); + bool same_type() const; + void set_same_type(bool value); + private: + bool _internal_same_type() const; + void _internal_set_same_type(bool value); + public: + + // @@protoc_insertion_point(class_scope:milvus.proto.plan.Array) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue > array_; + bool same_type_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_plan_2eproto; +}; +// ------------------------------------------------------------------- + class QueryInfo final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.plan.QueryInfo) */ { public: @@ -530,7 +755,7 @@ class QueryInfo final : &_QueryInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 2; friend void swap(QueryInfo& a, QueryInfo& b) { a.Swap(&b); @@ -721,7 +946,7 @@ class ColumnInfo final : &_ColumnInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 3; friend void swap(ColumnInfo& a, ColumnInfo& b) { a.Swap(&b); @@ -939,7 +1164,7 @@ class ColumnExpr final : &_ColumnExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 4; friend void swap(ColumnExpr& a, ColumnExpr& b) { a.Swap(&b); @@ -1096,7 +1321,7 @@ class ExistsExpr final : &_ExistsExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; friend void swap(ExistsExpr& a, ExistsExpr& b) { a.Swap(&b); @@ -1253,7 +1478,7 @@ class ValueExpr final : &_ValueExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; friend void swap(ValueExpr& a, ValueExpr& b) { a.Swap(&b); @@ -1410,7 +1635,7 @@ class UnaryRangeExpr final : &_UnaryRangeExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; friend void swap(UnaryRangeExpr& a, UnaryRangeExpr& b) { a.Swap(&b); @@ -1598,7 +1823,7 @@ class BinaryRangeExpr final : &_BinaryRangeExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 8; friend void swap(BinaryRangeExpr& a, BinaryRangeExpr& b) { a.Swap(&b); @@ -1817,7 +2042,7 @@ class CompareExpr final : &_CompareExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 9; friend void swap(CompareExpr& a, CompareExpr& b) { a.Swap(&b); @@ -2005,7 +2230,7 @@ class TermExpr final : &_TermExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 10; friend void swap(TermExpr& a, TermExpr& b) { a.Swap(&b); @@ -2080,25 +2305,248 @@ class TermExpr final : enum : int { kValuesFieldNumber = 2, kColumnInfoFieldNumber = 1, - kIsInFieldFieldNumber = 3, + kIsInFieldFieldNumber = 3, + }; + // repeated .milvus.proto.plan.GenericValue values = 2; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + ::milvus::proto::plan::GenericValue* mutable_values(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >* + mutable_values(); + private: + const ::milvus::proto::plan::GenericValue& _internal_values(int index) const; + ::milvus::proto::plan::GenericValue* _internal_add_values(); + public: + const ::milvus::proto::plan::GenericValue& values(int index) const; + ::milvus::proto::plan::GenericValue* add_values(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >& + values() const; + + // .milvus.proto.plan.ColumnInfo column_info = 1; + bool has_column_info() const; + private: + bool _internal_has_column_info() const; + public: + void clear_column_info(); + const ::milvus::proto::plan::ColumnInfo& column_info() const; + PROTOBUF_NODISCARD ::milvus::proto::plan::ColumnInfo* release_column_info(); + ::milvus::proto::plan::ColumnInfo* mutable_column_info(); + void set_allocated_column_info(::milvus::proto::plan::ColumnInfo* column_info); + private: + const ::milvus::proto::plan::ColumnInfo& _internal_column_info() const; + ::milvus::proto::plan::ColumnInfo* _internal_mutable_column_info(); + public: + void unsafe_arena_set_allocated_column_info( + ::milvus::proto::plan::ColumnInfo* column_info); + ::milvus::proto::plan::ColumnInfo* unsafe_arena_release_column_info(); + + // bool is_in_field = 3; + void clear_is_in_field(); + bool is_in_field() const; + void set_is_in_field(bool value); + private: + bool _internal_is_in_field() const; + void _internal_set_is_in_field(bool value); + public: + + // @@protoc_insertion_point(class_scope:milvus.proto.plan.TermExpr) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue > values_; + ::milvus::proto::plan::ColumnInfo* column_info_; + bool is_in_field_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_plan_2eproto; +}; +// ------------------------------------------------------------------- + +class JSONContainsExpr final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.plan.JSONContainsExpr) */ { + public: + inline JSONContainsExpr() : JSONContainsExpr(nullptr) {} + ~JSONContainsExpr() override; + explicit PROTOBUF_CONSTEXPR JSONContainsExpr(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + JSONContainsExpr(const JSONContainsExpr& from); + JSONContainsExpr(JSONContainsExpr&& from) noexcept + : JSONContainsExpr() { + *this = ::std::move(from); + } + + inline JSONContainsExpr& operator=(const JSONContainsExpr& from) { + CopyFrom(from); + return *this; + } + inline JSONContainsExpr& operator=(JSONContainsExpr&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const JSONContainsExpr& default_instance() { + return *internal_default_instance(); + } + static inline const JSONContainsExpr* internal_default_instance() { + return reinterpret_cast( + &_JSONContainsExpr_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(JSONContainsExpr& a, JSONContainsExpr& b) { + a.Swap(&b); + } + inline void Swap(JSONContainsExpr* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(JSONContainsExpr* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + JSONContainsExpr* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const JSONContainsExpr& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const JSONContainsExpr& from) { + JSONContainsExpr::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(JSONContainsExpr* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.proto.plan.JSONContainsExpr"; + } + protected: + explicit JSONContainsExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef JSONContainsExpr_JSONOp JSONOp; + static constexpr JSONOp Invalid = + JSONContainsExpr_JSONOp_Invalid; + static constexpr JSONOp Contains = + JSONContainsExpr_JSONOp_Contains; + static constexpr JSONOp ContainsAll = + JSONContainsExpr_JSONOp_ContainsAll; + static constexpr JSONOp ContainsAny = + JSONContainsExpr_JSONOp_ContainsAny; + static inline bool JSONOp_IsValid(int value) { + return JSONContainsExpr_JSONOp_IsValid(value); + } + static constexpr JSONOp JSONOp_MIN = + JSONContainsExpr_JSONOp_JSONOp_MIN; + static constexpr JSONOp JSONOp_MAX = + JSONContainsExpr_JSONOp_JSONOp_MAX; + static constexpr int JSONOp_ARRAYSIZE = + JSONContainsExpr_JSONOp_JSONOp_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + JSONOp_descriptor() { + return JSONContainsExpr_JSONOp_descriptor(); + } + template + static inline const std::string& JSONOp_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function JSONOp_Name."); + return JSONContainsExpr_JSONOp_Name(enum_t_value); + } + static inline bool JSONOp_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + JSONOp* value) { + return JSONContainsExpr_JSONOp_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kElementsFieldNumber = 2, + kColumnInfoFieldNumber = 1, + kOpFieldNumber = 3, + kElementsSameTypeFieldNumber = 4, }; - // repeated .milvus.proto.plan.GenericValue values = 2; - int values_size() const; + // repeated .milvus.proto.plan.GenericValue elements = 2; + int elements_size() const; private: - int _internal_values_size() const; + int _internal_elements_size() const; public: - void clear_values(); - ::milvus::proto::plan::GenericValue* mutable_values(int index); + void clear_elements(); + ::milvus::proto::plan::GenericValue* mutable_elements(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >* - mutable_values(); + mutable_elements(); private: - const ::milvus::proto::plan::GenericValue& _internal_values(int index) const; - ::milvus::proto::plan::GenericValue* _internal_add_values(); + const ::milvus::proto::plan::GenericValue& _internal_elements(int index) const; + ::milvus::proto::plan::GenericValue* _internal_add_elements(); public: - const ::milvus::proto::plan::GenericValue& values(int index) const; - ::milvus::proto::plan::GenericValue* add_values(); + const ::milvus::proto::plan::GenericValue& elements(int index) const; + ::milvus::proto::plan::GenericValue* add_elements(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >& - values() const; + elements() const; // .milvus.proto.plan.ColumnInfo column_info = 1; bool has_column_info() const; @@ -2118,16 +2566,25 @@ class TermExpr final : ::milvus::proto::plan::ColumnInfo* column_info); ::milvus::proto::plan::ColumnInfo* unsafe_arena_release_column_info(); - // bool is_in_field = 3; - void clear_is_in_field(); - bool is_in_field() const; - void set_is_in_field(bool value); + // .milvus.proto.plan.JSONContainsExpr.JSONOp op = 3; + void clear_op(); + ::milvus::proto::plan::JSONContainsExpr_JSONOp op() const; + void set_op(::milvus::proto::plan::JSONContainsExpr_JSONOp value); private: - bool _internal_is_in_field() const; - void _internal_set_is_in_field(bool value); + ::milvus::proto::plan::JSONContainsExpr_JSONOp _internal_op() const; + void _internal_set_op(::milvus::proto::plan::JSONContainsExpr_JSONOp value); public: - // @@protoc_insertion_point(class_scope:milvus.proto.plan.TermExpr) + // bool elements_same_type = 4; + void clear_elements_same_type(); + bool elements_same_type() const; + void set_elements_same_type(bool value); + private: + bool _internal_elements_same_type() const; + void _internal_set_elements_same_type(bool value); + public: + + // @@protoc_insertion_point(class_scope:milvus.proto.plan.JSONContainsExpr) private: class _Internal; @@ -2135,9 +2592,10 @@ class TermExpr final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue > values_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue > elements_; ::milvus::proto::plan::ColumnInfo* column_info_; - bool is_in_field_; + int op_; + bool elements_same_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -2193,7 +2651,7 @@ class UnaryExpr final : &_UnaryExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 12; friend void swap(UnaryExpr& a, UnaryExpr& b) { a.Swap(&b); @@ -2391,7 +2849,7 @@ class BinaryExpr final : &_BinaryExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 13; friend void swap(BinaryExpr& a, BinaryExpr& b) { a.Swap(&b); @@ -2611,7 +3069,7 @@ class BinaryArithOp final : &_BinaryArithOp_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 14; friend void swap(BinaryArithOp& a, BinaryArithOp& b) { a.Swap(&b); @@ -2799,7 +3257,7 @@ class BinaryArithExpr final : &_BinaryArithExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 13; + 15; friend void swap(BinaryArithExpr& a, BinaryArithExpr& b) { a.Swap(&b); @@ -2987,7 +3445,7 @@ class BinaryArithOpEvalRangeExpr final : &_BinaryArithOpEvalRangeExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 14; + 16; friend void swap(BinaryArithOpEvalRangeExpr& a, BinaryArithOpEvalRangeExpr& b) { a.Swap(&b); @@ -3205,7 +3663,7 @@ class AlwaysTrueExpr final : &_AlwaysTrueExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 15; + 17; friend void swap(AlwaysTrueExpr& a, AlwaysTrueExpr& b) { a.Swap(&b); @@ -3332,6 +3790,7 @@ class Expr final : kColumnExpr = 10, kExistsExpr = 11, kAlwaysTrueExpr = 12, + kJsonContainsExpr = 13, EXPR_NOT_SET = 0, }; @@ -3340,7 +3799,7 @@ class Expr final : &_Expr_default_instance_); } static constexpr int kIndexInFileMessages = - 16; + 18; friend void swap(Expr& a, Expr& b) { a.Swap(&b); @@ -3425,6 +3884,7 @@ class Expr final : kColumnExprFieldNumber = 10, kExistsExprFieldNumber = 11, kAlwaysTrueExprFieldNumber = 12, + kJsonContainsExprFieldNumber = 13, }; // .milvus.proto.plan.TermExpr term_expr = 1; bool has_term_expr() const; @@ -3642,6 +4102,24 @@ class Expr final : ::milvus::proto::plan::AlwaysTrueExpr* always_true_expr); ::milvus::proto::plan::AlwaysTrueExpr* unsafe_arena_release_always_true_expr(); + // .milvus.proto.plan.JSONContainsExpr json_contains_expr = 13; + bool has_json_contains_expr() const; + private: + bool _internal_has_json_contains_expr() const; + public: + void clear_json_contains_expr(); + const ::milvus::proto::plan::JSONContainsExpr& json_contains_expr() const; + PROTOBUF_NODISCARD ::milvus::proto::plan::JSONContainsExpr* release_json_contains_expr(); + ::milvus::proto::plan::JSONContainsExpr* mutable_json_contains_expr(); + void set_allocated_json_contains_expr(::milvus::proto::plan::JSONContainsExpr* json_contains_expr); + private: + const ::milvus::proto::plan::JSONContainsExpr& _internal_json_contains_expr() const; + ::milvus::proto::plan::JSONContainsExpr* _internal_mutable_json_contains_expr(); + public: + void unsafe_arena_set_allocated_json_contains_expr( + ::milvus::proto::plan::JSONContainsExpr* json_contains_expr); + ::milvus::proto::plan::JSONContainsExpr* unsafe_arena_release_json_contains_expr(); + void clear_expr(); ExprCase expr_case() const; // @@protoc_insertion_point(class_scope:milvus.proto.plan.Expr) @@ -3659,6 +4137,7 @@ class Expr final : void set_has_column_expr(); void set_has_exists_expr(); void set_has_always_true_expr(); + void set_has_json_contains_expr(); inline bool has_expr() const; inline void clear_has_expr(); @@ -3682,6 +4161,7 @@ class Expr final : ::milvus::proto::plan::ColumnExpr* column_expr_; ::milvus::proto::plan::ExistsExpr* exists_expr_; ::milvus::proto::plan::AlwaysTrueExpr* always_true_expr_; + ::milvus::proto::plan::JSONContainsExpr* json_contains_expr_; } expr_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -3740,7 +4220,7 @@ class VectorANNS final : &_VectorANNS_default_instance_); } static constexpr int kIndexInFileMessages = - 17; + 19; friend void swap(VectorANNS& a, VectorANNS& b) { a.Swap(&b); @@ -3955,7 +4435,7 @@ class QueryPlanNode final : &_QueryPlanNode_default_instance_); } static constexpr int kIndexInFileMessages = - 18; + 20; friend void swap(QueryPlanNode& a, QueryPlanNode& b) { a.Swap(&b); @@ -4141,7 +4621,7 @@ class PlanNode final : &_PlanNode_default_instance_); } static constexpr int kIndexInFileMessages = - 19; + 21; friend void swap(PlanNode& a, PlanNode& b) { a.Swap(&b); @@ -4529,6 +5009,80 @@ inline void GenericValue::set_allocated_string_val(std::string* string_val) { // @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.GenericValue.string_val) } +// .milvus.proto.plan.Array array_val = 5; +inline bool GenericValue::_internal_has_array_val() const { + return val_case() == kArrayVal; +} +inline bool GenericValue::has_array_val() const { + return _internal_has_array_val(); +} +inline void GenericValue::set_has_array_val() { + _impl_._oneof_case_[0] = kArrayVal; +} +inline void GenericValue::clear_array_val() { + if (_internal_has_array_val()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.val_.array_val_; + } + clear_has_val(); + } +} +inline ::milvus::proto::plan::Array* GenericValue::release_array_val() { + // @@protoc_insertion_point(field_release:milvus.proto.plan.GenericValue.array_val) + if (_internal_has_array_val()) { + clear_has_val(); + ::milvus::proto::plan::Array* temp = _impl_.val_.array_val_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.val_.array_val_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::milvus::proto::plan::Array& GenericValue::_internal_array_val() const { + return _internal_has_array_val() + ? *_impl_.val_.array_val_ + : reinterpret_cast< ::milvus::proto::plan::Array&>(::milvus::proto::plan::_Array_default_instance_); +} +inline const ::milvus::proto::plan::Array& GenericValue::array_val() const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.GenericValue.array_val) + return _internal_array_val(); +} +inline ::milvus::proto::plan::Array* GenericValue::unsafe_arena_release_array_val() { + // @@protoc_insertion_point(field_unsafe_arena_release:milvus.proto.plan.GenericValue.array_val) + if (_internal_has_array_val()) { + clear_has_val(); + ::milvus::proto::plan::Array* temp = _impl_.val_.array_val_; + _impl_.val_.array_val_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void GenericValue::unsafe_arena_set_allocated_array_val(::milvus::proto::plan::Array* array_val) { + clear_val(); + if (array_val) { + set_has_array_val(); + _impl_.val_.array_val_ = array_val; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:milvus.proto.plan.GenericValue.array_val) +} +inline ::milvus::proto::plan::Array* GenericValue::_internal_mutable_array_val() { + if (!_internal_has_array_val()) { + clear_val(); + set_has_array_val(); + _impl_.val_.array_val_ = CreateMaybeMessage< ::milvus::proto::plan::Array >(GetArenaForAllocation()); + } + return _impl_.val_.array_val_; +} +inline ::milvus::proto::plan::Array* GenericValue::mutable_array_val() { + ::milvus::proto::plan::Array* _msg = _internal_mutable_array_val(); + // @@protoc_insertion_point(field_mutable:milvus.proto.plan.GenericValue.array_val) + return _msg; +} + inline bool GenericValue::has_val() const { return val_case() != VAL_NOT_SET; } @@ -4540,6 +5094,70 @@ inline GenericValue::ValCase GenericValue::val_case() const { } // ------------------------------------------------------------------- +// Array + +// repeated .milvus.proto.plan.GenericValue array = 1; +inline int Array::_internal_array_size() const { + return _impl_.array_.size(); +} +inline int Array::array_size() const { + return _internal_array_size(); +} +inline void Array::clear_array() { + _impl_.array_.Clear(); +} +inline ::milvus::proto::plan::GenericValue* Array::mutable_array(int index) { + // @@protoc_insertion_point(field_mutable:milvus.proto.plan.Array.array) + return _impl_.array_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >* +Array::mutable_array() { + // @@protoc_insertion_point(field_mutable_list:milvus.proto.plan.Array.array) + return &_impl_.array_; +} +inline const ::milvus::proto::plan::GenericValue& Array::_internal_array(int index) const { + return _impl_.array_.Get(index); +} +inline const ::milvus::proto::plan::GenericValue& Array::array(int index) const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.Array.array) + return _internal_array(index); +} +inline ::milvus::proto::plan::GenericValue* Array::_internal_add_array() { + return _impl_.array_.Add(); +} +inline ::milvus::proto::plan::GenericValue* Array::add_array() { + ::milvus::proto::plan::GenericValue* _add = _internal_add_array(); + // @@protoc_insertion_point(field_add:milvus.proto.plan.Array.array) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >& +Array::array() const { + // @@protoc_insertion_point(field_list:milvus.proto.plan.Array.array) + return _impl_.array_; +} + +// bool same_type = 2; +inline void Array::clear_same_type() { + _impl_.same_type_ = false; +} +inline bool Array::_internal_same_type() const { + return _impl_.same_type_; +} +inline bool Array::same_type() const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.Array.same_type) + return _internal_same_type(); +} +inline void Array::_internal_set_same_type(bool value) { + + _impl_.same_type_ = value; +} +inline void Array::set_same_type(bool value) { + _internal_set_same_type(value); + // @@protoc_insertion_point(field_set:milvus.proto.plan.Array.same_type) +} + +// ------------------------------------------------------------------- + // QueryInfo // int64 topk = 1; @@ -6021,6 +6639,180 @@ inline void TermExpr::set_is_in_field(bool value) { // ------------------------------------------------------------------- +// JSONContainsExpr + +// .milvus.proto.plan.ColumnInfo column_info = 1; +inline bool JSONContainsExpr::_internal_has_column_info() const { + return this != internal_default_instance() && _impl_.column_info_ != nullptr; +} +inline bool JSONContainsExpr::has_column_info() const { + return _internal_has_column_info(); +} +inline void JSONContainsExpr::clear_column_info() { + if (GetArenaForAllocation() == nullptr && _impl_.column_info_ != nullptr) { + delete _impl_.column_info_; + } + _impl_.column_info_ = nullptr; +} +inline const ::milvus::proto::plan::ColumnInfo& JSONContainsExpr::_internal_column_info() const { + const ::milvus::proto::plan::ColumnInfo* p = _impl_.column_info_; + return p != nullptr ? *p : reinterpret_cast( + ::milvus::proto::plan::_ColumnInfo_default_instance_); +} +inline const ::milvus::proto::plan::ColumnInfo& JSONContainsExpr::column_info() const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.JSONContainsExpr.column_info) + return _internal_column_info(); +} +inline void JSONContainsExpr::unsafe_arena_set_allocated_column_info( + ::milvus::proto::plan::ColumnInfo* column_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.column_info_); + } + _impl_.column_info_ = column_info; + if (column_info) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:milvus.proto.plan.JSONContainsExpr.column_info) +} +inline ::milvus::proto::plan::ColumnInfo* JSONContainsExpr::release_column_info() { + + ::milvus::proto::plan::ColumnInfo* temp = _impl_.column_info_; + _impl_.column_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::milvus::proto::plan::ColumnInfo* JSONContainsExpr::unsafe_arena_release_column_info() { + // @@protoc_insertion_point(field_release:milvus.proto.plan.JSONContainsExpr.column_info) + + ::milvus::proto::plan::ColumnInfo* temp = _impl_.column_info_; + _impl_.column_info_ = nullptr; + return temp; +} +inline ::milvus::proto::plan::ColumnInfo* JSONContainsExpr::_internal_mutable_column_info() { + + if (_impl_.column_info_ == nullptr) { + auto* p = CreateMaybeMessage<::milvus::proto::plan::ColumnInfo>(GetArenaForAllocation()); + _impl_.column_info_ = p; + } + return _impl_.column_info_; +} +inline ::milvus::proto::plan::ColumnInfo* JSONContainsExpr::mutable_column_info() { + ::milvus::proto::plan::ColumnInfo* _msg = _internal_mutable_column_info(); + // @@protoc_insertion_point(field_mutable:milvus.proto.plan.JSONContainsExpr.column_info) + return _msg; +} +inline void JSONContainsExpr::set_allocated_column_info(::milvus::proto::plan::ColumnInfo* column_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.column_info_; + } + if (column_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(column_info); + if (message_arena != submessage_arena) { + column_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, column_info, submessage_arena); + } + + } else { + + } + _impl_.column_info_ = column_info; + // @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.JSONContainsExpr.column_info) +} + +// repeated .milvus.proto.plan.GenericValue elements = 2; +inline int JSONContainsExpr::_internal_elements_size() const { + return _impl_.elements_.size(); +} +inline int JSONContainsExpr::elements_size() const { + return _internal_elements_size(); +} +inline void JSONContainsExpr::clear_elements() { + _impl_.elements_.Clear(); +} +inline ::milvus::proto::plan::GenericValue* JSONContainsExpr::mutable_elements(int index) { + // @@protoc_insertion_point(field_mutable:milvus.proto.plan.JSONContainsExpr.elements) + return _impl_.elements_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >* +JSONContainsExpr::mutable_elements() { + // @@protoc_insertion_point(field_mutable_list:milvus.proto.plan.JSONContainsExpr.elements) + return &_impl_.elements_; +} +inline const ::milvus::proto::plan::GenericValue& JSONContainsExpr::_internal_elements(int index) const { + return _impl_.elements_.Get(index); +} +inline const ::milvus::proto::plan::GenericValue& JSONContainsExpr::elements(int index) const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.JSONContainsExpr.elements) + return _internal_elements(index); +} +inline ::milvus::proto::plan::GenericValue* JSONContainsExpr::_internal_add_elements() { + return _impl_.elements_.Add(); +} +inline ::milvus::proto::plan::GenericValue* JSONContainsExpr::add_elements() { + ::milvus::proto::plan::GenericValue* _add = _internal_add_elements(); + // @@protoc_insertion_point(field_add:milvus.proto.plan.JSONContainsExpr.elements) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::plan::GenericValue >& +JSONContainsExpr::elements() const { + // @@protoc_insertion_point(field_list:milvus.proto.plan.JSONContainsExpr.elements) + return _impl_.elements_; +} + +// .milvus.proto.plan.JSONContainsExpr.JSONOp op = 3; +inline void JSONContainsExpr::clear_op() { + _impl_.op_ = 0; +} +inline ::milvus::proto::plan::JSONContainsExpr_JSONOp JSONContainsExpr::_internal_op() const { + return static_cast< ::milvus::proto::plan::JSONContainsExpr_JSONOp >(_impl_.op_); +} +inline ::milvus::proto::plan::JSONContainsExpr_JSONOp JSONContainsExpr::op() const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.JSONContainsExpr.op) + return _internal_op(); +} +inline void JSONContainsExpr::_internal_set_op(::milvus::proto::plan::JSONContainsExpr_JSONOp value) { + + _impl_.op_ = value; +} +inline void JSONContainsExpr::set_op(::milvus::proto::plan::JSONContainsExpr_JSONOp value) { + _internal_set_op(value); + // @@protoc_insertion_point(field_set:milvus.proto.plan.JSONContainsExpr.op) +} + +// bool elements_same_type = 4; +inline void JSONContainsExpr::clear_elements_same_type() { + _impl_.elements_same_type_ = false; +} +inline bool JSONContainsExpr::_internal_elements_same_type() const { + return _impl_.elements_same_type_; +} +inline bool JSONContainsExpr::elements_same_type() const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.JSONContainsExpr.elements_same_type) + return _internal_elements_same_type(); +} +inline void JSONContainsExpr::_internal_set_elements_same_type(bool value) { + + _impl_.elements_same_type_ = value; +} +inline void JSONContainsExpr::set_elements_same_type(bool value) { + _internal_set_elements_same_type(value); + // @@protoc_insertion_point(field_set:milvus.proto.plan.JSONContainsExpr.elements_same_type) +} + +// ------------------------------------------------------------------- + // UnaryExpr // .milvus.proto.plan.UnaryExpr.UnaryOp op = 1; @@ -7955,6 +8747,80 @@ inline ::milvus::proto::plan::AlwaysTrueExpr* Expr::mutable_always_true_expr() { return _msg; } +// .milvus.proto.plan.JSONContainsExpr json_contains_expr = 13; +inline bool Expr::_internal_has_json_contains_expr() const { + return expr_case() == kJsonContainsExpr; +} +inline bool Expr::has_json_contains_expr() const { + return _internal_has_json_contains_expr(); +} +inline void Expr::set_has_json_contains_expr() { + _impl_._oneof_case_[0] = kJsonContainsExpr; +} +inline void Expr::clear_json_contains_expr() { + if (_internal_has_json_contains_expr()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.expr_.json_contains_expr_; + } + clear_has_expr(); + } +} +inline ::milvus::proto::plan::JSONContainsExpr* Expr::release_json_contains_expr() { + // @@protoc_insertion_point(field_release:milvus.proto.plan.Expr.json_contains_expr) + if (_internal_has_json_contains_expr()) { + clear_has_expr(); + ::milvus::proto::plan::JSONContainsExpr* temp = _impl_.expr_.json_contains_expr_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.expr_.json_contains_expr_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::milvus::proto::plan::JSONContainsExpr& Expr::_internal_json_contains_expr() const { + return _internal_has_json_contains_expr() + ? *_impl_.expr_.json_contains_expr_ + : reinterpret_cast< ::milvus::proto::plan::JSONContainsExpr&>(::milvus::proto::plan::_JSONContainsExpr_default_instance_); +} +inline const ::milvus::proto::plan::JSONContainsExpr& Expr::json_contains_expr() const { + // @@protoc_insertion_point(field_get:milvus.proto.plan.Expr.json_contains_expr) + return _internal_json_contains_expr(); +} +inline ::milvus::proto::plan::JSONContainsExpr* Expr::unsafe_arena_release_json_contains_expr() { + // @@protoc_insertion_point(field_unsafe_arena_release:milvus.proto.plan.Expr.json_contains_expr) + if (_internal_has_json_contains_expr()) { + clear_has_expr(); + ::milvus::proto::plan::JSONContainsExpr* temp = _impl_.expr_.json_contains_expr_; + _impl_.expr_.json_contains_expr_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Expr::unsafe_arena_set_allocated_json_contains_expr(::milvus::proto::plan::JSONContainsExpr* json_contains_expr) { + clear_expr(); + if (json_contains_expr) { + set_has_json_contains_expr(); + _impl_.expr_.json_contains_expr_ = json_contains_expr; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:milvus.proto.plan.Expr.json_contains_expr) +} +inline ::milvus::proto::plan::JSONContainsExpr* Expr::_internal_mutable_json_contains_expr() { + if (!_internal_has_json_contains_expr()) { + clear_expr(); + set_has_json_contains_expr(); + _impl_.expr_.json_contains_expr_ = CreateMaybeMessage< ::milvus::proto::plan::JSONContainsExpr >(GetArenaForAllocation()); + } + return _impl_.expr_.json_contains_expr_; +} +inline ::milvus::proto::plan::JSONContainsExpr* Expr::mutable_json_contains_expr() { + ::milvus::proto::plan::JSONContainsExpr* _msg = _internal_mutable_json_contains_expr(); + // @@protoc_insertion_point(field_mutable:milvus.proto.plan.Expr.json_contains_expr) + return _msg; +} + inline bool Expr::has_expr() const { return expr_case() != EXPR_NOT_SET; } @@ -8695,6 +9561,10 @@ inline PlanNode::NodeCase PlanNode::node_case() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) @@ -8704,6 +9574,11 @@ inline PlanNode::NodeCase PlanNode::node_case() const { PROTOBUF_NAMESPACE_OPEN +template <> struct is_proto_enum< ::milvus::proto::plan::JSONContainsExpr_JSONOp> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::milvus::proto::plan::JSONContainsExpr_JSONOp>() { + return ::milvus::proto::plan::JSONContainsExpr_JSONOp_descriptor(); +} template <> struct is_proto_enum< ::milvus::proto::plan::UnaryExpr_UnaryOp> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::milvus::proto::plan::UnaryExpr_UnaryOp>() { diff --git a/internal/core/src/query/Expr.h b/internal/core/src/query/Expr.h index 8f9aa7d87..839e10a3e 100644 --- a/internal/core/src/query/Expr.h +++ b/internal/core/src/query/Expr.h @@ -279,6 +279,30 @@ CreateAlwaysTrueExpr() { return std::make_unique(); } +struct JsonContainsExpr : Expr { + const ColumnInfo column_; + bool same_type_; + ContainsType op_; + const proto::plan::GenericValue::ValCase val_case_; + + protected: + JsonContainsExpr() = delete; + + JsonContainsExpr(ColumnInfo column, + const bool same_type, + ContainsType op, + proto::plan::GenericValue::ValCase val_case) + : column_(std::move(column)), + same_type_(same_type), + op_(op), + val_case_(val_case) { + } + + public: + void + accept(ExprVisitor&) override; +}; + inline bool IsTermExpr(Expr* expr) { TermExpr* term_expr = dynamic_cast(expr); diff --git a/internal/core/src/query/ExprImpl.h b/internal/core/src/query/ExprImpl.h index 3c523c87c..d91645aad 100644 --- a/internal/core/src/query/ExprImpl.h +++ b/internal/core/src/query/ExprImpl.h @@ -97,4 +97,19 @@ struct ExistsExprImpl : ExistsExpr { } }; +template +struct JsonContainsExprImpl : JsonContainsExpr { + const std::vector elements_; + + JsonContainsExprImpl(ColumnInfo column, + std::vector elements, + const bool same_type, + ContainsType op, + proto::plan::GenericValue::ValCase val_case) + : JsonContainsExpr( + std::forward(column), same_type, op, val_case), + elements_(std::move(elements)) { + } +}; + } // namespace milvus::query diff --git a/internal/core/src/query/PlanProto.cpp b/internal/core/src/query/PlanProto.cpp index 5fa8d75fc..9996a00a9 100644 --- a/internal/core/src/query/PlanProto.cpp +++ b/internal/core/src/query/PlanProto.cpp @@ -579,6 +579,91 @@ ProtoParser::ParseExistExpr(const proto::plan::ExistsExpr& expr_pb) { return result; } +template +std::unique_ptr> +ExtractJsonContainsExprImpl(const proto::plan::JSONContainsExpr& expr_proto) { + static_assert(IsScalar or std::is_same_v or + std::is_same_v); + auto size = expr_proto.elements_size(); + std::vector terms; + terms.reserve(size); + auto val_case = proto::plan::GenericValue::VAL_NOT_SET; + for (int i = 0; i < size; ++i) { + auto& value_proto = expr_proto.elements(i); + if constexpr (std::is_same_v) { + Assert(value_proto.val_case() == planpb::GenericValue::kBoolVal); + terms.push_back(static_cast(value_proto.bool_val())); + val_case = proto::plan::GenericValue::ValCase::kBoolVal; + } else if constexpr (std::is_integral_v) { + Assert(value_proto.val_case() == planpb::GenericValue::kInt64Val); + auto value = value_proto.int64_val(); + if (out_of_range(value)) { + continue; + } + terms.push_back(static_cast(value)); + val_case = proto::plan::GenericValue::ValCase::kInt64Val; + } else if constexpr (std::is_floating_point_v) { + Assert(value_proto.val_case() == planpb::GenericValue::kFloatVal); + terms.push_back(static_cast(value_proto.float_val())); + val_case = proto::plan::GenericValue::ValCase::kFloatVal; + } else if constexpr (std::is_same_v) { + Assert(value_proto.val_case() == planpb::GenericValue::kStringVal); + terms.push_back(static_cast(value_proto.string_val())); + val_case = proto::plan::GenericValue::ValCase::kStringVal; + } else if constexpr (std::is_same_v) { + Assert(value_proto.val_case() == planpb::GenericValue::kArrayVal); + terms.push_back(static_cast(value_proto.array_val())); + val_case = proto::plan::GenericValue::ValCase::kArrayVal; + } else if constexpr (std::is_same_v) { + terms.push_back(value_proto); + } else { + static_assert(always_false); + } + } + + return std::make_unique>( + expr_proto.column_info(), + terms, + expr_proto.elements_same_type(), + expr_proto.op(), + val_case); +} + +ExprPtr +ProtoParser::ParseJsonContainsExpr( + const proto::plan::JSONContainsExpr& expr_pb) { + auto& columnInfo = expr_pb.column_info(); + auto field_id = FieldId(columnInfo.field_id()); + auto data_type = schema[field_id].get_data_type(); + Assert(data_type == (DataType)columnInfo.data_type()); + + // auto& field_meta = schema[field_offset]; + auto result = [&]() -> ExprPtr { + if (expr_pb.elements_size() == 0) { + PanicInfo("no elements in expression"); + } + if (expr_pb.elements_same_type()) { + switch (expr_pb.elements(0).val_case()) { + case proto::plan::GenericValue::kBoolVal: + return ExtractJsonContainsExprImpl(expr_pb); + case proto::plan::GenericValue::kInt64Val: + return ExtractJsonContainsExprImpl(expr_pb); + case proto::plan::GenericValue::kFloatVal: + return ExtractJsonContainsExprImpl(expr_pb); + case proto::plan::GenericValue::kStringVal: + return ExtractJsonContainsExprImpl(expr_pb); + case proto::plan::GenericValue::kArrayVal: + return ExtractJsonContainsExprImpl( + expr_pb); + default: + PanicInfo("unsupported data type"); + } + } + return ExtractJsonContainsExprImpl(expr_pb); + }(); + return result; +} + ExprPtr ProtoParser::ParseExpr(const proto::plan::Expr& expr_pb) { using ppe = proto::plan::Expr; @@ -611,6 +696,9 @@ ProtoParser::ParseExpr(const proto::plan::Expr& expr_pb) { case ppe::kAlwaysTrueExpr: { return CreateAlwaysTrueExpr(); } + case ppe::kJsonContainsExpr: { + return ParseJsonContainsExpr(expr_pb.json_contains_expr()); + } default: PanicInfo("unsupported expr proto node"); } diff --git a/internal/core/src/query/PlanProto.h b/internal/core/src/query/PlanProto.h index 2387d5d62..b6797488b 100644 --- a/internal/core/src/query/PlanProto.h +++ b/internal/core/src/query/PlanProto.h @@ -54,6 +54,9 @@ class ProtoParser { ExprPtr ParseExistExpr(const proto::plan::ExistsExpr& expr_pb); + ExprPtr + ParseJsonContainsExpr(const proto::plan::JSONContainsExpr& expr_pb); + ExprPtr ParseExpr(const proto::plan::Expr& expr_pb); diff --git a/internal/core/src/query/generated/ExecExprVisitor.h b/internal/core/src/query/generated/ExecExprVisitor.h index a87869ba3..69e3e2769 100644 --- a/internal/core/src/query/generated/ExecExprVisitor.h +++ b/internal/core/src/query/generated/ExecExprVisitor.h @@ -56,6 +56,9 @@ class ExecExprVisitor : public ExprVisitor { void visit(AlwaysTrueExpr& expr) override; + void + visit(JsonContainsExpr& expr) override; + public: ExecExprVisitor(const segcore::SegmentInternalInterface& segment, int64_t row_count, @@ -155,6 +158,26 @@ class ExecExprVisitor : public ExprVisitor { ExecCompareExprDispatcher(CompareExpr& expr, CmpFunc cmp_func) -> BitsetType; + template + auto + ExecJsonContains(JsonContainsExpr& expr_raw) -> BitsetType; + + auto + ExecJsonContainsArray(JsonContainsExpr& expr_raw) -> BitsetType; + + auto + ExecJsonContainsWithDiffType(JsonContainsExpr& expr_raw) -> BitsetType; + + template + auto + ExecJsonContainsAll(JsonContainsExpr& expr_raw) -> BitsetType; + + auto + ExecJsonContainsAllArray(JsonContainsExpr& expr_raw) -> BitsetType; + + auto + ExecJsonContainsAllWithDiffType(JsonContainsExpr& expr_raw) -> BitsetType; + template BitsetType ExecCompareExprDispatcherForNonIndexedSegment(CompareExpr& expr, diff --git a/internal/core/src/query/generated/Expr.cpp b/internal/core/src/query/generated/Expr.cpp index 27dd9c2e9..b5f68211c 100644 --- a/internal/core/src/query/generated/Expr.cpp +++ b/internal/core/src/query/generated/Expr.cpp @@ -58,4 +58,9 @@ void AlwaysTrueExpr::accept(ExprVisitor& visitor) { visitor.visit(*this); } + +void +JsonContainsExpr::accept(ExprVisitor& visitor) { + visitor.visit(*this); +} } // namespace milvus::query diff --git a/internal/core/src/query/generated/ExprVisitor.h b/internal/core/src/query/generated/ExprVisitor.h index 28541a1c1..d76af63f6 100644 --- a/internal/core/src/query/generated/ExprVisitor.h +++ b/internal/core/src/query/generated/ExprVisitor.h @@ -45,5 +45,8 @@ class ExprVisitor { virtual void visit(AlwaysTrueExpr&) = 0; + + virtual void + visit(JsonContainsExpr&) = 0; }; } // namespace milvus::query diff --git a/internal/core/src/query/generated/ExtractInfoExprVisitor.h b/internal/core/src/query/generated/ExtractInfoExprVisitor.h index 93b06e890..6ce758e5f 100644 --- a/internal/core/src/query/generated/ExtractInfoExprVisitor.h +++ b/internal/core/src/query/generated/ExtractInfoExprVisitor.h @@ -45,6 +45,9 @@ class ExtractInfoExprVisitor : public ExprVisitor { void visit(AlwaysTrueExpr& expr) override; + void + visit(JsonContainsExpr& expr) override; + public: explicit ExtractInfoExprVisitor(ExtractedPlanInfo& plan_info) : plan_info_(plan_info) { diff --git a/internal/core/src/query/generated/ShowExprVisitor.h b/internal/core/src/query/generated/ShowExprVisitor.h index 915afad84..9c5ca313b 100644 --- a/internal/core/src/query/generated/ShowExprVisitor.h +++ b/internal/core/src/query/generated/ShowExprVisitor.h @@ -46,6 +46,9 @@ class ShowExprVisitor : public ExprVisitor { void visit(AlwaysTrueExpr& expr) override; + void + visit(JsonContainsExpr& expr) override; + public: Json diff --git a/internal/core/src/query/generated/VerifyExprVisitor.h b/internal/core/src/query/generated/VerifyExprVisitor.h index f5c065d71..e791f2736 100644 --- a/internal/core/src/query/generated/VerifyExprVisitor.h +++ b/internal/core/src/query/generated/VerifyExprVisitor.h @@ -50,6 +50,9 @@ class VerifyExprVisitor : public ExprVisitor { void visit(AlwaysTrueExpr& expr) override; + void + visit(JsonContainsExpr& expr) override; + public: }; } // namespace milvus::query diff --git a/internal/core/src/query/visitors/ExecExprVisitor.cpp b/internal/core/src/query/visitors/ExecExprVisitor.cpp index 8e1c011df..e45b32643 100644 --- a/internal/core/src/query/visitors/ExecExprVisitor.cpp +++ b/internal/core/src/query/visitors/ExecExprVisitor.cpp @@ -1934,8 +1934,9 @@ ExecExprVisitor::ExecTermJsonVariableInField(TermExpr& expr_raw) -> BitsetType { if (val.error()) { return false; } - if (val.value() == target_val) + if (val.value() == target_val) { return true; + } } return false; }; @@ -2066,4 +2067,469 @@ ExecExprVisitor::visit(AlwaysTrueExpr& expr) { bitset_opt_ = std::move(res); } +bool +compareTwoJsonArray( + simdjson::simdjson_result arr1, + const proto::plan::Array& arr2) { + if (arr2.array_size() != arr1.count_elements()) { + return false; + } + int i = 0; + for (auto&& it : arr1) { + switch (arr2.array(i).val_case()) { + case proto::plan::GenericValue::kBoolVal: { + auto val = it.template get(); + if (val.error() || val.value() != arr2.array(i).bool_val()) { + return false; + } + break; + } + case proto::plan::GenericValue::kInt64Val: { + auto val = it.template get(); + if (val.error() || val.value() != arr2.array(i).int64_val()) { + return false; + } + break; + } + case proto::plan::GenericValue::kFloatVal: { + auto val = it.template get(); + if (val.error() || val.value() != arr2.array(i).float_val()) { + return false; + } + break; + } + case proto::plan::GenericValue::kStringVal: { + auto val = it.template get(); + if (val.error() || val.value() != arr2.array(i).string_val()) { + return false; + } + break; + } + default: + PanicInfo(fmt::format("unsupported data type {}", + arr2.array(i).val_case())); + } + i++; + } + return true; +} + +template +auto +ExecExprVisitor::ExecJsonContains(JsonContainsExpr& expr_raw) -> BitsetType { + using Index = index::ScalarIndex; + auto& expr = static_cast&>(expr_raw); + auto pointer = milvus::Json::pointer(expr.column_.nested_path); + auto index_func = [](Index* index) { return TargetBitmap{}; }; + using GetType = + std::conditional_t, + std::string_view, + ExprValueType>; + std::unordered_set elements; + for (auto const& element : expr.elements_) { + elements.insert(element); + } + auto elem_func = [&elements, &pointer](const milvus::Json& json) { + auto doc = json.doc(); + auto array = doc.at_pointer(pointer).get_array(); + if (array.error()) { + return false; + } + for (auto&& it : array) { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (elements.count(val.value()) > 0) { + return true; + } + } + return false; + }; + + return ExecRangeVisitorImpl( + expr.column_.field_id, index_func, elem_func); +} + +auto +ExecExprVisitor::ExecJsonContainsArray(JsonContainsExpr& expr_raw) + -> BitsetType { + using Index = index::ScalarIndex; + auto& expr = + static_cast&>(expr_raw); + auto pointer = milvus::Json::pointer(expr.column_.nested_path); + auto index_func = [](Index* index) { return TargetBitmap{}; }; + auto& elements = expr.elements_; + auto elem_func = [&elements, &pointer](const milvus::Json& json) { + auto doc = json.doc(); + auto array = doc.at_pointer(pointer).get_array(); + if (array.error()) { + return false; + } + for (auto const& element : elements) { + for (auto&& it : array) { + auto val = it.get_array(); + if (val.error()) { + continue; + } + if (compareTwoJsonArray(val, element)) { + return true; + } + } + } + return false; + }; + + return ExecRangeVisitorImpl( + expr.column_.field_id, index_func, elem_func); +} + +auto +ExecExprVisitor::ExecJsonContainsWithDiffType(JsonContainsExpr& expr_raw) + -> BitsetType { + using Index = index::ScalarIndex; + auto& expr = + static_cast&>(expr_raw); + auto pointer = milvus::Json::pointer(expr.column_.nested_path); + auto index_func = [](Index* index) { return TargetBitmap{}; }; + auto& elements = expr.elements_; + auto elem_func = [&elements, &pointer](const milvus::Json& json) { + auto doc = json.doc(); + auto array = doc.at_pointer(pointer).get_array(); + if (array.error()) { + return false; + } + // Note: array can only be iterated once + for (auto&& it : array) { + for (auto const& element : elements) { + switch (element.val_case()) { + case proto::plan::GenericValue::kBoolVal: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.bool_val()) { + return true; + } + break; + } + case proto::plan::GenericValue::kInt64Val: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.int64_val()) { + return true; + } + break; + } + case proto::plan::GenericValue::kFloatVal: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.float_val()) { + return true; + } + break; + } + case proto::plan::GenericValue::kStringVal: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.string_val()) { + return true; + } + break; + } + case proto::plan::GenericValue::kArrayVal: { + auto val = it.get_array(); + if (val.error()) { + continue; + } + if (compareTwoJsonArray(val, element.array_val())) { + return true; + } + break; + } + default: + PanicInfo(fmt::format("unsupported data type {}", + element.val_case())); + } + } + } + return false; + }; + + return ExecRangeVisitorImpl( + expr.column_.field_id, index_func, elem_func); +} + +template +auto +ExecExprVisitor::ExecJsonContainsAll(JsonContainsExpr& expr_raw) -> BitsetType { + using Index = index::ScalarIndex; + auto& expr = static_cast&>(expr_raw); + auto pointer = milvus::Json::pointer(expr.column_.nested_path); + auto index_func = [](Index* index) { return TargetBitmap{}; }; + using GetType = + std::conditional_t, + std::string_view, + ExprValueType>; + + std::unordered_set elements; + for (auto const& element : expr.elements_) { + elements.insert(element); + } + // auto elements = expr.elements_; + auto elem_func = [&elements, &pointer](const milvus::Json& json) { + auto doc = json.doc(); + auto array = doc.at_pointer(pointer).get_array(); + if (array.error()) { + return false; + } + std::unordered_set tmp_elements(elements); + // Note: array can only be iterated once + for (auto&& it : array) { + auto val = it.template get(); + if (val.error()) { + continue; + } + tmp_elements.erase(val.value()); + if (tmp_elements.size() == 0) { + return true; + } + } + return tmp_elements.size() == 0; + }; + + return ExecRangeVisitorImpl( + expr.column_.field_id, index_func, elem_func); +} + +auto +ExecExprVisitor::ExecJsonContainsAllArray(JsonContainsExpr& expr_raw) + -> BitsetType { + using Index = index::ScalarIndex; + auto& expr = + static_cast&>(expr_raw); + auto pointer = milvus::Json::pointer(expr.column_.nested_path); + auto index_func = [](Index* index) { return TargetBitmap{}; }; + auto& elements = expr.elements_; + std::unordered_set elements_index; + int i = 0; + for (auto& element : expr.elements_) { + elements_index.insert(i); + i++; + } + auto elem_func = + [&elements, &elements_index, &pointer](const milvus::Json& json) { + auto doc = json.doc(); + auto array = doc.at_pointer(pointer).get_array(); + if (array.error()) { + return false; + } + std::unordered_set tmp_elements_index(elements_index); + for (auto&& it : array) { + auto val = it.get_array(); + if (val.error()) { + continue; + } + int i = -1; + for (auto const& element : elements) { + i++; + if (compareTwoJsonArray(val, element)) { + tmp_elements_index.erase(i); + break; + } + } + if (tmp_elements_index.size() == 0) { + return true; + } + } + return tmp_elements_index.size() == 0; + }; + + return ExecRangeVisitorImpl( + expr.column_.field_id, index_func, elem_func); +} + +auto +ExecExprVisitor::ExecJsonContainsAllWithDiffType(JsonContainsExpr& expr_raw) + -> BitsetType { + using Index = index::ScalarIndex; + auto& expr = + static_cast&>(expr_raw); + auto pointer = milvus::Json::pointer(expr.column_.nested_path); + auto index_func = [](Index* index) { return TargetBitmap{}; }; + + auto elements = expr.elements_; + std::unordered_set elements_index; + int i = 0; + for (auto& element : expr.elements_) { + elements_index.insert(i); + i++; + } + auto elem_func = + [&elements, &elements_index, &pointer](const milvus::Json& json) { + auto doc = json.doc(); + auto array = doc.at_pointer(pointer).get_array(); + if (array.error()) { + return false; + } + std::unordered_set tmp_elements_index(elements_index); + for (auto&& it : array) { + int i = -1; + for (auto& element : elements) { + i++; + switch (element.val_case()) { + case proto::plan::GenericValue::kBoolVal: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.bool_val()) { + tmp_elements_index.erase(i); + } + break; + } + case proto::plan::GenericValue::kInt64Val: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.int64_val()) { + tmp_elements_index.erase(i); + } + break; + } + case proto::plan::GenericValue::kFloatVal: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.float_val()) { + tmp_elements_index.erase(i); + } + break; + } + case proto::plan::GenericValue::kStringVal: { + auto val = it.template get(); + if (val.error()) { + continue; + } + if (val.value() == element.string_val()) { + tmp_elements_index.erase(i); + } + break; + } + case proto::plan::GenericValue::kArrayVal: { + auto val = it.get_array(); + if (val.error()) { + continue; + } + if (compareTwoJsonArray(val, element.array_val())) { + tmp_elements_index.erase(i); + } + break; + } + default: + PanicInfo(fmt::format("unsupported data type {}", + element.val_case())); + } + if (tmp_elements_index.size() == 0) { + return true; + } + } + if (tmp_elements_index.size() == 0) { + return true; + } + } + return tmp_elements_index.size() == 0; + }; + + return ExecRangeVisitorImpl( + expr.column_.field_id, index_func, elem_func); +} + +void +ExecExprVisitor::visit(JsonContainsExpr& expr) { + auto& field_meta = segment_.get_schema()[expr.column_.field_id]; + AssertInfo( + expr.column_.data_type == DataType::JSON, + "[ExecExprVisitor]DataType of JsonContainsExpr isn't json data type"); + BitsetType res; + switch (expr.op_) { + case proto::plan::JSONContainsExpr_JSONOp_Contains: + case proto::plan::JSONContainsExpr_JSONOp_ContainsAny: { + if (expr.same_type_) { + switch (expr.val_case_) { + case proto::plan::GenericValue::kBoolVal: { + res = ExecJsonContains(expr); + break; + } + case proto::plan::GenericValue::kInt64Val: { + res = ExecJsonContains(expr); + break; + } + case proto::plan::GenericValue::kFloatVal: { + res = ExecJsonContains(expr); + break; + } + case proto::plan::GenericValue::kStringVal: { + res = ExecJsonContains(expr); + break; + } + case proto::plan::GenericValue::kArrayVal: { + res = ExecJsonContainsArray(expr); + break; + } + default: + PanicInfo(fmt::format("unsupported data type")); + } + break; + } + res = ExecJsonContainsWithDiffType(expr); + break; + } + case proto::plan::JSONContainsExpr_JSONOp_ContainsAll: { + if (expr.same_type_) { + switch (expr.val_case_) { + case proto::plan::GenericValue::kBoolVal: { + res = ExecJsonContainsAll(expr); + break; + } + case proto::plan::GenericValue::kInt64Val: { + res = ExecJsonContainsAll(expr); + break; + } + case proto::plan::GenericValue::kFloatVal: { + res = ExecJsonContainsAll(expr); + break; + } + case proto::plan::GenericValue::kStringVal: { + res = ExecJsonContainsAll(expr); + break; + } + case proto::plan::GenericValue::kArrayVal: { + res = ExecJsonContainsAllArray(expr); + break; + } + default: + PanicInfo(fmt::format("unsupported data type")); + } + break; + } + res = ExecJsonContainsAllWithDiffType(expr); + break; + } + default: + PanicInfo(fmt::format("unsupported json contains type")); + } + AssertInfo(res.size() == row_count_, + "[ExecExprVisitor]Size of results not equal row count"); + bitset_opt_ = std::move(res); +} + } // namespace milvus::query diff --git a/internal/core/src/query/visitors/ExtractInfoExprVisitor.cpp b/internal/core/src/query/visitors/ExtractInfoExprVisitor.cpp index 8bc689637..a6a7acd27 100644 --- a/internal/core/src/query/visitors/ExtractInfoExprVisitor.cpp +++ b/internal/core/src/query/visitors/ExtractInfoExprVisitor.cpp @@ -75,4 +75,9 @@ ExtractInfoExprVisitor::visit(AlwaysTrueExpr& expr) { // all is involved. } +void +ExtractInfoExprVisitor::visit(JsonContainsExpr& expr) { + plan_info_.add_involved_field(expr.column_.field_id); +} + } // namespace milvus::query diff --git a/internal/core/src/query/visitors/ShowExprVisitor.cpp b/internal/core/src/query/visitors/ShowExprVisitor.cpp index 679a29c88..7e4081065 100644 --- a/internal/core/src/query/visitors/ShowExprVisitor.cpp +++ b/internal/core/src/query/visitors/ShowExprVisitor.cpp @@ -343,4 +343,21 @@ ShowExprVisitor::visit(AlwaysTrueExpr& expr) { json_opt_ = res; } +void +ShowExprVisitor::visit(JsonContainsExpr& expr) { + using proto::plan::OpType; + using proto::plan::OpType_Name; + AssertInfo(!json_opt_.has_value(), + "[ShowExprVisitor]Ret json already has value before visit"); + + Json res{{"expr_type", "JsonContains"}, + {"field_id", expr.column_.field_id.get()}, + {"data_type", expr.column_.data_type}, + {"nested_path", expr.column_.nested_path}, + {"same_type", expr.same_type_}, + {"op", expr.op_}, + {"val_case", expr.val_case_}}; + json_opt_ = res; +} + } // namespace milvus::query diff --git a/internal/core/src/query/visitors/VerifyExprVisitor.cpp b/internal/core/src/query/visitors/VerifyExprVisitor.cpp index 118978ece..a3c158cdb 100644 --- a/internal/core/src/query/visitors/VerifyExprVisitor.cpp +++ b/internal/core/src/query/visitors/VerifyExprVisitor.cpp @@ -57,4 +57,9 @@ VerifyExprVisitor::visit(AlwaysTrueExpr& expr) { // TODO } +void +VerifyExprVisitor::visit(JsonContainsExpr& expr) { + // TODO +} + } // namespace milvus::query diff --git a/internal/core/unittest/test_expr.cpp b/internal/core/unittest/test_expr.cpp index 0e177a7f1..cfdf2b74c 100644 --- a/internal/core/unittest/test_expr.cpp +++ b/internal/core/unittest/test_expr.cpp @@ -24,6 +24,7 @@ #include "query/ExprImpl.h" #include "query/Plan.h" #include "query/PlanNode.h" +#include "query/PlanProto.h" #include "query/generated/ShowPlanNodeVisitor.h" #include "query/generated/ExecExprVisitor.h" #include "segcore/SegmentGrowingImpl.h" @@ -3293,3 +3294,813 @@ TEST(Expr, TestTermInFieldJson) { } } } + +TEST(Expr, PraseJsonContainsExpr) { + using namespace milvus; + using namespace milvus::query; + using namespace milvus::segcore; + + std::vector raw_plans{ + R"(vector_anns:< + field_id:100 + predicates:< + json_contains_expr:< + column_info:< + field_id:101 + data_type:JSON + nested_path:"A" + > + elements: elements: elements: + op:ContainsAny + elements_same_type:true + > + > + query_info:< + topk: 10 + round_decimal: 3 + metric_type: "L2" + search_params: "{\"nprobe\": 10}" + > placeholder_tag:"$0" + >)", + R"(vector_anns:< + field_id:100 + predicates:< + json_contains_expr:< + column_info:< + field_id:101 + data_type:JSON + nested_path:"A" + > + elements: elements: elements: + op:ContainsAll + elements_same_type:true + > + > + query_info:< + topk: 10 + round_decimal: 3 + metric_type: "L2" + search_params: "{\"nprobe\": 10}" + > placeholder_tag:"$0" + >)", + R"(vector_anns:< + field_id:100 + predicates:< + json_contains_expr:< + column_info:< + field_id:101 + data_type:JSON + nested_path:"A" + > + elements: elements: elements: + op:ContainsAll + elements_same_type:true + > + > + query_info:< + topk: 10 + round_decimal: 3 + metric_type: "L2" + search_params: "{\"nprobe\": 10}" + > placeholder_tag:"$0" + >)", + R"(vector_anns:< + field_id:100 + predicates:< + json_contains_expr:< + column_info:< + field_id:101 + data_type:JSON + nested_path:"A" + > + elements: elements: elements: + op:ContainsAll + elements_same_type:true + > + > + query_info:< + topk: 10 + round_decimal: 3 + metric_type: "L2" + search_params: "{\"nprobe\": 10}" + > placeholder_tag:"$0" + >)", + R"(vector_anns:< + field_id:100 + predicates:< + json_contains_expr:< + column_info:< + field_id:101 + data_type:JSON + nested_path:"A" + > + elements: elements: elements: + op:ContainsAll + elements_same_type:true + > + > + query_info:< + topk: 10 + round_decimal: 3 + metric_type: "L2" + search_params: "{\"nprobe\": 10}" + > placeholder_tag:"$0" + >)", + R"(vector_anns:< + field_id:100 + predicates:< + json_contains_expr:< + column_info:< + field_id:101 + data_type:JSON + nested_path:"A" + > + elements: + elements: + elements: + elements: + op:ContainsAll + > + > + query_info:< + topk: 10 + round_decimal: 3 + metric_type: "L2" + search_params: "{\"nprobe\": 10}" + > placeholder_tag:"$0" + >)", + }; + + for(auto& raw_plan : raw_plans) { + auto plan_str = translate_text_plan_to_binary_plan(raw_plan); + auto schema = std::make_shared(); + schema->AddDebugField( + "fakevec", DataType::VECTOR_FLOAT, 16, knowhere::metric::L2); + schema->AddDebugField("json", DataType::JSON); + auto plan = + CreateSearchPlanByExpr(*schema, plan_str.data(), plan_str.size()); + } +} + +TEST(Expr, TestJsonContainsAny) { + using namespace milvus; + using namespace milvus::query; + using namespace milvus::segcore; + + auto schema = std::make_shared(); + auto i64_fid = schema->AddDebugField("id", DataType::INT64); + auto json_fid = schema->AddDebugField("json", DataType::JSON); + schema->set_primary_field_id(i64_fid); + + auto seg = CreateGrowingSegment(schema, empty_index_meta); + int N = 10000; + std::vector json_col; + int num_iters = 2; + for (int iter = 0; iter < num_iters; ++iter) { + auto raw_data = DataGenForJsonArray(schema, N, iter); + auto new_json_col = raw_data.get_col(json_fid); + + json_col.insert( + json_col.end(), new_json_col.begin(), new_json_col.end()); + seg->PreInsert(N); + seg->Insert(iter * N, + N, + raw_data.row_ids_.data(), + raw_data.timestamps_.data(), + raw_data.raw_); + } + + auto seg_promote = dynamic_cast(seg.get()); + ExecExprVisitor visitor( + *seg_promote, seg_promote->get_row_count(), MAX_TIMESTAMP); + + std::vector> bool_testcases{{{true}, {"bool"}}, + {{false}, {"bool"}}}; + + for (auto testcase : bool_testcases) { + auto check = [&](const std::vector& values) { + return std::find(values.begin(), values.end(), testcase.term[0]) != + values.end(); + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAny, + proto::plan::GenericValue::ValCase::kBoolVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } + + std::vector> double_testcases{ + {{1.123}, {"double"}}, + {{10.34}, {"double"}}, + {{100.234}, {"double"}}, + {{1000.4546}, {"double"}}, + }; + + for (auto testcase : double_testcases) { + auto check = [&](const std::vector& values) { + return std::find(values.begin(), values.end(), testcase.term[0]) != + values.end(); + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAny, + proto::plan::GenericValue::ValCase::kFloatVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } + + std::vector> testcases{ + {{1}, {"int"}}, + {{10}, {"int"}}, + {{100}, {"int"}}, + {{1000}, {"int"}}, + }; + + for (auto testcase : testcases) { + auto check = [&](const std::vector& values) { + return std::find(values.begin(), values.end(), testcase.term[0]) != + values.end(); + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAny, + proto::plan::GenericValue::ValCase::kInt64Val); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } + + std::vector> testcases_string = { + {{"1sads"}, {"string"}}, + {{"10dsf"}, {"string"}}, + {{"100"}, {"string"}}, + {{"100ddfdsssdfdsfsd0"}, {"string"}}, + }; + + for (auto testcase : testcases_string) { + auto check = [&](const std::vector& values) { + return std::find(values.begin(), values.end(), testcase.term[0]) != + values.end(); + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAny, + proto::plan::GenericValue::ValCase::kStringVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } +} + +TEST(Expr, TestJsonContainsAll) { + using namespace milvus; + using namespace milvus::query; + using namespace milvus::segcore; + + auto schema = std::make_shared(); + auto i64_fid = schema->AddDebugField("id", DataType::INT64); + auto json_fid = schema->AddDebugField("json", DataType::JSON); + schema->set_primary_field_id(i64_fid); + + auto seg = CreateGrowingSegment(schema, empty_index_meta); + int N = 10000; + std::vector json_col; + int num_iters = 2; + for (int iter = 0; iter < num_iters; ++iter) { + auto raw_data = DataGenForJsonArray(schema, N, iter); + auto new_json_col = raw_data.get_col(json_fid); + + json_col.insert( + json_col.end(), new_json_col.begin(), new_json_col.end()); + seg->PreInsert(N); + seg->Insert(iter * N, + N, + raw_data.row_ids_.data(), + raw_data.timestamps_.data(), + raw_data.raw_); + } + + auto seg_promote = dynamic_cast(seg.get()); + ExecExprVisitor visitor( + *seg_promote, seg_promote->get_row_count(), MAX_TIMESTAMP); + + std::vector> bool_testcases{{{true, true}, {"bool"}}, + {{false, false}, {"bool"}}}; + + for (auto testcase : bool_testcases) { + auto check = [&](const std::vector& values) { + for(auto const& e : testcase.term) { + if (std::find(values.begin(), values.end(), e) == values.end()) { + return false; + } + } + return true; + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAll, + proto::plan::GenericValue::ValCase::kBoolVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } + + std::vector> double_testcases{ + {{1.123, 10.34}, {"double"}}, + {{10.34, 100.234}, {"double"}}, + {{100.234, 1000.4546}, {"double"}}, + {{1000.4546, 1.123}, {"double"}}, + {{1000.4546, 10.34}, {"double"}}, + {{1.123, 100.234}, {"double"}}, + }; + + for (auto testcase : double_testcases) { + auto check = [&](const std::vector& values) { + for(auto const& e : testcase.term) { + if (std::find(values.begin(), values.end(), e) == values.end()) { + return false; + } + } + return true; + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAll, + proto::plan::GenericValue::ValCase::kFloatVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } + + std::vector> testcases{ + {{1, 10}, {"int"}}, + {{10, 100}, {"int"}}, + {{100, 1000}, {"int"}}, + {{1000, 10}, {"int"}}, + {{2, 4, 6, 8, 10}, {"int"}}, + {{1, 2, 3, 4, 5}, {"int"}}, + }; + + for (auto testcase : testcases) { + auto check = [&](const std::vector& values) { + for(auto const& e : testcase.term) { + if (std::find(values.begin(), values.end(), e) == values.end()) { + return false; + } + } + return true; + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAll, + proto::plan::GenericValue::ValCase::kInt64Val); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } + + std::vector> testcases_string = { + {{"1sads", "10dsf"}, {"string"}}, + {{"10dsf", "100"}, {"string"}}, + {{"100", "10dsf", "1sads"}, {"string"}}, + {{"100ddfdsssdfdsfsd0", "100"}, {"string"}}, + }; + + for (auto testcase : testcases_string) { + auto check = [&](const std::vector& values) { + for(auto const& e : testcase.term) { + if (std::find(values.begin(), values.end(), e) == values.end()) { + return false; + } + } + return true; + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAll, + proto::plan::GenericValue::ValCase::kStringVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + ASSERT_EQ(ans, check(res)); + } + } +} + + +TEST(Expr, TestJsonContainsArray) { + using namespace milvus; + using namespace milvus::query; + using namespace milvus::segcore; + + auto schema = std::make_shared(); + auto i64_fid = schema->AddDebugField("id", DataType::INT64); + auto json_fid = schema->AddDebugField("json", DataType::JSON); + schema->set_primary_field_id(i64_fid); + + auto seg = CreateGrowingSegment(schema, empty_index_meta); + int N = 10000; + std::vector json_col; + int num_iters = 2; + for (int iter = 0; iter < num_iters; ++iter) { + auto raw_data = DataGenForJsonArray(schema, N, iter); + auto new_json_col = raw_data.get_col(json_fid); + + json_col.insert( + json_col.end(), new_json_col.begin(), new_json_col.end()); + seg->PreInsert(N); + seg->Insert(iter * N, + N, + raw_data.row_ids_.data(), + raw_data.timestamps_.data(), + raw_data.raw_); + } + + auto seg_promote = dynamic_cast(seg.get()); + ExecExprVisitor visitor( + *seg_promote, seg_promote->get_row_count(), MAX_TIMESTAMP); + + proto::plan::Array a; + a.set_same_type(false); + for (int i = 0; i < 4; ++i) { + if (i % 4 == 0) { + proto::plan::GenericValue int_val; + int_val.set_int64_val(int64_t(i)); + a.add_array()->CopyFrom(int_val); + }else if ((i-1) % 4 == 0 ) { + proto::plan::GenericValue bool_val; + bool_val.set_bool_val(bool(i)); + a.add_array()->CopyFrom(bool_val); + }else if ((i-2) % 4 == 0 ) { + proto::plan::GenericValue float_val; + float_val.set_float_val(double(i)); + a.add_array()->CopyFrom(float_val); + }else if ((i-3) % 4 == 0 ) { + proto::plan::GenericValue string_val; + string_val.set_string_val(std::to_string(i)); + a.add_array()->CopyFrom(string_val); + } + } + proto::plan::Array b; + b.set_same_type(true); + proto::plan::GenericValue int_val1; + int_val1.set_int64_val(int64_t(1)); + b.add_array()->CopyFrom(int_val1); + + proto::plan::GenericValue int_val2; + int_val2.set_int64_val(int64_t(2)); + b.add_array()->CopyFrom(int_val2); + + proto::plan::GenericValue int_val3; + int_val3.set_int64_val(int64_t(3)); + b.add_array()->CopyFrom(int_val3); + + + std::vector> diff_testcases{{{a}, {"string"}}, + {{b}, {"array"}}}; + + for (auto &testcase : diff_testcases) { + auto check = [&](const std::vector& values, int i) { + if (testcase.nested_path[0] == "array" && (i == 1 || i == N+1)) { + return true; + } + return false; + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAny, + proto::plan::GenericValue::ValCase::kArrayVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + std::vector res; + ASSERT_EQ(ans, check(res, i)); + } + } + + for (auto &testcase : diff_testcases) { + auto check = [&](const std::vector& values, int i) { + if (testcase.nested_path[0] == "array" && (i == 1 || i == N+1)) { + return true; + } + return false; + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + true, + proto::plan::JSONContainsExpr_JSONOp_ContainsAll, + proto::plan::GenericValue::ValCase::kArrayVal); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + std::vector res; + ASSERT_EQ(ans, check(res, i)); + } + } +} + +TEST(Expr, TestJsonContainsDiffType) { + using namespace milvus; + using namespace milvus::query; + using namespace milvus::segcore; + + auto schema = std::make_shared(); + auto i64_fid = schema->AddDebugField("id", DataType::INT64); + auto json_fid = schema->AddDebugField("json", DataType::JSON); + schema->set_primary_field_id(i64_fid); + + auto seg = CreateGrowingSegment(schema, empty_index_meta); + int N = 10000; + std::vector json_col; + int num_iters = 2; + for (int iter = 0; iter < num_iters; ++iter) { + auto raw_data = DataGenForJsonArray(schema, N, iter); + auto new_json_col = raw_data.get_col(json_fid); + + json_col.insert( + json_col.end(), new_json_col.begin(), new_json_col.end()); + seg->PreInsert(N); + seg->Insert(iter * N, + N, + raw_data.row_ids_.data(), + raw_data.timestamps_.data(), + raw_data.raw_); + } + + auto seg_promote = dynamic_cast(seg.get()); + ExecExprVisitor visitor( + *seg_promote, seg_promote->get_row_count(), MAX_TIMESTAMP); + + proto::plan::GenericValue v; + auto a = v.mutable_array_val(); + proto::plan::GenericValue int_val; + int_val.set_int64_val(int64_t(1)); + a->add_array()->CopyFrom(int_val); + proto::plan::GenericValue bool_val; + bool_val.set_bool_val(bool(false)); + a->add_array()->CopyFrom(bool_val); + proto::plan::GenericValue float_val; + float_val.set_float_val(double(100.34)); + a->add_array()->CopyFrom(float_val); + proto::plan::GenericValue string_val; + string_val.set_string_val("10dsf"); + a->add_array()->CopyFrom(string_val); +// a->set_same_type(false); +// v.set_allocated_array_val(a); + + std::vector> diff_testcases{{{v}, {"string"}}}; + + for (auto &testcase : diff_testcases) { + auto check = [&](const std::vector& values) { + return std::find(values.begin(), values.end(), std::string_view("10dsf")) != + values.end(); + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + false, + proto::plan::JSONContainsExpr_JSONOp_ContainsAny, + proto::plan::GenericValue::ValCase::VAL_NOT_SET); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + + ASSERT_EQ(ans, check(res)); + } + } + + for (auto &testcase : diff_testcases) { + auto check = [&](const std::vector& values) { + return false; + }; + RetrievePlanNode plan; + auto pointer = milvus::Json::pointer(testcase.nested_path); + plan.predicate_ = std::make_unique>( + ColumnInfo(json_fid, DataType::JSON, testcase.nested_path), + testcase.term, + false, + proto::plan::JSONContainsExpr_JSONOp_ContainsAll, + proto::plan::GenericValue::ValCase::VAL_NOT_SET); + auto start = std::chrono::steady_clock::now(); + auto final = visitor.call_child(*plan.predicate_.value()); + std::cout << "cost" + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - start) + .count() + << std::endl; + EXPECT_EQ(final.size(), N * num_iters); + + for (int i = 0; i < N * num_iters; ++i) { + auto ans = final[i]; + auto array = milvus::Json(simdjson::padded_string(json_col[i])) + .array_at(pointer); + std::vector res; + for (const auto& element : array) { + res.push_back(element.template get()); + } + + ASSERT_EQ(ans, check(res)); + } + } +} + diff --git a/internal/core/unittest/test_utils/DataGen.h b/internal/core/unittest/test_utils/DataGen.h index f14ab4070..349594fe3 100644 --- a/internal/core/unittest/test_utils/DataGen.h +++ b/internal/core/unittest/test_utils/DataGen.h @@ -407,17 +407,20 @@ DataGenForJsonArray(SchemaPtr schema, std::vector doubleVec; std::vector stringVec; std::vector boolVec; - for (int i = 0; i < array_len; ++i) { + std::vector arrayVec; + for (int j = 0; j < array_len; ++j) { intVec.push_back(std::to_string(er())); doubleVec.push_back( std::to_string(static_cast(er()))); stringVec.push_back("\"" + std::to_string(er()) + "\""); boolVec.push_back(i % 2 == 0 ? "true" : "false"); + arrayVec.push_back(fmt::format("[{}, {}, {}]", i, i+1, i+2)); } auto str = R"({"int":[)" + join(intVec, ",") + R"(],"double":[)" + join(doubleVec, ",") + R"(],"string":[)" + join(stringVec, ",") + - R"(],"bool": [)" + join(boolVec, ",") + "]}"; + R"(],"bool": [)" + join(boolVec, ",") + + R"(],"array": [)" + join(arrayVec, ",") + "]}"; //std::cout << str << std::endl; data[i] = str; } diff --git a/internal/parser/planparserv2/Plan.g4 b/internal/parser/planparserv2/Plan.g4 index b1e5f97c9..155226a36 100644 --- a/internal/parser/planparserv2/Plan.g4 +++ b/internal/parser/planparserv2/Plan.g4 @@ -12,6 +12,7 @@ expr: | Identifier # Identifier | JSONIdentifier # JSONIdentifier | '(' expr ')' # Parens + | '[' expr (',' expr)* ','? ']' # Array | expr LIKE StringLiteral # Like | expr POW expr # Power | op = (ADD | SUB | BNOT | NOT) expr # Unary @@ -22,6 +23,8 @@ expr: | expr op = (IN | NIN) ('[' expr (',' expr)* ','? ']') # Term | expr op = (IN | NIN) EmptyTerm # EmptyTerm | JSONContains'('expr',' expr')' # JSONContains + | JSONContainsAll'('expr',' expr')' # JSONContainsAll + | JSONContainsAny'('expr',' expr')' # JSONContainsAny | expr op1 = (LT | LE) (Identifier | JSONIdentifier) op2 = (LT | LE) expr # Range | expr op1 = (GT | GE) (Identifier | JSONIdentifier) op2 = (GT | GE) expr # ReverseRange | expr op = (LT | LE | GT | GE) expr # Relational @@ -76,6 +79,8 @@ NIN: 'not in'; EmptyTerm: '[' (Whitespace | Newline)* ']'; JSONContains: 'json_contains' | 'JSON_CONTAINS'; +JSONContainsAll: 'json_contains_all' | 'JSON_CONTAINS_ALL'; +JSONContainsAny: 'json_contains_any' | 'JSON_CONTAINS_ANY'; BooleanConstant: 'true' | 'True' | 'TRUE' | 'false' | 'False' | 'FALSE'; diff --git a/internal/parser/planparserv2/generated/Plan.interp b/internal/parser/planparserv2/generated/Plan.interp index 2f651a9ec..0b6b8b448 100644 --- a/internal/parser/planparserv2/generated/Plan.interp +++ b/internal/parser/planparserv2/generated/Plan.interp @@ -40,6 +40,8 @@ null null null null +null +null token symbolic names: null @@ -75,6 +77,8 @@ IN NIN EmptyTerm JSONContains +JSONContainsAll +JSONContainsAny BooleanConstant IntegerConstant FloatingConstant @@ -89,4 +93,4 @@ expr atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 42, 99, 4, 2, 9, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 27, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 81, 10, 2, 12, 2, 14, 2, 84, 11, 2, 3, 2, 5, 2, 87, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 94, 10, 2, 12, 2, 14, 2, 97, 11, 2, 3, 2, 2, 3, 2, 3, 2, 2, 12, 4, 2, 16, 17, 29, 30, 3, 2, 18, 20, 3, 2, 16, 17, 3, 2, 22, 23, 3, 2, 8, 9, 4, 2, 38, 38, 40, 40, 3, 2, 10, 11, 3, 2, 8, 11, 3, 2, 12, 13, 3, 2, 31, 32, 2, 124, 2, 26, 3, 2, 2, 2, 4, 5, 8, 2, 1, 2, 5, 27, 7, 36, 2, 2, 6, 27, 7, 37, 2, 2, 7, 27, 7, 35, 2, 2, 8, 27, 7, 39, 2, 2, 9, 27, 7, 38, 2, 2, 10, 27, 7, 40, 2, 2, 11, 12, 7, 3, 2, 2, 12, 13, 5, 2, 2, 2, 13, 14, 7, 4, 2, 2, 14, 27, 3, 2, 2, 2, 15, 16, 9, 2, 2, 2, 16, 27, 5, 2, 2, 19, 17, 18, 7, 34, 2, 2, 18, 19, 7, 3, 2, 2, 19, 20, 5, 2, 2, 2, 20, 21, 7, 6, 2, 2, 21, 22, 5, 2, 2, 2, 22, 23, 7, 4, 2, 2, 23, 27, 3, 2, 2, 2, 24, 25, 7, 15, 2, 2, 25, 27, 5, 2, 2, 3, 26, 4, 3, 2, 2, 2, 26, 6, 3, 2, 2, 2, 26, 7, 3, 2, 2, 2, 26, 8, 3, 2, 2, 2, 26, 9, 3, 2, 2, 2, 26, 10, 3, 2, 2, 2, 26, 11, 3, 2, 2, 2, 26, 15, 3, 2, 2, 2, 26, 17, 3, 2, 2, 2, 26, 24, 3, 2, 2, 2, 27, 95, 3, 2, 2, 2, 28, 29, 12, 20, 2, 2, 29, 30, 7, 21, 2, 2, 30, 94, 5, 2, 2, 21, 31, 32, 12, 18, 2, 2, 32, 33, 9, 3, 2, 2, 33, 94, 5, 2, 2, 19, 34, 35, 12, 17, 2, 2, 35, 36, 9, 4, 2, 2, 36, 94, 5, 2, 2, 18, 37, 38, 12, 16, 2, 2, 38, 39, 9, 5, 2, 2, 39, 94, 5, 2, 2, 17, 40, 41, 12, 12, 2, 2, 41, 42, 9, 6, 2, 2, 42, 43, 9, 7, 2, 2, 43, 44, 9, 6, 2, 2, 44, 94, 5, 2, 2, 13, 45, 46, 12, 11, 2, 2, 46, 47, 9, 8, 2, 2, 47, 48, 9, 7, 2, 2, 48, 49, 9, 8, 2, 2, 49, 94, 5, 2, 2, 12, 50, 51, 12, 10, 2, 2, 51, 52, 9, 9, 2, 2, 52, 94, 5, 2, 2, 11, 53, 54, 12, 9, 2, 2, 54, 55, 9, 10, 2, 2, 55, 94, 5, 2, 2, 10, 56, 57, 12, 8, 2, 2, 57, 58, 7, 24, 2, 2, 58, 94, 5, 2, 2, 9, 59, 60, 12, 7, 2, 2, 60, 61, 7, 26, 2, 2, 61, 94, 5, 2, 2, 8, 62, 63, 12, 6, 2, 2, 63, 64, 7, 25, 2, 2, 64, 94, 5, 2, 2, 7, 65, 66, 12, 5, 2, 2, 66, 67, 7, 27, 2, 2, 67, 94, 5, 2, 2, 6, 68, 69, 12, 4, 2, 2, 69, 70, 7, 28, 2, 2, 70, 94, 5, 2, 2, 5, 71, 72, 12, 21, 2, 2, 72, 73, 7, 14, 2, 2, 73, 94, 7, 39, 2, 2, 74, 75, 12, 15, 2, 2, 75, 76, 9, 11, 2, 2, 76, 77, 7, 5, 2, 2, 77, 82, 5, 2, 2, 2, 78, 79, 7, 6, 2, 2, 79, 81, 5, 2, 2, 2, 80, 78, 3, 2, 2, 2, 81, 84, 3, 2, 2, 2, 82, 80, 3, 2, 2, 2, 82, 83, 3, 2, 2, 2, 83, 86, 3, 2, 2, 2, 84, 82, 3, 2, 2, 2, 85, 87, 7, 6, 2, 2, 86, 85, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 88, 3, 2, 2, 2, 88, 89, 7, 7, 2, 2, 89, 94, 3, 2, 2, 2, 90, 91, 12, 14, 2, 2, 91, 92, 9, 11, 2, 2, 92, 94, 7, 33, 2, 2, 93, 28, 3, 2, 2, 2, 93, 31, 3, 2, 2, 2, 93, 34, 3, 2, 2, 2, 93, 37, 3, 2, 2, 2, 93, 40, 3, 2, 2, 2, 93, 45, 3, 2, 2, 2, 93, 50, 3, 2, 2, 2, 93, 53, 3, 2, 2, 2, 93, 56, 3, 2, 2, 2, 93, 59, 3, 2, 2, 2, 93, 62, 3, 2, 2, 2, 93, 65, 3, 2, 2, 2, 93, 68, 3, 2, 2, 2, 93, 71, 3, 2, 2, 2, 93, 74, 3, 2, 2, 2, 93, 90, 3, 2, 2, 2, 94, 97, 3, 2, 2, 2, 95, 93, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 3, 3, 2, 2, 2, 97, 95, 3, 2, 2, 2, 7, 26, 82, 86, 93, 95] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 44, 127, 4, 2, 9, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 20, 10, 2, 12, 2, 14, 2, 23, 11, 2, 3, 2, 5, 2, 26, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 55, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 109, 10, 2, 12, 2, 14, 2, 112, 11, 2, 3, 2, 5, 2, 115, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 122, 10, 2, 12, 2, 14, 2, 125, 11, 2, 3, 2, 2, 3, 2, 3, 2, 2, 12, 4, 2, 16, 17, 29, 30, 3, 2, 18, 20, 3, 2, 16, 17, 3, 2, 22, 23, 3, 2, 8, 9, 4, 2, 40, 40, 42, 42, 3, 2, 10, 11, 3, 2, 8, 11, 3, 2, 12, 13, 3, 2, 31, 32, 2, 157, 2, 54, 3, 2, 2, 2, 4, 5, 8, 2, 1, 2, 5, 55, 7, 38, 2, 2, 6, 55, 7, 39, 2, 2, 7, 55, 7, 37, 2, 2, 8, 55, 7, 41, 2, 2, 9, 55, 7, 40, 2, 2, 10, 55, 7, 42, 2, 2, 11, 12, 7, 3, 2, 2, 12, 13, 5, 2, 2, 2, 13, 14, 7, 4, 2, 2, 14, 55, 3, 2, 2, 2, 15, 16, 7, 5, 2, 2, 16, 21, 5, 2, 2, 2, 17, 18, 7, 6, 2, 2, 18, 20, 5, 2, 2, 2, 19, 17, 3, 2, 2, 2, 20, 23, 3, 2, 2, 2, 21, 19, 3, 2, 2, 2, 21, 22, 3, 2, 2, 2, 22, 25, 3, 2, 2, 2, 23, 21, 3, 2, 2, 2, 24, 26, 7, 6, 2, 2, 25, 24, 3, 2, 2, 2, 25, 26, 3, 2, 2, 2, 26, 27, 3, 2, 2, 2, 27, 28, 7, 7, 2, 2, 28, 55, 3, 2, 2, 2, 29, 30, 9, 2, 2, 2, 30, 55, 5, 2, 2, 21, 31, 32, 7, 34, 2, 2, 32, 33, 7, 3, 2, 2, 33, 34, 5, 2, 2, 2, 34, 35, 7, 6, 2, 2, 35, 36, 5, 2, 2, 2, 36, 37, 7, 4, 2, 2, 37, 55, 3, 2, 2, 2, 38, 39, 7, 35, 2, 2, 39, 40, 7, 3, 2, 2, 40, 41, 5, 2, 2, 2, 41, 42, 7, 6, 2, 2, 42, 43, 5, 2, 2, 2, 43, 44, 7, 4, 2, 2, 44, 55, 3, 2, 2, 2, 45, 46, 7, 36, 2, 2, 46, 47, 7, 3, 2, 2, 47, 48, 5, 2, 2, 2, 48, 49, 7, 6, 2, 2, 49, 50, 5, 2, 2, 2, 50, 51, 7, 4, 2, 2, 51, 55, 3, 2, 2, 2, 52, 53, 7, 15, 2, 2, 53, 55, 5, 2, 2, 3, 54, 4, 3, 2, 2, 2, 54, 6, 3, 2, 2, 2, 54, 7, 3, 2, 2, 2, 54, 8, 3, 2, 2, 2, 54, 9, 3, 2, 2, 2, 54, 10, 3, 2, 2, 2, 54, 11, 3, 2, 2, 2, 54, 15, 3, 2, 2, 2, 54, 29, 3, 2, 2, 2, 54, 31, 3, 2, 2, 2, 54, 38, 3, 2, 2, 2, 54, 45, 3, 2, 2, 2, 54, 52, 3, 2, 2, 2, 55, 123, 3, 2, 2, 2, 56, 57, 12, 22, 2, 2, 57, 58, 7, 21, 2, 2, 58, 122, 5, 2, 2, 23, 59, 60, 12, 20, 2, 2, 60, 61, 9, 3, 2, 2, 61, 122, 5, 2, 2, 21, 62, 63, 12, 19, 2, 2, 63, 64, 9, 4, 2, 2, 64, 122, 5, 2, 2, 20, 65, 66, 12, 18, 2, 2, 66, 67, 9, 5, 2, 2, 67, 122, 5, 2, 2, 19, 68, 69, 12, 12, 2, 2, 69, 70, 9, 6, 2, 2, 70, 71, 9, 7, 2, 2, 71, 72, 9, 6, 2, 2, 72, 122, 5, 2, 2, 13, 73, 74, 12, 11, 2, 2, 74, 75, 9, 8, 2, 2, 75, 76, 9, 7, 2, 2, 76, 77, 9, 8, 2, 2, 77, 122, 5, 2, 2, 12, 78, 79, 12, 10, 2, 2, 79, 80, 9, 9, 2, 2, 80, 122, 5, 2, 2, 11, 81, 82, 12, 9, 2, 2, 82, 83, 9, 10, 2, 2, 83, 122, 5, 2, 2, 10, 84, 85, 12, 8, 2, 2, 85, 86, 7, 24, 2, 2, 86, 122, 5, 2, 2, 9, 87, 88, 12, 7, 2, 2, 88, 89, 7, 26, 2, 2, 89, 122, 5, 2, 2, 8, 90, 91, 12, 6, 2, 2, 91, 92, 7, 25, 2, 2, 92, 122, 5, 2, 2, 7, 93, 94, 12, 5, 2, 2, 94, 95, 7, 27, 2, 2, 95, 122, 5, 2, 2, 6, 96, 97, 12, 4, 2, 2, 97, 98, 7, 28, 2, 2, 98, 122, 5, 2, 2, 5, 99, 100, 12, 23, 2, 2, 100, 101, 7, 14, 2, 2, 101, 122, 7, 41, 2, 2, 102, 103, 12, 17, 2, 2, 103, 104, 9, 11, 2, 2, 104, 105, 7, 5, 2, 2, 105, 110, 5, 2, 2, 2, 106, 107, 7, 6, 2, 2, 107, 109, 5, 2, 2, 2, 108, 106, 3, 2, 2, 2, 109, 112, 3, 2, 2, 2, 110, 108, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 111, 114, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 113, 115, 7, 6, 2, 2, 114, 113, 3, 2, 2, 2, 114, 115, 3, 2, 2, 2, 115, 116, 3, 2, 2, 2, 116, 117, 7, 7, 2, 2, 117, 122, 3, 2, 2, 2, 118, 119, 12, 16, 2, 2, 119, 120, 9, 11, 2, 2, 120, 122, 7, 33, 2, 2, 121, 56, 3, 2, 2, 2, 121, 59, 3, 2, 2, 2, 121, 62, 3, 2, 2, 2, 121, 65, 3, 2, 2, 2, 121, 68, 3, 2, 2, 2, 121, 73, 3, 2, 2, 2, 121, 78, 3, 2, 2, 2, 121, 81, 3, 2, 2, 2, 121, 84, 3, 2, 2, 2, 121, 87, 3, 2, 2, 2, 121, 90, 3, 2, 2, 2, 121, 93, 3, 2, 2, 2, 121, 96, 3, 2, 2, 2, 121, 99, 3, 2, 2, 2, 121, 102, 3, 2, 2, 2, 121, 118, 3, 2, 2, 2, 122, 125, 3, 2, 2, 2, 123, 121, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, 3, 3, 2, 2, 2, 125, 123, 3, 2, 2, 2, 9, 21, 25, 54, 110, 114, 121, 123] \ No newline at end of file diff --git a/internal/parser/planparserv2/generated/Plan.tokens b/internal/parser/planparserv2/generated/Plan.tokens index 8247aea98..ca7b53db2 100644 --- a/internal/parser/planparserv2/generated/Plan.tokens +++ b/internal/parser/planparserv2/generated/Plan.tokens @@ -30,14 +30,16 @@ IN=29 NIN=30 EmptyTerm=31 JSONContains=32 -BooleanConstant=33 -IntegerConstant=34 -FloatingConstant=35 -Identifier=36 -StringLiteral=37 -JSONIdentifier=38 -Whitespace=39 -Newline=40 +JSONContainsAll=33 +JSONContainsAny=34 +BooleanConstant=35 +IntegerConstant=36 +FloatingConstant=37 +Identifier=38 +StringLiteral=39 +JSONIdentifier=40 +Whitespace=41 +Newline=42 '('=1 ')'=2 '['=3 diff --git a/internal/parser/planparserv2/generated/PlanLexer.interp b/internal/parser/planparserv2/generated/PlanLexer.interp index 3dfd21df0..03ca4cd7b 100644 --- a/internal/parser/planparserv2/generated/PlanLexer.interp +++ b/internal/parser/planparserv2/generated/PlanLexer.interp @@ -40,6 +40,8 @@ null null null null +null +null token symbolic names: null @@ -75,6 +77,8 @@ IN NIN EmptyTerm JSONContains +JSONContainsAll +JSONContainsAny BooleanConstant IntegerConstant FloatingConstant @@ -117,6 +121,8 @@ IN NIN EmptyTerm JSONContains +JSONContainsAll +JSONContainsAny BooleanConstant IntegerConstant FloatingConstant @@ -155,4 +161,4 @@ mode names: DEFAULT_MODE atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 42, 530, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 160, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 174, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 206, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 212, 10, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 220, 10, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 7, 32, 235, 10, 32, 12, 32, 14, 32, 238, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 268, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 297, 10, 34, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 303, 10, 35, 3, 36, 3, 36, 5, 36, 307, 10, 36, 3, 37, 3, 37, 3, 37, 7, 37, 312, 10, 37, 12, 37, 14, 37, 315, 11, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 5, 37, 322, 10, 37, 3, 38, 5, 38, 325, 10, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 334, 10, 38, 3, 38, 3, 38, 7, 38, 338, 10, 38, 12, 38, 14, 38, 341, 11, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 352, 10, 38, 3, 38, 3, 38, 3, 38, 3, 38, 7, 38, 358, 10, 38, 12, 38, 14, 38, 361, 11, 38, 3, 38, 3, 38, 5, 38, 365, 10, 38, 3, 39, 3, 39, 3, 39, 3, 39, 5, 39, 371, 10, 39, 3, 39, 3, 39, 6, 39, 375, 10, 39, 13, 39, 14, 39, 376, 3, 40, 3, 40, 3, 40, 5, 40, 382, 10, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 6, 43, 391, 10, 43, 13, 43, 14, 43, 392, 3, 44, 3, 44, 7, 44, 397, 10, 44, 12, 44, 14, 44, 400, 11, 44, 3, 44, 5, 44, 403, 10, 44, 3, 45, 3, 45, 7, 45, 407, 10, 45, 12, 45, 14, 45, 410, 11, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 5, 51, 437, 10, 51, 3, 52, 3, 52, 5, 52, 441, 10, 52, 3, 52, 3, 52, 3, 52, 5, 52, 446, 10, 52, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 452, 10, 53, 3, 53, 3, 53, 3, 54, 5, 54, 457, 10, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 5, 54, 464, 10, 54, 3, 55, 3, 55, 5, 55, 468, 10, 55, 3, 55, 3, 55, 3, 56, 6, 56, 473, 10, 56, 13, 56, 14, 56, 474, 3, 57, 5, 57, 478, 10, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 5, 57, 485, 10, 57, 3, 58, 6, 58, 488, 10, 58, 13, 58, 14, 58, 489, 3, 59, 3, 59, 5, 59, 494, 10, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 503, 10, 60, 3, 60, 5, 60, 506, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 513, 10, 60, 3, 61, 6, 61, 516, 10, 61, 13, 61, 14, 61, 517, 3, 61, 3, 61, 3, 62, 3, 62, 5, 62, 524, 10, 62, 3, 62, 5, 62, 527, 10, 62, 3, 62, 3, 62, 2, 2, 63, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, 113, 2, 115, 2, 117, 2, 119, 2, 121, 41, 123, 42, 3, 2, 19, 3, 2, 41, 41, 4, 2, 36, 36, 94, 94, 5, 2, 36, 36, 41, 41, 94, 94, 5, 2, 78, 78, 87, 87, 119, 119, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 90, 90, 122, 122, 3, 2, 51, 59, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 82, 82, 114, 114, 12, 2, 36, 36, 41, 41, 65, 65, 94, 94, 99, 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 4, 2, 11, 11, 34, 34, 2, 564, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 3, 125, 3, 2, 2, 2, 5, 127, 3, 2, 2, 2, 7, 129, 3, 2, 2, 2, 9, 131, 3, 2, 2, 2, 11, 133, 3, 2, 2, 2, 13, 135, 3, 2, 2, 2, 15, 137, 3, 2, 2, 2, 17, 140, 3, 2, 2, 2, 19, 142, 3, 2, 2, 2, 21, 145, 3, 2, 2, 2, 23, 148, 3, 2, 2, 2, 25, 159, 3, 2, 2, 2, 27, 173, 3, 2, 2, 2, 29, 175, 3, 2, 2, 2, 31, 177, 3, 2, 2, 2, 33, 179, 3, 2, 2, 2, 35, 181, 3, 2, 2, 2, 37, 183, 3, 2, 2, 2, 39, 185, 3, 2, 2, 2, 41, 188, 3, 2, 2, 2, 43, 191, 3, 2, 2, 2, 45, 194, 3, 2, 2, 2, 47, 196, 3, 2, 2, 2, 49, 198, 3, 2, 2, 2, 51, 205, 3, 2, 2, 2, 53, 211, 3, 2, 2, 2, 55, 213, 3, 2, 2, 2, 57, 219, 3, 2, 2, 2, 59, 221, 3, 2, 2, 2, 61, 224, 3, 2, 2, 2, 63, 231, 3, 2, 2, 2, 65, 267, 3, 2, 2, 2, 67, 296, 3, 2, 2, 2, 69, 302, 3, 2, 2, 2, 71, 306, 3, 2, 2, 2, 73, 321, 3, 2, 2, 2, 75, 364, 3, 2, 2, 2, 77, 366, 3, 2, 2, 2, 79, 381, 3, 2, 2, 2, 81, 383, 3, 2, 2, 2, 83, 385, 3, 2, 2, 2, 85, 387, 3, 2, 2, 2, 87, 402, 3, 2, 2, 2, 89, 404, 3, 2, 2, 2, 91, 411, 3, 2, 2, 2, 93, 415, 3, 2, 2, 2, 95, 417, 3, 2, 2, 2, 97, 419, 3, 2, 2, 2, 99, 421, 3, 2, 2, 2, 101, 436, 3, 2, 2, 2, 103, 445, 3, 2, 2, 2, 105, 447, 3, 2, 2, 2, 107, 463, 3, 2, 2, 2, 109, 465, 3, 2, 2, 2, 111, 472, 3, 2, 2, 2, 113, 484, 3, 2, 2, 2, 115, 487, 3, 2, 2, 2, 117, 491, 3, 2, 2, 2, 119, 512, 3, 2, 2, 2, 121, 515, 3, 2, 2, 2, 123, 526, 3, 2, 2, 2, 125, 126, 7, 42, 2, 2, 126, 4, 3, 2, 2, 2, 127, 128, 7, 43, 2, 2, 128, 6, 3, 2, 2, 2, 129, 130, 7, 93, 2, 2, 130, 8, 3, 2, 2, 2, 131, 132, 7, 46, 2, 2, 132, 10, 3, 2, 2, 2, 133, 134, 7, 95, 2, 2, 134, 12, 3, 2, 2, 2, 135, 136, 7, 62, 2, 2, 136, 14, 3, 2, 2, 2, 137, 138, 7, 62, 2, 2, 138, 139, 7, 63, 2, 2, 139, 16, 3, 2, 2, 2, 140, 141, 7, 64, 2, 2, 141, 18, 3, 2, 2, 2, 142, 143, 7, 64, 2, 2, 143, 144, 7, 63, 2, 2, 144, 20, 3, 2, 2, 2, 145, 146, 7, 63, 2, 2, 146, 147, 7, 63, 2, 2, 147, 22, 3, 2, 2, 2, 148, 149, 7, 35, 2, 2, 149, 150, 7, 63, 2, 2, 150, 24, 3, 2, 2, 2, 151, 152, 7, 110, 2, 2, 152, 153, 7, 107, 2, 2, 153, 154, 7, 109, 2, 2, 154, 160, 7, 103, 2, 2, 155, 156, 7, 78, 2, 2, 156, 157, 7, 75, 2, 2, 157, 158, 7, 77, 2, 2, 158, 160, 7, 71, 2, 2, 159, 151, 3, 2, 2, 2, 159, 155, 3, 2, 2, 2, 160, 26, 3, 2, 2, 2, 161, 162, 7, 103, 2, 2, 162, 163, 7, 122, 2, 2, 163, 164, 7, 107, 2, 2, 164, 165, 7, 117, 2, 2, 165, 166, 7, 118, 2, 2, 166, 174, 7, 117, 2, 2, 167, 168, 7, 71, 2, 2, 168, 169, 7, 90, 2, 2, 169, 170, 7, 75, 2, 2, 170, 171, 7, 85, 2, 2, 171, 172, 7, 86, 2, 2, 172, 174, 7, 85, 2, 2, 173, 161, 3, 2, 2, 2, 173, 167, 3, 2, 2, 2, 174, 28, 3, 2, 2, 2, 175, 176, 7, 45, 2, 2, 176, 30, 3, 2, 2, 2, 177, 178, 7, 47, 2, 2, 178, 32, 3, 2, 2, 2, 179, 180, 7, 44, 2, 2, 180, 34, 3, 2, 2, 2, 181, 182, 7, 49, 2, 2, 182, 36, 3, 2, 2, 2, 183, 184, 7, 39, 2, 2, 184, 38, 3, 2, 2, 2, 185, 186, 7, 44, 2, 2, 186, 187, 7, 44, 2, 2, 187, 40, 3, 2, 2, 2, 188, 189, 7, 62, 2, 2, 189, 190, 7, 62, 2, 2, 190, 42, 3, 2, 2, 2, 191, 192, 7, 64, 2, 2, 192, 193, 7, 64, 2, 2, 193, 44, 3, 2, 2, 2, 194, 195, 7, 40, 2, 2, 195, 46, 3, 2, 2, 2, 196, 197, 7, 126, 2, 2, 197, 48, 3, 2, 2, 2, 198, 199, 7, 96, 2, 2, 199, 50, 3, 2, 2, 2, 200, 201, 7, 40, 2, 2, 201, 206, 7, 40, 2, 2, 202, 203, 7, 99, 2, 2, 203, 204, 7, 112, 2, 2, 204, 206, 7, 102, 2, 2, 205, 200, 3, 2, 2, 2, 205, 202, 3, 2, 2, 2, 206, 52, 3, 2, 2, 2, 207, 208, 7, 126, 2, 2, 208, 212, 7, 126, 2, 2, 209, 210, 7, 113, 2, 2, 210, 212, 7, 116, 2, 2, 211, 207, 3, 2, 2, 2, 211, 209, 3, 2, 2, 2, 212, 54, 3, 2, 2, 2, 213, 214, 7, 128, 2, 2, 214, 56, 3, 2, 2, 2, 215, 220, 7, 35, 2, 2, 216, 217, 7, 112, 2, 2, 217, 218, 7, 113, 2, 2, 218, 220, 7, 118, 2, 2, 219, 215, 3, 2, 2, 2, 219, 216, 3, 2, 2, 2, 220, 58, 3, 2, 2, 2, 221, 222, 7, 107, 2, 2, 222, 223, 7, 112, 2, 2, 223, 60, 3, 2, 2, 2, 224, 225, 7, 112, 2, 2, 225, 226, 7, 113, 2, 2, 226, 227, 7, 118, 2, 2, 227, 228, 7, 34, 2, 2, 228, 229, 7, 107, 2, 2, 229, 230, 7, 112, 2, 2, 230, 62, 3, 2, 2, 2, 231, 236, 7, 93, 2, 2, 232, 235, 5, 121, 61, 2, 233, 235, 5, 123, 62, 2, 234, 232, 3, 2, 2, 2, 234, 233, 3, 2, 2, 2, 235, 238, 3, 2, 2, 2, 236, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 239, 3, 2, 2, 2, 238, 236, 3, 2, 2, 2, 239, 240, 7, 95, 2, 2, 240, 64, 3, 2, 2, 2, 241, 242, 7, 108, 2, 2, 242, 243, 7, 117, 2, 2, 243, 244, 7, 113, 2, 2, 244, 245, 7, 112, 2, 2, 245, 246, 7, 97, 2, 2, 246, 247, 7, 101, 2, 2, 247, 248, 7, 113, 2, 2, 248, 249, 7, 112, 2, 2, 249, 250, 7, 118, 2, 2, 250, 251, 7, 99, 2, 2, 251, 252, 7, 107, 2, 2, 252, 253, 7, 112, 2, 2, 253, 268, 7, 117, 2, 2, 254, 255, 7, 76, 2, 2, 255, 256, 7, 85, 2, 2, 256, 257, 7, 81, 2, 2, 257, 258, 7, 80, 2, 2, 258, 259, 7, 97, 2, 2, 259, 260, 7, 69, 2, 2, 260, 261, 7, 81, 2, 2, 261, 262, 7, 80, 2, 2, 262, 263, 7, 86, 2, 2, 263, 264, 7, 67, 2, 2, 264, 265, 7, 75, 2, 2, 265, 266, 7, 80, 2, 2, 266, 268, 7, 85, 2, 2, 267, 241, 3, 2, 2, 2, 267, 254, 3, 2, 2, 2, 268, 66, 3, 2, 2, 2, 269, 270, 7, 118, 2, 2, 270, 271, 7, 116, 2, 2, 271, 272, 7, 119, 2, 2, 272, 297, 7, 103, 2, 2, 273, 274, 7, 86, 2, 2, 274, 275, 7, 116, 2, 2, 275, 276, 7, 119, 2, 2, 276, 297, 7, 103, 2, 2, 277, 278, 7, 86, 2, 2, 278, 279, 7, 84, 2, 2, 279, 280, 7, 87, 2, 2, 280, 297, 7, 71, 2, 2, 281, 282, 7, 104, 2, 2, 282, 283, 7, 99, 2, 2, 283, 284, 7, 110, 2, 2, 284, 285, 7, 117, 2, 2, 285, 297, 7, 103, 2, 2, 286, 287, 7, 72, 2, 2, 287, 288, 7, 99, 2, 2, 288, 289, 7, 110, 2, 2, 289, 290, 7, 117, 2, 2, 290, 297, 7, 103, 2, 2, 291, 292, 7, 72, 2, 2, 292, 293, 7, 67, 2, 2, 293, 294, 7, 78, 2, 2, 294, 295, 7, 85, 2, 2, 295, 297, 7, 71, 2, 2, 296, 269, 3, 2, 2, 2, 296, 273, 3, 2, 2, 2, 296, 277, 3, 2, 2, 2, 296, 281, 3, 2, 2, 2, 296, 286, 3, 2, 2, 2, 296, 291, 3, 2, 2, 2, 297, 68, 3, 2, 2, 2, 298, 303, 5, 87, 44, 2, 299, 303, 5, 89, 45, 2, 300, 303, 5, 91, 46, 2, 301, 303, 5, 85, 43, 2, 302, 298, 3, 2, 2, 2, 302, 299, 3, 2, 2, 2, 302, 300, 3, 2, 2, 2, 302, 301, 3, 2, 2, 2, 303, 70, 3, 2, 2, 2, 304, 307, 5, 103, 52, 2, 305, 307, 5, 105, 53, 2, 306, 304, 3, 2, 2, 2, 306, 305, 3, 2, 2, 2, 307, 72, 3, 2, 2, 2, 308, 313, 5, 81, 41, 2, 309, 312, 5, 81, 41, 2, 310, 312, 5, 83, 42, 2, 311, 309, 3, 2, 2, 2, 311, 310, 3, 2, 2, 2, 312, 315, 3, 2, 2, 2, 313, 311, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, 314, 322, 3, 2, 2, 2, 315, 313, 3, 2, 2, 2, 316, 317, 7, 38, 2, 2, 317, 318, 7, 111, 2, 2, 318, 319, 7, 103, 2, 2, 319, 320, 7, 118, 2, 2, 320, 322, 7, 99, 2, 2, 321, 308, 3, 2, 2, 2, 321, 316, 3, 2, 2, 2, 322, 74, 3, 2, 2, 2, 323, 325, 5, 79, 40, 2, 324, 323, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2, 325, 326, 3, 2, 2, 2, 326, 327, 7, 36, 2, 2, 327, 339, 8, 38, 2, 2, 328, 333, 7, 94, 2, 2, 329, 330, 7, 41, 2, 2, 330, 334, 8, 38, 3, 2, 331, 332, 10, 2, 2, 2, 332, 334, 8, 38, 4, 2, 333, 329, 3, 2, 2, 2, 333, 331, 3, 2, 2, 2, 334, 338, 3, 2, 2, 2, 335, 336, 10, 3, 2, 2, 336, 338, 8, 38, 5, 2, 337, 328, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 338, 341, 3, 2, 2, 2, 339, 337, 3, 2, 2, 2, 339, 340, 3, 2, 2, 2, 340, 342, 3, 2, 2, 2, 341, 339, 3, 2, 2, 2, 342, 343, 7, 36, 2, 2, 343, 365, 8, 38, 6, 2, 344, 345, 7, 41, 2, 2, 345, 359, 8, 38, 7, 2, 346, 351, 7, 94, 2, 2, 347, 348, 7, 41, 2, 2, 348, 352, 8, 38, 8, 2, 349, 350, 10, 2, 2, 2, 350, 352, 8, 38, 9, 2, 351, 347, 3, 2, 2, 2, 351, 349, 3, 2, 2, 2, 352, 358, 3, 2, 2, 2, 353, 354, 7, 36, 2, 2, 354, 358, 8, 38, 10, 2, 355, 356, 10, 4, 2, 2, 356, 358, 8, 38, 11, 2, 357, 346, 3, 2, 2, 2, 357, 353, 3, 2, 2, 2, 357, 355, 3, 2, 2, 2, 358, 361, 3, 2, 2, 2, 359, 357, 3, 2, 2, 2, 359, 360, 3, 2, 2, 2, 360, 362, 3, 2, 2, 2, 361, 359, 3, 2, 2, 2, 362, 363, 7, 41, 2, 2, 363, 365, 8, 38, 12, 2, 364, 324, 3, 2, 2, 2, 364, 344, 3, 2, 2, 2, 365, 76, 3, 2, 2, 2, 366, 374, 5, 73, 37, 2, 367, 370, 7, 93, 2, 2, 368, 371, 5, 75, 38, 2, 369, 371, 5, 87, 44, 2, 370, 368, 3, 2, 2, 2, 370, 369, 3, 2, 2, 2, 371, 372, 3, 2, 2, 2, 372, 373, 7, 95, 2, 2, 373, 375, 3, 2, 2, 2, 374, 367, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 374, 3, 2, 2, 2, 376, 377, 3, 2, 2, 2, 377, 78, 3, 2, 2, 2, 378, 379, 7, 119, 2, 2, 379, 382, 7, 58, 2, 2, 380, 382, 9, 5, 2, 2, 381, 378, 3, 2, 2, 2, 381, 380, 3, 2, 2, 2, 382, 80, 3, 2, 2, 2, 383, 384, 9, 6, 2, 2, 384, 82, 3, 2, 2, 2, 385, 386, 9, 7, 2, 2, 386, 84, 3, 2, 2, 2, 387, 388, 7, 50, 2, 2, 388, 390, 9, 8, 2, 2, 389, 391, 9, 9, 2, 2, 390, 389, 3, 2, 2, 2, 391, 392, 3, 2, 2, 2, 392, 390, 3, 2, 2, 2, 392, 393, 3, 2, 2, 2, 393, 86, 3, 2, 2, 2, 394, 398, 5, 93, 47, 2, 395, 397, 5, 83, 42, 2, 396, 395, 3, 2, 2, 2, 397, 400, 3, 2, 2, 2, 398, 396, 3, 2, 2, 2, 398, 399, 3, 2, 2, 2, 399, 403, 3, 2, 2, 2, 400, 398, 3, 2, 2, 2, 401, 403, 7, 50, 2, 2, 402, 394, 3, 2, 2, 2, 402, 401, 3, 2, 2, 2, 403, 88, 3, 2, 2, 2, 404, 408, 7, 50, 2, 2, 405, 407, 5, 95, 48, 2, 406, 405, 3, 2, 2, 2, 407, 410, 3, 2, 2, 2, 408, 406, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 90, 3, 2, 2, 2, 410, 408, 3, 2, 2, 2, 411, 412, 7, 50, 2, 2, 412, 413, 9, 10, 2, 2, 413, 414, 5, 115, 58, 2, 414, 92, 3, 2, 2, 2, 415, 416, 9, 11, 2, 2, 416, 94, 3, 2, 2, 2, 417, 418, 9, 12, 2, 2, 418, 96, 3, 2, 2, 2, 419, 420, 9, 13, 2, 2, 420, 98, 3, 2, 2, 2, 421, 422, 5, 97, 49, 2, 422, 423, 5, 97, 49, 2, 423, 424, 5, 97, 49, 2, 424, 425, 5, 97, 49, 2, 425, 100, 3, 2, 2, 2, 426, 427, 7, 94, 2, 2, 427, 428, 7, 119, 2, 2, 428, 429, 3, 2, 2, 2, 429, 437, 5, 99, 50, 2, 430, 431, 7, 94, 2, 2, 431, 432, 7, 87, 2, 2, 432, 433, 3, 2, 2, 2, 433, 434, 5, 99, 50, 2, 434, 435, 5, 99, 50, 2, 435, 437, 3, 2, 2, 2, 436, 426, 3, 2, 2, 2, 436, 430, 3, 2, 2, 2, 437, 102, 3, 2, 2, 2, 438, 440, 5, 107, 54, 2, 439, 441, 5, 109, 55, 2, 440, 439, 3, 2, 2, 2, 440, 441, 3, 2, 2, 2, 441, 446, 3, 2, 2, 2, 442, 443, 5, 111, 56, 2, 443, 444, 5, 109, 55, 2, 444, 446, 3, 2, 2, 2, 445, 438, 3, 2, 2, 2, 445, 442, 3, 2, 2, 2, 446, 104, 3, 2, 2, 2, 447, 448, 7, 50, 2, 2, 448, 451, 9, 10, 2, 2, 449, 452, 5, 113, 57, 2, 450, 452, 5, 115, 58, 2, 451, 449, 3, 2, 2, 2, 451, 450, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 454, 5, 117, 59, 2, 454, 106, 3, 2, 2, 2, 455, 457, 5, 111, 56, 2, 456, 455, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 459, 7, 48, 2, 2, 459, 464, 5, 111, 56, 2, 460, 461, 5, 111, 56, 2, 461, 462, 7, 48, 2, 2, 462, 464, 3, 2, 2, 2, 463, 456, 3, 2, 2, 2, 463, 460, 3, 2, 2, 2, 464, 108, 3, 2, 2, 2, 465, 467, 9, 14, 2, 2, 466, 468, 9, 15, 2, 2, 467, 466, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 470, 5, 111, 56, 2, 470, 110, 3, 2, 2, 2, 471, 473, 5, 83, 42, 2, 472, 471, 3, 2, 2, 2, 473, 474, 3, 2, 2, 2, 474, 472, 3, 2, 2, 2, 474, 475, 3, 2, 2, 2, 475, 112, 3, 2, 2, 2, 476, 478, 5, 115, 58, 2, 477, 476, 3, 2, 2, 2, 477, 478, 3, 2, 2, 2, 478, 479, 3, 2, 2, 2, 479, 480, 7, 48, 2, 2, 480, 485, 5, 115, 58, 2, 481, 482, 5, 115, 58, 2, 482, 483, 7, 48, 2, 2, 483, 485, 3, 2, 2, 2, 484, 477, 3, 2, 2, 2, 484, 481, 3, 2, 2, 2, 485, 114, 3, 2, 2, 2, 486, 488, 5, 97, 49, 2, 487, 486, 3, 2, 2, 2, 488, 489, 3, 2, 2, 2, 489, 487, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 116, 3, 2, 2, 2, 491, 493, 9, 16, 2, 2, 492, 494, 9, 15, 2, 2, 493, 492, 3, 2, 2, 2, 493, 494, 3, 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 496, 5, 111, 56, 2, 496, 118, 3, 2, 2, 2, 497, 498, 7, 94, 2, 2, 498, 513, 9, 17, 2, 2, 499, 500, 7, 94, 2, 2, 500, 502, 5, 95, 48, 2, 501, 503, 5, 95, 48, 2, 502, 501, 3, 2, 2, 2, 502, 503, 3, 2, 2, 2, 503, 505, 3, 2, 2, 2, 504, 506, 5, 95, 48, 2, 505, 504, 3, 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 513, 3, 2, 2, 2, 507, 508, 7, 94, 2, 2, 508, 509, 7, 122, 2, 2, 509, 510, 3, 2, 2, 2, 510, 513, 5, 115, 58, 2, 511, 513, 5, 101, 51, 2, 512, 497, 3, 2, 2, 2, 512, 499, 3, 2, 2, 2, 512, 507, 3, 2, 2, 2, 512, 511, 3, 2, 2, 2, 513, 120, 3, 2, 2, 2, 514, 516, 9, 18, 2, 2, 515, 514, 3, 2, 2, 2, 516, 517, 3, 2, 2, 2, 517, 515, 3, 2, 2, 2, 517, 518, 3, 2, 2, 2, 518, 519, 3, 2, 2, 2, 519, 520, 8, 61, 13, 2, 520, 122, 3, 2, 2, 2, 521, 523, 7, 15, 2, 2, 522, 524, 7, 12, 2, 2, 523, 522, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 527, 3, 2, 2, 2, 525, 527, 7, 12, 2, 2, 526, 521, 3, 2, 2, 2, 526, 525, 3, 2, 2, 2, 527, 528, 3, 2, 2, 2, 528, 529, 8, 62, 13, 2, 529, 124, 3, 2, 2, 2, 50, 2, 159, 173, 205, 211, 219, 234, 236, 267, 296, 302, 306, 311, 313, 321, 324, 333, 337, 339, 351, 357, 359, 364, 370, 376, 381, 392, 398, 402, 408, 436, 440, 445, 451, 456, 463, 467, 474, 477, 484, 489, 493, 502, 505, 512, 517, 523, 526, 14, 3, 38, 2, 3, 38, 3, 3, 38, 4, 3, 38, 5, 3, 38, 6, 3, 38, 7, 3, 38, 8, 3, 38, 9, 3, 38, 10, 3, 38, 11, 3, 38, 12, 8, 2, 2] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 44, 606, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 164, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 178, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 210, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 216, 10, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 224, 10, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 7, 32, 239, 10, 32, 12, 32, 14, 32, 242, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 272, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 308, 10, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, 35, 344, 10, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 373, 10, 36, 3, 37, 3, 37, 3, 37, 3, 37, 5, 37, 379, 10, 37, 3, 38, 3, 38, 5, 38, 383, 10, 38, 3, 39, 3, 39, 3, 39, 7, 39, 388, 10, 39, 12, 39, 14, 39, 391, 11, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 5, 39, 398, 10, 39, 3, 40, 5, 40, 401, 10, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 410, 10, 40, 3, 40, 3, 40, 7, 40, 414, 10, 40, 12, 40, 14, 40, 417, 11, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 428, 10, 40, 3, 40, 3, 40, 3, 40, 3, 40, 7, 40, 434, 10, 40, 12, 40, 14, 40, 437, 11, 40, 3, 40, 3, 40, 5, 40, 441, 10, 40, 3, 41, 3, 41, 3, 41, 3, 41, 5, 41, 447, 10, 41, 3, 41, 3, 41, 6, 41, 451, 10, 41, 13, 41, 14, 41, 452, 3, 42, 3, 42, 3, 42, 5, 42, 458, 10, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 6, 45, 467, 10, 45, 13, 45, 14, 45, 468, 3, 46, 3, 46, 7, 46, 473, 10, 46, 12, 46, 14, 46, 476, 11, 46, 3, 46, 5, 46, 479, 10, 46, 3, 47, 3, 47, 7, 47, 483, 10, 47, 12, 47, 14, 47, 486, 11, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 513, 10, 53, 3, 54, 3, 54, 5, 54, 517, 10, 54, 3, 54, 3, 54, 3, 54, 5, 54, 522, 10, 54, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 528, 10, 55, 3, 55, 3, 55, 3, 56, 5, 56, 533, 10, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 5, 56, 540, 10, 56, 3, 57, 3, 57, 5, 57, 544, 10, 57, 3, 57, 3, 57, 3, 58, 6, 58, 549, 10, 58, 13, 58, 14, 58, 550, 3, 59, 5, 59, 554, 10, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 561, 10, 59, 3, 60, 6, 60, 564, 10, 60, 13, 60, 14, 60, 565, 3, 61, 3, 61, 5, 61, 570, 10, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 5, 62, 579, 10, 62, 3, 62, 5, 62, 582, 10, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 5, 62, 589, 10, 62, 3, 63, 6, 63, 592, 10, 63, 13, 63, 14, 63, 593, 3, 63, 3, 63, 3, 64, 3, 64, 5, 64, 600, 10, 64, 3, 64, 5, 64, 603, 10, 64, 3, 64, 3, 64, 2, 2, 65, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 43, 127, 44, 3, 2, 19, 3, 2, 41, 41, 4, 2, 36, 36, 94, 94, 5, 2, 36, 36, 41, 41, 94, 94, 5, 2, 78, 78, 87, 87, 119, 119, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, 4, 2, 90, 90, 122, 122, 3, 2, 51, 59, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 82, 82, 114, 114, 12, 2, 36, 36, 41, 41, 65, 65, 94, 94, 99, 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 4, 2, 11, 11, 34, 34, 2, 642, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 3, 129, 3, 2, 2, 2, 5, 131, 3, 2, 2, 2, 7, 133, 3, 2, 2, 2, 9, 135, 3, 2, 2, 2, 11, 137, 3, 2, 2, 2, 13, 139, 3, 2, 2, 2, 15, 141, 3, 2, 2, 2, 17, 144, 3, 2, 2, 2, 19, 146, 3, 2, 2, 2, 21, 149, 3, 2, 2, 2, 23, 152, 3, 2, 2, 2, 25, 163, 3, 2, 2, 2, 27, 177, 3, 2, 2, 2, 29, 179, 3, 2, 2, 2, 31, 181, 3, 2, 2, 2, 33, 183, 3, 2, 2, 2, 35, 185, 3, 2, 2, 2, 37, 187, 3, 2, 2, 2, 39, 189, 3, 2, 2, 2, 41, 192, 3, 2, 2, 2, 43, 195, 3, 2, 2, 2, 45, 198, 3, 2, 2, 2, 47, 200, 3, 2, 2, 2, 49, 202, 3, 2, 2, 2, 51, 209, 3, 2, 2, 2, 53, 215, 3, 2, 2, 2, 55, 217, 3, 2, 2, 2, 57, 223, 3, 2, 2, 2, 59, 225, 3, 2, 2, 2, 61, 228, 3, 2, 2, 2, 63, 235, 3, 2, 2, 2, 65, 271, 3, 2, 2, 2, 67, 307, 3, 2, 2, 2, 69, 343, 3, 2, 2, 2, 71, 372, 3, 2, 2, 2, 73, 378, 3, 2, 2, 2, 75, 382, 3, 2, 2, 2, 77, 397, 3, 2, 2, 2, 79, 440, 3, 2, 2, 2, 81, 442, 3, 2, 2, 2, 83, 457, 3, 2, 2, 2, 85, 459, 3, 2, 2, 2, 87, 461, 3, 2, 2, 2, 89, 463, 3, 2, 2, 2, 91, 478, 3, 2, 2, 2, 93, 480, 3, 2, 2, 2, 95, 487, 3, 2, 2, 2, 97, 491, 3, 2, 2, 2, 99, 493, 3, 2, 2, 2, 101, 495, 3, 2, 2, 2, 103, 497, 3, 2, 2, 2, 105, 512, 3, 2, 2, 2, 107, 521, 3, 2, 2, 2, 109, 523, 3, 2, 2, 2, 111, 539, 3, 2, 2, 2, 113, 541, 3, 2, 2, 2, 115, 548, 3, 2, 2, 2, 117, 560, 3, 2, 2, 2, 119, 563, 3, 2, 2, 2, 121, 567, 3, 2, 2, 2, 123, 588, 3, 2, 2, 2, 125, 591, 3, 2, 2, 2, 127, 602, 3, 2, 2, 2, 129, 130, 7, 42, 2, 2, 130, 4, 3, 2, 2, 2, 131, 132, 7, 43, 2, 2, 132, 6, 3, 2, 2, 2, 133, 134, 7, 93, 2, 2, 134, 8, 3, 2, 2, 2, 135, 136, 7, 46, 2, 2, 136, 10, 3, 2, 2, 2, 137, 138, 7, 95, 2, 2, 138, 12, 3, 2, 2, 2, 139, 140, 7, 62, 2, 2, 140, 14, 3, 2, 2, 2, 141, 142, 7, 62, 2, 2, 142, 143, 7, 63, 2, 2, 143, 16, 3, 2, 2, 2, 144, 145, 7, 64, 2, 2, 145, 18, 3, 2, 2, 2, 146, 147, 7, 64, 2, 2, 147, 148, 7, 63, 2, 2, 148, 20, 3, 2, 2, 2, 149, 150, 7, 63, 2, 2, 150, 151, 7, 63, 2, 2, 151, 22, 3, 2, 2, 2, 152, 153, 7, 35, 2, 2, 153, 154, 7, 63, 2, 2, 154, 24, 3, 2, 2, 2, 155, 156, 7, 110, 2, 2, 156, 157, 7, 107, 2, 2, 157, 158, 7, 109, 2, 2, 158, 164, 7, 103, 2, 2, 159, 160, 7, 78, 2, 2, 160, 161, 7, 75, 2, 2, 161, 162, 7, 77, 2, 2, 162, 164, 7, 71, 2, 2, 163, 155, 3, 2, 2, 2, 163, 159, 3, 2, 2, 2, 164, 26, 3, 2, 2, 2, 165, 166, 7, 103, 2, 2, 166, 167, 7, 122, 2, 2, 167, 168, 7, 107, 2, 2, 168, 169, 7, 117, 2, 2, 169, 170, 7, 118, 2, 2, 170, 178, 7, 117, 2, 2, 171, 172, 7, 71, 2, 2, 172, 173, 7, 90, 2, 2, 173, 174, 7, 75, 2, 2, 174, 175, 7, 85, 2, 2, 175, 176, 7, 86, 2, 2, 176, 178, 7, 85, 2, 2, 177, 165, 3, 2, 2, 2, 177, 171, 3, 2, 2, 2, 178, 28, 3, 2, 2, 2, 179, 180, 7, 45, 2, 2, 180, 30, 3, 2, 2, 2, 181, 182, 7, 47, 2, 2, 182, 32, 3, 2, 2, 2, 183, 184, 7, 44, 2, 2, 184, 34, 3, 2, 2, 2, 185, 186, 7, 49, 2, 2, 186, 36, 3, 2, 2, 2, 187, 188, 7, 39, 2, 2, 188, 38, 3, 2, 2, 2, 189, 190, 7, 44, 2, 2, 190, 191, 7, 44, 2, 2, 191, 40, 3, 2, 2, 2, 192, 193, 7, 62, 2, 2, 193, 194, 7, 62, 2, 2, 194, 42, 3, 2, 2, 2, 195, 196, 7, 64, 2, 2, 196, 197, 7, 64, 2, 2, 197, 44, 3, 2, 2, 2, 198, 199, 7, 40, 2, 2, 199, 46, 3, 2, 2, 2, 200, 201, 7, 126, 2, 2, 201, 48, 3, 2, 2, 2, 202, 203, 7, 96, 2, 2, 203, 50, 3, 2, 2, 2, 204, 205, 7, 40, 2, 2, 205, 210, 7, 40, 2, 2, 206, 207, 7, 99, 2, 2, 207, 208, 7, 112, 2, 2, 208, 210, 7, 102, 2, 2, 209, 204, 3, 2, 2, 2, 209, 206, 3, 2, 2, 2, 210, 52, 3, 2, 2, 2, 211, 212, 7, 126, 2, 2, 212, 216, 7, 126, 2, 2, 213, 214, 7, 113, 2, 2, 214, 216, 7, 116, 2, 2, 215, 211, 3, 2, 2, 2, 215, 213, 3, 2, 2, 2, 216, 54, 3, 2, 2, 2, 217, 218, 7, 128, 2, 2, 218, 56, 3, 2, 2, 2, 219, 224, 7, 35, 2, 2, 220, 221, 7, 112, 2, 2, 221, 222, 7, 113, 2, 2, 222, 224, 7, 118, 2, 2, 223, 219, 3, 2, 2, 2, 223, 220, 3, 2, 2, 2, 224, 58, 3, 2, 2, 2, 225, 226, 7, 107, 2, 2, 226, 227, 7, 112, 2, 2, 227, 60, 3, 2, 2, 2, 228, 229, 7, 112, 2, 2, 229, 230, 7, 113, 2, 2, 230, 231, 7, 118, 2, 2, 231, 232, 7, 34, 2, 2, 232, 233, 7, 107, 2, 2, 233, 234, 7, 112, 2, 2, 234, 62, 3, 2, 2, 2, 235, 240, 7, 93, 2, 2, 236, 239, 5, 125, 63, 2, 237, 239, 5, 127, 64, 2, 238, 236, 3, 2, 2, 2, 238, 237, 3, 2, 2, 2, 239, 242, 3, 2, 2, 2, 240, 238, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 243, 3, 2, 2, 2, 242, 240, 3, 2, 2, 2, 243, 244, 7, 95, 2, 2, 244, 64, 3, 2, 2, 2, 245, 246, 7, 108, 2, 2, 246, 247, 7, 117, 2, 2, 247, 248, 7, 113, 2, 2, 248, 249, 7, 112, 2, 2, 249, 250, 7, 97, 2, 2, 250, 251, 7, 101, 2, 2, 251, 252, 7, 113, 2, 2, 252, 253, 7, 112, 2, 2, 253, 254, 7, 118, 2, 2, 254, 255, 7, 99, 2, 2, 255, 256, 7, 107, 2, 2, 256, 257, 7, 112, 2, 2, 257, 272, 7, 117, 2, 2, 258, 259, 7, 76, 2, 2, 259, 260, 7, 85, 2, 2, 260, 261, 7, 81, 2, 2, 261, 262, 7, 80, 2, 2, 262, 263, 7, 97, 2, 2, 263, 264, 7, 69, 2, 2, 264, 265, 7, 81, 2, 2, 265, 266, 7, 80, 2, 2, 266, 267, 7, 86, 2, 2, 267, 268, 7, 67, 2, 2, 268, 269, 7, 75, 2, 2, 269, 270, 7, 80, 2, 2, 270, 272, 7, 85, 2, 2, 271, 245, 3, 2, 2, 2, 271, 258, 3, 2, 2, 2, 272, 66, 3, 2, 2, 2, 273, 274, 7, 108, 2, 2, 274, 275, 7, 117, 2, 2, 275, 276, 7, 113, 2, 2, 276, 277, 7, 112, 2, 2, 277, 278, 7, 97, 2, 2, 278, 279, 7, 101, 2, 2, 279, 280, 7, 113, 2, 2, 280, 281, 7, 112, 2, 2, 281, 282, 7, 118, 2, 2, 282, 283, 7, 99, 2, 2, 283, 284, 7, 107, 2, 2, 284, 285, 7, 112, 2, 2, 285, 286, 7, 117, 2, 2, 286, 287, 7, 97, 2, 2, 287, 288, 7, 99, 2, 2, 288, 289, 7, 110, 2, 2, 289, 308, 7, 110, 2, 2, 290, 291, 7, 76, 2, 2, 291, 292, 7, 85, 2, 2, 292, 293, 7, 81, 2, 2, 293, 294, 7, 80, 2, 2, 294, 295, 7, 97, 2, 2, 295, 296, 7, 69, 2, 2, 296, 297, 7, 81, 2, 2, 297, 298, 7, 80, 2, 2, 298, 299, 7, 86, 2, 2, 299, 300, 7, 67, 2, 2, 300, 301, 7, 75, 2, 2, 301, 302, 7, 80, 2, 2, 302, 303, 7, 85, 2, 2, 303, 304, 7, 97, 2, 2, 304, 305, 7, 67, 2, 2, 305, 306, 7, 78, 2, 2, 306, 308, 7, 78, 2, 2, 307, 273, 3, 2, 2, 2, 307, 290, 3, 2, 2, 2, 308, 68, 3, 2, 2, 2, 309, 310, 7, 108, 2, 2, 310, 311, 7, 117, 2, 2, 311, 312, 7, 113, 2, 2, 312, 313, 7, 112, 2, 2, 313, 314, 7, 97, 2, 2, 314, 315, 7, 101, 2, 2, 315, 316, 7, 113, 2, 2, 316, 317, 7, 112, 2, 2, 317, 318, 7, 118, 2, 2, 318, 319, 7, 99, 2, 2, 319, 320, 7, 107, 2, 2, 320, 321, 7, 112, 2, 2, 321, 322, 7, 117, 2, 2, 322, 323, 7, 97, 2, 2, 323, 324, 7, 99, 2, 2, 324, 325, 7, 112, 2, 2, 325, 344, 7, 123, 2, 2, 326, 327, 7, 76, 2, 2, 327, 328, 7, 85, 2, 2, 328, 329, 7, 81, 2, 2, 329, 330, 7, 80, 2, 2, 330, 331, 7, 97, 2, 2, 331, 332, 7, 69, 2, 2, 332, 333, 7, 81, 2, 2, 333, 334, 7, 80, 2, 2, 334, 335, 7, 86, 2, 2, 335, 336, 7, 67, 2, 2, 336, 337, 7, 75, 2, 2, 337, 338, 7, 80, 2, 2, 338, 339, 7, 85, 2, 2, 339, 340, 7, 97, 2, 2, 340, 341, 7, 67, 2, 2, 341, 342, 7, 80, 2, 2, 342, 344, 7, 91, 2, 2, 343, 309, 3, 2, 2, 2, 343, 326, 3, 2, 2, 2, 344, 70, 3, 2, 2, 2, 345, 346, 7, 118, 2, 2, 346, 347, 7, 116, 2, 2, 347, 348, 7, 119, 2, 2, 348, 373, 7, 103, 2, 2, 349, 350, 7, 86, 2, 2, 350, 351, 7, 116, 2, 2, 351, 352, 7, 119, 2, 2, 352, 373, 7, 103, 2, 2, 353, 354, 7, 86, 2, 2, 354, 355, 7, 84, 2, 2, 355, 356, 7, 87, 2, 2, 356, 373, 7, 71, 2, 2, 357, 358, 7, 104, 2, 2, 358, 359, 7, 99, 2, 2, 359, 360, 7, 110, 2, 2, 360, 361, 7, 117, 2, 2, 361, 373, 7, 103, 2, 2, 362, 363, 7, 72, 2, 2, 363, 364, 7, 99, 2, 2, 364, 365, 7, 110, 2, 2, 365, 366, 7, 117, 2, 2, 366, 373, 7, 103, 2, 2, 367, 368, 7, 72, 2, 2, 368, 369, 7, 67, 2, 2, 369, 370, 7, 78, 2, 2, 370, 371, 7, 85, 2, 2, 371, 373, 7, 71, 2, 2, 372, 345, 3, 2, 2, 2, 372, 349, 3, 2, 2, 2, 372, 353, 3, 2, 2, 2, 372, 357, 3, 2, 2, 2, 372, 362, 3, 2, 2, 2, 372, 367, 3, 2, 2, 2, 373, 72, 3, 2, 2, 2, 374, 379, 5, 91, 46, 2, 375, 379, 5, 93, 47, 2, 376, 379, 5, 95, 48, 2, 377, 379, 5, 89, 45, 2, 378, 374, 3, 2, 2, 2, 378, 375, 3, 2, 2, 2, 378, 376, 3, 2, 2, 2, 378, 377, 3, 2, 2, 2, 379, 74, 3, 2, 2, 2, 380, 383, 5, 107, 54, 2, 381, 383, 5, 109, 55, 2, 382, 380, 3, 2, 2, 2, 382, 381, 3, 2, 2, 2, 383, 76, 3, 2, 2, 2, 384, 389, 5, 85, 43, 2, 385, 388, 5, 85, 43, 2, 386, 388, 5, 87, 44, 2, 387, 385, 3, 2, 2, 2, 387, 386, 3, 2, 2, 2, 388, 391, 3, 2, 2, 2, 389, 387, 3, 2, 2, 2, 389, 390, 3, 2, 2, 2, 390, 398, 3, 2, 2, 2, 391, 389, 3, 2, 2, 2, 392, 393, 7, 38, 2, 2, 393, 394, 7, 111, 2, 2, 394, 395, 7, 103, 2, 2, 395, 396, 7, 118, 2, 2, 396, 398, 7, 99, 2, 2, 397, 384, 3, 2, 2, 2, 397, 392, 3, 2, 2, 2, 398, 78, 3, 2, 2, 2, 399, 401, 5, 83, 42, 2, 400, 399, 3, 2, 2, 2, 400, 401, 3, 2, 2, 2, 401, 402, 3, 2, 2, 2, 402, 403, 7, 36, 2, 2, 403, 415, 8, 40, 2, 2, 404, 409, 7, 94, 2, 2, 405, 406, 7, 41, 2, 2, 406, 410, 8, 40, 3, 2, 407, 408, 10, 2, 2, 2, 408, 410, 8, 40, 4, 2, 409, 405, 3, 2, 2, 2, 409, 407, 3, 2, 2, 2, 410, 414, 3, 2, 2, 2, 411, 412, 10, 3, 2, 2, 412, 414, 8, 40, 5, 2, 413, 404, 3, 2, 2, 2, 413, 411, 3, 2, 2, 2, 414, 417, 3, 2, 2, 2, 415, 413, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 418, 3, 2, 2, 2, 417, 415, 3, 2, 2, 2, 418, 419, 7, 36, 2, 2, 419, 441, 8, 40, 6, 2, 420, 421, 7, 41, 2, 2, 421, 435, 8, 40, 7, 2, 422, 427, 7, 94, 2, 2, 423, 424, 7, 41, 2, 2, 424, 428, 8, 40, 8, 2, 425, 426, 10, 2, 2, 2, 426, 428, 8, 40, 9, 2, 427, 423, 3, 2, 2, 2, 427, 425, 3, 2, 2, 2, 428, 434, 3, 2, 2, 2, 429, 430, 7, 36, 2, 2, 430, 434, 8, 40, 10, 2, 431, 432, 10, 4, 2, 2, 432, 434, 8, 40, 11, 2, 433, 422, 3, 2, 2, 2, 433, 429, 3, 2, 2, 2, 433, 431, 3, 2, 2, 2, 434, 437, 3, 2, 2, 2, 435, 433, 3, 2, 2, 2, 435, 436, 3, 2, 2, 2, 436, 438, 3, 2, 2, 2, 437, 435, 3, 2, 2, 2, 438, 439, 7, 41, 2, 2, 439, 441, 8, 40, 12, 2, 440, 400, 3, 2, 2, 2, 440, 420, 3, 2, 2, 2, 441, 80, 3, 2, 2, 2, 442, 450, 5, 77, 39, 2, 443, 446, 7, 93, 2, 2, 444, 447, 5, 79, 40, 2, 445, 447, 5, 91, 46, 2, 446, 444, 3, 2, 2, 2, 446, 445, 3, 2, 2, 2, 447, 448, 3, 2, 2, 2, 448, 449, 7, 95, 2, 2, 449, 451, 3, 2, 2, 2, 450, 443, 3, 2, 2, 2, 451, 452, 3, 2, 2, 2, 452, 450, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 82, 3, 2, 2, 2, 454, 455, 7, 119, 2, 2, 455, 458, 7, 58, 2, 2, 456, 458, 9, 5, 2, 2, 457, 454, 3, 2, 2, 2, 457, 456, 3, 2, 2, 2, 458, 84, 3, 2, 2, 2, 459, 460, 9, 6, 2, 2, 460, 86, 3, 2, 2, 2, 461, 462, 9, 7, 2, 2, 462, 88, 3, 2, 2, 2, 463, 464, 7, 50, 2, 2, 464, 466, 9, 8, 2, 2, 465, 467, 9, 9, 2, 2, 466, 465, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 466, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 90, 3, 2, 2, 2, 470, 474, 5, 97, 49, 2, 471, 473, 5, 87, 44, 2, 472, 471, 3, 2, 2, 2, 473, 476, 3, 2, 2, 2, 474, 472, 3, 2, 2, 2, 474, 475, 3, 2, 2, 2, 475, 479, 3, 2, 2, 2, 476, 474, 3, 2, 2, 2, 477, 479, 7, 50, 2, 2, 478, 470, 3, 2, 2, 2, 478, 477, 3, 2, 2, 2, 479, 92, 3, 2, 2, 2, 480, 484, 7, 50, 2, 2, 481, 483, 5, 99, 50, 2, 482, 481, 3, 2, 2, 2, 483, 486, 3, 2, 2, 2, 484, 482, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 94, 3, 2, 2, 2, 486, 484, 3, 2, 2, 2, 487, 488, 7, 50, 2, 2, 488, 489, 9, 10, 2, 2, 489, 490, 5, 119, 60, 2, 490, 96, 3, 2, 2, 2, 491, 492, 9, 11, 2, 2, 492, 98, 3, 2, 2, 2, 493, 494, 9, 12, 2, 2, 494, 100, 3, 2, 2, 2, 495, 496, 9, 13, 2, 2, 496, 102, 3, 2, 2, 2, 497, 498, 5, 101, 51, 2, 498, 499, 5, 101, 51, 2, 499, 500, 5, 101, 51, 2, 500, 501, 5, 101, 51, 2, 501, 104, 3, 2, 2, 2, 502, 503, 7, 94, 2, 2, 503, 504, 7, 119, 2, 2, 504, 505, 3, 2, 2, 2, 505, 513, 5, 103, 52, 2, 506, 507, 7, 94, 2, 2, 507, 508, 7, 87, 2, 2, 508, 509, 3, 2, 2, 2, 509, 510, 5, 103, 52, 2, 510, 511, 5, 103, 52, 2, 511, 513, 3, 2, 2, 2, 512, 502, 3, 2, 2, 2, 512, 506, 3, 2, 2, 2, 513, 106, 3, 2, 2, 2, 514, 516, 5, 111, 56, 2, 515, 517, 5, 113, 57, 2, 516, 515, 3, 2, 2, 2, 516, 517, 3, 2, 2, 2, 517, 522, 3, 2, 2, 2, 518, 519, 5, 115, 58, 2, 519, 520, 5, 113, 57, 2, 520, 522, 3, 2, 2, 2, 521, 514, 3, 2, 2, 2, 521, 518, 3, 2, 2, 2, 522, 108, 3, 2, 2, 2, 523, 524, 7, 50, 2, 2, 524, 527, 9, 10, 2, 2, 525, 528, 5, 117, 59, 2, 526, 528, 5, 119, 60, 2, 527, 525, 3, 2, 2, 2, 527, 526, 3, 2, 2, 2, 528, 529, 3, 2, 2, 2, 529, 530, 5, 121, 61, 2, 530, 110, 3, 2, 2, 2, 531, 533, 5, 115, 58, 2, 532, 531, 3, 2, 2, 2, 532, 533, 3, 2, 2, 2, 533, 534, 3, 2, 2, 2, 534, 535, 7, 48, 2, 2, 535, 540, 5, 115, 58, 2, 536, 537, 5, 115, 58, 2, 537, 538, 7, 48, 2, 2, 538, 540, 3, 2, 2, 2, 539, 532, 3, 2, 2, 2, 539, 536, 3, 2, 2, 2, 540, 112, 3, 2, 2, 2, 541, 543, 9, 14, 2, 2, 542, 544, 9, 15, 2, 2, 543, 542, 3, 2, 2, 2, 543, 544, 3, 2, 2, 2, 544, 545, 3, 2, 2, 2, 545, 546, 5, 115, 58, 2, 546, 114, 3, 2, 2, 2, 547, 549, 5, 87, 44, 2, 548, 547, 3, 2, 2, 2, 549, 550, 3, 2, 2, 2, 550, 548, 3, 2, 2, 2, 550, 551, 3, 2, 2, 2, 551, 116, 3, 2, 2, 2, 552, 554, 5, 119, 60, 2, 553, 552, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 556, 7, 48, 2, 2, 556, 561, 5, 119, 60, 2, 557, 558, 5, 119, 60, 2, 558, 559, 7, 48, 2, 2, 559, 561, 3, 2, 2, 2, 560, 553, 3, 2, 2, 2, 560, 557, 3, 2, 2, 2, 561, 118, 3, 2, 2, 2, 562, 564, 5, 101, 51, 2, 563, 562, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 563, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566, 120, 3, 2, 2, 2, 567, 569, 9, 16, 2, 2, 568, 570, 9, 15, 2, 2, 569, 568, 3, 2, 2, 2, 569, 570, 3, 2, 2, 2, 570, 571, 3, 2, 2, 2, 571, 572, 5, 115, 58, 2, 572, 122, 3, 2, 2, 2, 573, 574, 7, 94, 2, 2, 574, 589, 9, 17, 2, 2, 575, 576, 7, 94, 2, 2, 576, 578, 5, 99, 50, 2, 577, 579, 5, 99, 50, 2, 578, 577, 3, 2, 2, 2, 578, 579, 3, 2, 2, 2, 579, 581, 3, 2, 2, 2, 580, 582, 5, 99, 50, 2, 581, 580, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 589, 3, 2, 2, 2, 583, 584, 7, 94, 2, 2, 584, 585, 7, 122, 2, 2, 585, 586, 3, 2, 2, 2, 586, 589, 5, 119, 60, 2, 587, 589, 5, 105, 53, 2, 588, 573, 3, 2, 2, 2, 588, 575, 3, 2, 2, 2, 588, 583, 3, 2, 2, 2, 588, 587, 3, 2, 2, 2, 589, 124, 3, 2, 2, 2, 590, 592, 9, 18, 2, 2, 591, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 591, 3, 2, 2, 2, 593, 594, 3, 2, 2, 2, 594, 595, 3, 2, 2, 2, 595, 596, 8, 63, 13, 2, 596, 126, 3, 2, 2, 2, 597, 599, 7, 15, 2, 2, 598, 600, 7, 12, 2, 2, 599, 598, 3, 2, 2, 2, 599, 600, 3, 2, 2, 2, 600, 603, 3, 2, 2, 2, 601, 603, 7, 12, 2, 2, 602, 597, 3, 2, 2, 2, 602, 601, 3, 2, 2, 2, 603, 604, 3, 2, 2, 2, 604, 605, 8, 64, 13, 2, 605, 128, 3, 2, 2, 2, 52, 2, 163, 177, 209, 215, 223, 238, 240, 271, 307, 343, 372, 378, 382, 387, 389, 397, 400, 409, 413, 415, 427, 433, 435, 440, 446, 452, 457, 468, 474, 478, 484, 512, 516, 521, 527, 532, 539, 543, 550, 553, 560, 565, 569, 578, 581, 588, 593, 599, 602, 14, 3, 40, 2, 3, 40, 3, 3, 40, 4, 3, 40, 5, 3, 40, 6, 3, 40, 7, 3, 40, 8, 3, 40, 9, 3, 40, 10, 3, 40, 11, 3, 40, 12, 8, 2, 2] \ No newline at end of file diff --git a/internal/parser/planparserv2/generated/PlanLexer.tokens b/internal/parser/planparserv2/generated/PlanLexer.tokens index 8247aea98..ca7b53db2 100644 --- a/internal/parser/planparserv2/generated/PlanLexer.tokens +++ b/internal/parser/planparserv2/generated/PlanLexer.tokens @@ -30,14 +30,16 @@ IN=29 NIN=30 EmptyTerm=31 JSONContains=32 -BooleanConstant=33 -IntegerConstant=34 -FloatingConstant=35 -Identifier=36 -StringLiteral=37 -JSONIdentifier=38 -Whitespace=39 -Newline=40 +JSONContainsAll=33 +JSONContainsAny=34 +BooleanConstant=35 +IntegerConstant=36 +FloatingConstant=37 +Identifier=38 +StringLiteral=39 +JSONIdentifier=40 +Whitespace=41 +Newline=42 '('=1 ')'=2 '['=3 diff --git a/internal/parser/planparserv2/generated/plan_base_visitor.go b/internal/parser/planparserv2/generated/plan_base_visitor.go index 5a476d4db..6eb76d4f4 100644 --- a/internal/parser/planparserv2/generated/plan_base_visitor.go +++ b/internal/parser/planparserv2/generated/plan_base_visitor.go @@ -23,6 +23,10 @@ func (v *BasePlanVisitor) VisitFloating(ctx *FloatingContext) interface{} { return v.VisitChildren(ctx) } +func (v *BasePlanVisitor) VisitJSONContainsAll(ctx *JSONContainsAllContext) interface{} { + return v.VisitChildren(ctx) +} + func (v *BasePlanVisitor) VisitLogicalOr(ctx *LogicalOrContext) interface{} { return v.VisitChildren(ctx) } @@ -91,6 +95,14 @@ func (v *BasePlanVisitor) VisitInteger(ctx *IntegerContext) interface{} { return v.VisitChildren(ctx) } +func (v *BasePlanVisitor) VisitArray(ctx *ArrayContext) interface{} { + return v.VisitChildren(ctx) +} + +func (v *BasePlanVisitor) VisitJSONContainsAny(ctx *JSONContainsAnyContext) interface{} { + return v.VisitChildren(ctx) +} + func (v *BasePlanVisitor) VisitBitXor(ctx *BitXorContext) interface{} { return v.VisitChildren(ctx) } diff --git a/internal/parser/planparserv2/generated/plan_lexer.go b/internal/parser/planparserv2/generated/plan_lexer.go index fa13ec52b..aeb9bfee5 100644 --- a/internal/parser/planparserv2/generated/plan_lexer.go +++ b/internal/parser/planparserv2/generated/plan_lexer.go @@ -14,7 +14,7 @@ var _ = fmt.Printf var _ = unicode.IsLetter var serializedLexerAtn = []uint16{ - 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 42, 530, + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 44, 606, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, @@ -26,241 +26,274 @@ var serializedLexerAtn = []uint16{ 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, - 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, - 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, - 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, - 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 160, 10, 13, 3, 14, 3, - 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, - 5, 14, 174, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, - 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, - 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, - 26, 3, 26, 5, 26, 206, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 212, - 10, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 220, 10, 29, 3, - 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, - 3, 32, 3, 32, 7, 32, 235, 10, 32, 12, 32, 14, 32, 238, 11, 32, 3, 32, 3, - 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, + 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 3, 2, + 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, + 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, + 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, + 13, 164, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, + 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 178, 10, 14, 3, 15, 3, 15, 3, 16, 3, + 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, + 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, + 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 210, 10, 26, 3, 27, 3, 27, + 3, 27, 3, 27, 5, 27, 216, 10, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, + 29, 5, 29, 224, 10, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, + 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 7, 32, 239, 10, 32, 12, 32, 14, + 32, 242, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, - 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, 268, 10, 33, 3, 34, 3, 34, - 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, + 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 5, 33, + 272, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, - 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 297, 10, 34, 3, 35, 3, 35, 3, 35, 3, - 35, 5, 35, 303, 10, 35, 3, 36, 3, 36, 5, 36, 307, 10, 36, 3, 37, 3, 37, - 3, 37, 7, 37, 312, 10, 37, 12, 37, 14, 37, 315, 11, 37, 3, 37, 3, 37, 3, - 37, 3, 37, 3, 37, 5, 37, 322, 10, 37, 3, 38, 5, 38, 325, 10, 38, 3, 38, - 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 334, 10, 38, 3, 38, 3, - 38, 7, 38, 338, 10, 38, 12, 38, 14, 38, 341, 11, 38, 3, 38, 3, 38, 3, 38, - 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 5, 38, 352, 10, 38, 3, 38, 3, - 38, 3, 38, 3, 38, 7, 38, 358, 10, 38, 12, 38, 14, 38, 361, 11, 38, 3, 38, - 3, 38, 5, 38, 365, 10, 38, 3, 39, 3, 39, 3, 39, 3, 39, 5, 39, 371, 10, - 39, 3, 39, 3, 39, 6, 39, 375, 10, 39, 13, 39, 14, 39, 376, 3, 40, 3, 40, - 3, 40, 5, 40, 382, 10, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, - 43, 6, 43, 391, 10, 43, 13, 43, 14, 43, 392, 3, 44, 3, 44, 7, 44, 397, - 10, 44, 12, 44, 14, 44, 400, 11, 44, 3, 44, 5, 44, 403, 10, 44, 3, 45, - 3, 45, 7, 45, 407, 10, 45, 12, 45, 14, 45, 410, 11, 45, 3, 46, 3, 46, 3, - 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, - 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, - 51, 3, 51, 5, 51, 437, 10, 51, 3, 52, 3, 52, 5, 52, 441, 10, 52, 3, 52, - 3, 52, 3, 52, 5, 52, 446, 10, 52, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 452, - 10, 53, 3, 53, 3, 53, 3, 54, 5, 54, 457, 10, 54, 3, 54, 3, 54, 3, 54, 3, - 54, 3, 54, 5, 54, 464, 10, 54, 3, 55, 3, 55, 5, 55, 468, 10, 55, 3, 55, - 3, 55, 3, 56, 6, 56, 473, 10, 56, 13, 56, 14, 56, 474, 3, 57, 5, 57, 478, - 10, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 5, 57, 485, 10, 57, 3, 58, 6, - 58, 488, 10, 58, 13, 58, 14, 58, 489, 3, 59, 3, 59, 5, 59, 494, 10, 59, - 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 503, 10, 60, 3, - 60, 5, 60, 506, 10, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 5, 60, 513, - 10, 60, 3, 61, 6, 61, 516, 10, 61, 13, 61, 14, 61, 517, 3, 61, 3, 61, 3, - 62, 3, 62, 5, 62, 524, 10, 62, 3, 62, 5, 62, 527, 10, 62, 3, 62, 3, 62, - 2, 2, 63, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, - 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, - 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, - 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, - 75, 39, 77, 40, 79, 2, 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, - 95, 2, 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, 113, - 2, 115, 2, 117, 2, 119, 2, 121, 41, 123, 42, 3, 2, 19, 3, 2, 41, 41, 4, - 2, 36, 36, 94, 94, 5, 2, 36, 36, 41, 41, 94, 94, 5, 2, 78, 78, 87, 87, - 119, 119, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 4, 2, 68, 68, 100, - 100, 3, 2, 50, 51, 4, 2, 90, 90, 122, 122, 3, 2, 51, 59, 3, 2, 50, 57, - 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, - 47, 4, 2, 82, 82, 114, 114, 12, 2, 36, 36, 41, 41, 65, 65, 94, 94, 99, - 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 4, 2, 11, 11, 34, - 34, 2, 564, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, - 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, - 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, - 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, - 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, - 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, - 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, - 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, - 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, - 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, - 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 3, 125, 3, 2, 2, 2, 5, 127, - 3, 2, 2, 2, 7, 129, 3, 2, 2, 2, 9, 131, 3, 2, 2, 2, 11, 133, 3, 2, 2, 2, - 13, 135, 3, 2, 2, 2, 15, 137, 3, 2, 2, 2, 17, 140, 3, 2, 2, 2, 19, 142, - 3, 2, 2, 2, 21, 145, 3, 2, 2, 2, 23, 148, 3, 2, 2, 2, 25, 159, 3, 2, 2, - 2, 27, 173, 3, 2, 2, 2, 29, 175, 3, 2, 2, 2, 31, 177, 3, 2, 2, 2, 33, 179, - 3, 2, 2, 2, 35, 181, 3, 2, 2, 2, 37, 183, 3, 2, 2, 2, 39, 185, 3, 2, 2, - 2, 41, 188, 3, 2, 2, 2, 43, 191, 3, 2, 2, 2, 45, 194, 3, 2, 2, 2, 47, 196, - 3, 2, 2, 2, 49, 198, 3, 2, 2, 2, 51, 205, 3, 2, 2, 2, 53, 211, 3, 2, 2, - 2, 55, 213, 3, 2, 2, 2, 57, 219, 3, 2, 2, 2, 59, 221, 3, 2, 2, 2, 61, 224, - 3, 2, 2, 2, 63, 231, 3, 2, 2, 2, 65, 267, 3, 2, 2, 2, 67, 296, 3, 2, 2, - 2, 69, 302, 3, 2, 2, 2, 71, 306, 3, 2, 2, 2, 73, 321, 3, 2, 2, 2, 75, 364, - 3, 2, 2, 2, 77, 366, 3, 2, 2, 2, 79, 381, 3, 2, 2, 2, 81, 383, 3, 2, 2, - 2, 83, 385, 3, 2, 2, 2, 85, 387, 3, 2, 2, 2, 87, 402, 3, 2, 2, 2, 89, 404, - 3, 2, 2, 2, 91, 411, 3, 2, 2, 2, 93, 415, 3, 2, 2, 2, 95, 417, 3, 2, 2, - 2, 97, 419, 3, 2, 2, 2, 99, 421, 3, 2, 2, 2, 101, 436, 3, 2, 2, 2, 103, - 445, 3, 2, 2, 2, 105, 447, 3, 2, 2, 2, 107, 463, 3, 2, 2, 2, 109, 465, - 3, 2, 2, 2, 111, 472, 3, 2, 2, 2, 113, 484, 3, 2, 2, 2, 115, 487, 3, 2, - 2, 2, 117, 491, 3, 2, 2, 2, 119, 512, 3, 2, 2, 2, 121, 515, 3, 2, 2, 2, - 123, 526, 3, 2, 2, 2, 125, 126, 7, 42, 2, 2, 126, 4, 3, 2, 2, 2, 127, 128, - 7, 43, 2, 2, 128, 6, 3, 2, 2, 2, 129, 130, 7, 93, 2, 2, 130, 8, 3, 2, 2, - 2, 131, 132, 7, 46, 2, 2, 132, 10, 3, 2, 2, 2, 133, 134, 7, 95, 2, 2, 134, - 12, 3, 2, 2, 2, 135, 136, 7, 62, 2, 2, 136, 14, 3, 2, 2, 2, 137, 138, 7, - 62, 2, 2, 138, 139, 7, 63, 2, 2, 139, 16, 3, 2, 2, 2, 140, 141, 7, 64, - 2, 2, 141, 18, 3, 2, 2, 2, 142, 143, 7, 64, 2, 2, 143, 144, 7, 63, 2, 2, - 144, 20, 3, 2, 2, 2, 145, 146, 7, 63, 2, 2, 146, 147, 7, 63, 2, 2, 147, - 22, 3, 2, 2, 2, 148, 149, 7, 35, 2, 2, 149, 150, 7, 63, 2, 2, 150, 24, - 3, 2, 2, 2, 151, 152, 7, 110, 2, 2, 152, 153, 7, 107, 2, 2, 153, 154, 7, - 109, 2, 2, 154, 160, 7, 103, 2, 2, 155, 156, 7, 78, 2, 2, 156, 157, 7, - 75, 2, 2, 157, 158, 7, 77, 2, 2, 158, 160, 7, 71, 2, 2, 159, 151, 3, 2, - 2, 2, 159, 155, 3, 2, 2, 2, 160, 26, 3, 2, 2, 2, 161, 162, 7, 103, 2, 2, - 162, 163, 7, 122, 2, 2, 163, 164, 7, 107, 2, 2, 164, 165, 7, 117, 2, 2, - 165, 166, 7, 118, 2, 2, 166, 174, 7, 117, 2, 2, 167, 168, 7, 71, 2, 2, - 168, 169, 7, 90, 2, 2, 169, 170, 7, 75, 2, 2, 170, 171, 7, 85, 2, 2, 171, - 172, 7, 86, 2, 2, 172, 174, 7, 85, 2, 2, 173, 161, 3, 2, 2, 2, 173, 167, - 3, 2, 2, 2, 174, 28, 3, 2, 2, 2, 175, 176, 7, 45, 2, 2, 176, 30, 3, 2, - 2, 2, 177, 178, 7, 47, 2, 2, 178, 32, 3, 2, 2, 2, 179, 180, 7, 44, 2, 2, - 180, 34, 3, 2, 2, 2, 181, 182, 7, 49, 2, 2, 182, 36, 3, 2, 2, 2, 183, 184, - 7, 39, 2, 2, 184, 38, 3, 2, 2, 2, 185, 186, 7, 44, 2, 2, 186, 187, 7, 44, - 2, 2, 187, 40, 3, 2, 2, 2, 188, 189, 7, 62, 2, 2, 189, 190, 7, 62, 2, 2, - 190, 42, 3, 2, 2, 2, 191, 192, 7, 64, 2, 2, 192, 193, 7, 64, 2, 2, 193, - 44, 3, 2, 2, 2, 194, 195, 7, 40, 2, 2, 195, 46, 3, 2, 2, 2, 196, 197, 7, - 126, 2, 2, 197, 48, 3, 2, 2, 2, 198, 199, 7, 96, 2, 2, 199, 50, 3, 2, 2, - 2, 200, 201, 7, 40, 2, 2, 201, 206, 7, 40, 2, 2, 202, 203, 7, 99, 2, 2, - 203, 204, 7, 112, 2, 2, 204, 206, 7, 102, 2, 2, 205, 200, 3, 2, 2, 2, 205, - 202, 3, 2, 2, 2, 206, 52, 3, 2, 2, 2, 207, 208, 7, 126, 2, 2, 208, 212, - 7, 126, 2, 2, 209, 210, 7, 113, 2, 2, 210, 212, 7, 116, 2, 2, 211, 207, - 3, 2, 2, 2, 211, 209, 3, 2, 2, 2, 212, 54, 3, 2, 2, 2, 213, 214, 7, 128, - 2, 2, 214, 56, 3, 2, 2, 2, 215, 220, 7, 35, 2, 2, 216, 217, 7, 112, 2, - 2, 217, 218, 7, 113, 2, 2, 218, 220, 7, 118, 2, 2, 219, 215, 3, 2, 2, 2, - 219, 216, 3, 2, 2, 2, 220, 58, 3, 2, 2, 2, 221, 222, 7, 107, 2, 2, 222, - 223, 7, 112, 2, 2, 223, 60, 3, 2, 2, 2, 224, 225, 7, 112, 2, 2, 225, 226, - 7, 113, 2, 2, 226, 227, 7, 118, 2, 2, 227, 228, 7, 34, 2, 2, 228, 229, - 7, 107, 2, 2, 229, 230, 7, 112, 2, 2, 230, 62, 3, 2, 2, 2, 231, 236, 7, - 93, 2, 2, 232, 235, 5, 121, 61, 2, 233, 235, 5, 123, 62, 2, 234, 232, 3, - 2, 2, 2, 234, 233, 3, 2, 2, 2, 235, 238, 3, 2, 2, 2, 236, 234, 3, 2, 2, - 2, 236, 237, 3, 2, 2, 2, 237, 239, 3, 2, 2, 2, 238, 236, 3, 2, 2, 2, 239, - 240, 7, 95, 2, 2, 240, 64, 3, 2, 2, 2, 241, 242, 7, 108, 2, 2, 242, 243, - 7, 117, 2, 2, 243, 244, 7, 113, 2, 2, 244, 245, 7, 112, 2, 2, 245, 246, - 7, 97, 2, 2, 246, 247, 7, 101, 2, 2, 247, 248, 7, 113, 2, 2, 248, 249, - 7, 112, 2, 2, 249, 250, 7, 118, 2, 2, 250, 251, 7, 99, 2, 2, 251, 252, - 7, 107, 2, 2, 252, 253, 7, 112, 2, 2, 253, 268, 7, 117, 2, 2, 254, 255, - 7, 76, 2, 2, 255, 256, 7, 85, 2, 2, 256, 257, 7, 81, 2, 2, 257, 258, 7, - 80, 2, 2, 258, 259, 7, 97, 2, 2, 259, 260, 7, 69, 2, 2, 260, 261, 7, 81, - 2, 2, 261, 262, 7, 80, 2, 2, 262, 263, 7, 86, 2, 2, 263, 264, 7, 67, 2, - 2, 264, 265, 7, 75, 2, 2, 265, 266, 7, 80, 2, 2, 266, 268, 7, 85, 2, 2, - 267, 241, 3, 2, 2, 2, 267, 254, 3, 2, 2, 2, 268, 66, 3, 2, 2, 2, 269, 270, - 7, 118, 2, 2, 270, 271, 7, 116, 2, 2, 271, 272, 7, 119, 2, 2, 272, 297, - 7, 103, 2, 2, 273, 274, 7, 86, 2, 2, 274, 275, 7, 116, 2, 2, 275, 276, - 7, 119, 2, 2, 276, 297, 7, 103, 2, 2, 277, 278, 7, 86, 2, 2, 278, 279, - 7, 84, 2, 2, 279, 280, 7, 87, 2, 2, 280, 297, 7, 71, 2, 2, 281, 282, 7, - 104, 2, 2, 282, 283, 7, 99, 2, 2, 283, 284, 7, 110, 2, 2, 284, 285, 7, - 117, 2, 2, 285, 297, 7, 103, 2, 2, 286, 287, 7, 72, 2, 2, 287, 288, 7, - 99, 2, 2, 288, 289, 7, 110, 2, 2, 289, 290, 7, 117, 2, 2, 290, 297, 7, - 103, 2, 2, 291, 292, 7, 72, 2, 2, 292, 293, 7, 67, 2, 2, 293, 294, 7, 78, - 2, 2, 294, 295, 7, 85, 2, 2, 295, 297, 7, 71, 2, 2, 296, 269, 3, 2, 2, - 2, 296, 273, 3, 2, 2, 2, 296, 277, 3, 2, 2, 2, 296, 281, 3, 2, 2, 2, 296, - 286, 3, 2, 2, 2, 296, 291, 3, 2, 2, 2, 297, 68, 3, 2, 2, 2, 298, 303, 5, - 87, 44, 2, 299, 303, 5, 89, 45, 2, 300, 303, 5, 91, 46, 2, 301, 303, 5, - 85, 43, 2, 302, 298, 3, 2, 2, 2, 302, 299, 3, 2, 2, 2, 302, 300, 3, 2, - 2, 2, 302, 301, 3, 2, 2, 2, 303, 70, 3, 2, 2, 2, 304, 307, 5, 103, 52, - 2, 305, 307, 5, 105, 53, 2, 306, 304, 3, 2, 2, 2, 306, 305, 3, 2, 2, 2, - 307, 72, 3, 2, 2, 2, 308, 313, 5, 81, 41, 2, 309, 312, 5, 81, 41, 2, 310, - 312, 5, 83, 42, 2, 311, 309, 3, 2, 2, 2, 311, 310, 3, 2, 2, 2, 312, 315, - 3, 2, 2, 2, 313, 311, 3, 2, 2, 2, 313, 314, 3, 2, 2, 2, 314, 322, 3, 2, - 2, 2, 315, 313, 3, 2, 2, 2, 316, 317, 7, 38, 2, 2, 317, 318, 7, 111, 2, - 2, 318, 319, 7, 103, 2, 2, 319, 320, 7, 118, 2, 2, 320, 322, 7, 99, 2, - 2, 321, 308, 3, 2, 2, 2, 321, 316, 3, 2, 2, 2, 322, 74, 3, 2, 2, 2, 323, - 325, 5, 79, 40, 2, 324, 323, 3, 2, 2, 2, 324, 325, 3, 2, 2, 2, 325, 326, - 3, 2, 2, 2, 326, 327, 7, 36, 2, 2, 327, 339, 8, 38, 2, 2, 328, 333, 7, - 94, 2, 2, 329, 330, 7, 41, 2, 2, 330, 334, 8, 38, 3, 2, 331, 332, 10, 2, - 2, 2, 332, 334, 8, 38, 4, 2, 333, 329, 3, 2, 2, 2, 333, 331, 3, 2, 2, 2, - 334, 338, 3, 2, 2, 2, 335, 336, 10, 3, 2, 2, 336, 338, 8, 38, 5, 2, 337, - 328, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 338, 341, 3, 2, 2, 2, 339, 337, - 3, 2, 2, 2, 339, 340, 3, 2, 2, 2, 340, 342, 3, 2, 2, 2, 341, 339, 3, 2, - 2, 2, 342, 343, 7, 36, 2, 2, 343, 365, 8, 38, 6, 2, 344, 345, 7, 41, 2, - 2, 345, 359, 8, 38, 7, 2, 346, 351, 7, 94, 2, 2, 347, 348, 7, 41, 2, 2, - 348, 352, 8, 38, 8, 2, 349, 350, 10, 2, 2, 2, 350, 352, 8, 38, 9, 2, 351, - 347, 3, 2, 2, 2, 351, 349, 3, 2, 2, 2, 352, 358, 3, 2, 2, 2, 353, 354, - 7, 36, 2, 2, 354, 358, 8, 38, 10, 2, 355, 356, 10, 4, 2, 2, 356, 358, 8, - 38, 11, 2, 357, 346, 3, 2, 2, 2, 357, 353, 3, 2, 2, 2, 357, 355, 3, 2, - 2, 2, 358, 361, 3, 2, 2, 2, 359, 357, 3, 2, 2, 2, 359, 360, 3, 2, 2, 2, - 360, 362, 3, 2, 2, 2, 361, 359, 3, 2, 2, 2, 362, 363, 7, 41, 2, 2, 363, - 365, 8, 38, 12, 2, 364, 324, 3, 2, 2, 2, 364, 344, 3, 2, 2, 2, 365, 76, - 3, 2, 2, 2, 366, 374, 5, 73, 37, 2, 367, 370, 7, 93, 2, 2, 368, 371, 5, - 75, 38, 2, 369, 371, 5, 87, 44, 2, 370, 368, 3, 2, 2, 2, 370, 369, 3, 2, - 2, 2, 371, 372, 3, 2, 2, 2, 372, 373, 7, 95, 2, 2, 373, 375, 3, 2, 2, 2, - 374, 367, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 374, 3, 2, 2, 2, 376, - 377, 3, 2, 2, 2, 377, 78, 3, 2, 2, 2, 378, 379, 7, 119, 2, 2, 379, 382, - 7, 58, 2, 2, 380, 382, 9, 5, 2, 2, 381, 378, 3, 2, 2, 2, 381, 380, 3, 2, - 2, 2, 382, 80, 3, 2, 2, 2, 383, 384, 9, 6, 2, 2, 384, 82, 3, 2, 2, 2, 385, - 386, 9, 7, 2, 2, 386, 84, 3, 2, 2, 2, 387, 388, 7, 50, 2, 2, 388, 390, - 9, 8, 2, 2, 389, 391, 9, 9, 2, 2, 390, 389, 3, 2, 2, 2, 391, 392, 3, 2, - 2, 2, 392, 390, 3, 2, 2, 2, 392, 393, 3, 2, 2, 2, 393, 86, 3, 2, 2, 2, - 394, 398, 5, 93, 47, 2, 395, 397, 5, 83, 42, 2, 396, 395, 3, 2, 2, 2, 397, - 400, 3, 2, 2, 2, 398, 396, 3, 2, 2, 2, 398, 399, 3, 2, 2, 2, 399, 403, - 3, 2, 2, 2, 400, 398, 3, 2, 2, 2, 401, 403, 7, 50, 2, 2, 402, 394, 3, 2, - 2, 2, 402, 401, 3, 2, 2, 2, 403, 88, 3, 2, 2, 2, 404, 408, 7, 50, 2, 2, - 405, 407, 5, 95, 48, 2, 406, 405, 3, 2, 2, 2, 407, 410, 3, 2, 2, 2, 408, - 406, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 90, 3, 2, 2, 2, 410, 408, 3, - 2, 2, 2, 411, 412, 7, 50, 2, 2, 412, 413, 9, 10, 2, 2, 413, 414, 5, 115, - 58, 2, 414, 92, 3, 2, 2, 2, 415, 416, 9, 11, 2, 2, 416, 94, 3, 2, 2, 2, - 417, 418, 9, 12, 2, 2, 418, 96, 3, 2, 2, 2, 419, 420, 9, 13, 2, 2, 420, - 98, 3, 2, 2, 2, 421, 422, 5, 97, 49, 2, 422, 423, 5, 97, 49, 2, 423, 424, - 5, 97, 49, 2, 424, 425, 5, 97, 49, 2, 425, 100, 3, 2, 2, 2, 426, 427, 7, - 94, 2, 2, 427, 428, 7, 119, 2, 2, 428, 429, 3, 2, 2, 2, 429, 437, 5, 99, - 50, 2, 430, 431, 7, 94, 2, 2, 431, 432, 7, 87, 2, 2, 432, 433, 3, 2, 2, - 2, 433, 434, 5, 99, 50, 2, 434, 435, 5, 99, 50, 2, 435, 437, 3, 2, 2, 2, - 436, 426, 3, 2, 2, 2, 436, 430, 3, 2, 2, 2, 437, 102, 3, 2, 2, 2, 438, - 440, 5, 107, 54, 2, 439, 441, 5, 109, 55, 2, 440, 439, 3, 2, 2, 2, 440, - 441, 3, 2, 2, 2, 441, 446, 3, 2, 2, 2, 442, 443, 5, 111, 56, 2, 443, 444, - 5, 109, 55, 2, 444, 446, 3, 2, 2, 2, 445, 438, 3, 2, 2, 2, 445, 442, 3, - 2, 2, 2, 446, 104, 3, 2, 2, 2, 447, 448, 7, 50, 2, 2, 448, 451, 9, 10, - 2, 2, 449, 452, 5, 113, 57, 2, 450, 452, 5, 115, 58, 2, 451, 449, 3, 2, - 2, 2, 451, 450, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 454, 5, 117, 59, - 2, 454, 106, 3, 2, 2, 2, 455, 457, 5, 111, 56, 2, 456, 455, 3, 2, 2, 2, - 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 459, 7, 48, 2, 2, 459, - 464, 5, 111, 56, 2, 460, 461, 5, 111, 56, 2, 461, 462, 7, 48, 2, 2, 462, - 464, 3, 2, 2, 2, 463, 456, 3, 2, 2, 2, 463, 460, 3, 2, 2, 2, 464, 108, - 3, 2, 2, 2, 465, 467, 9, 14, 2, 2, 466, 468, 9, 15, 2, 2, 467, 466, 3, - 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, 470, 5, 111, - 56, 2, 470, 110, 3, 2, 2, 2, 471, 473, 5, 83, 42, 2, 472, 471, 3, 2, 2, - 2, 473, 474, 3, 2, 2, 2, 474, 472, 3, 2, 2, 2, 474, 475, 3, 2, 2, 2, 475, - 112, 3, 2, 2, 2, 476, 478, 5, 115, 58, 2, 477, 476, 3, 2, 2, 2, 477, 478, - 3, 2, 2, 2, 478, 479, 3, 2, 2, 2, 479, 480, 7, 48, 2, 2, 480, 485, 5, 115, - 58, 2, 481, 482, 5, 115, 58, 2, 482, 483, 7, 48, 2, 2, 483, 485, 3, 2, - 2, 2, 484, 477, 3, 2, 2, 2, 484, 481, 3, 2, 2, 2, 485, 114, 3, 2, 2, 2, - 486, 488, 5, 97, 49, 2, 487, 486, 3, 2, 2, 2, 488, 489, 3, 2, 2, 2, 489, - 487, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 116, 3, 2, 2, 2, 491, 493, - 9, 16, 2, 2, 492, 494, 9, 15, 2, 2, 493, 492, 3, 2, 2, 2, 493, 494, 3, - 2, 2, 2, 494, 495, 3, 2, 2, 2, 495, 496, 5, 111, 56, 2, 496, 118, 3, 2, - 2, 2, 497, 498, 7, 94, 2, 2, 498, 513, 9, 17, 2, 2, 499, 500, 7, 94, 2, - 2, 500, 502, 5, 95, 48, 2, 501, 503, 5, 95, 48, 2, 502, 501, 3, 2, 2, 2, - 502, 503, 3, 2, 2, 2, 503, 505, 3, 2, 2, 2, 504, 506, 5, 95, 48, 2, 505, - 504, 3, 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 513, 3, 2, 2, 2, 507, 508, - 7, 94, 2, 2, 508, 509, 7, 122, 2, 2, 509, 510, 3, 2, 2, 2, 510, 513, 5, - 115, 58, 2, 511, 513, 5, 101, 51, 2, 512, 497, 3, 2, 2, 2, 512, 499, 3, - 2, 2, 2, 512, 507, 3, 2, 2, 2, 512, 511, 3, 2, 2, 2, 513, 120, 3, 2, 2, - 2, 514, 516, 9, 18, 2, 2, 515, 514, 3, 2, 2, 2, 516, 517, 3, 2, 2, 2, 517, - 515, 3, 2, 2, 2, 517, 518, 3, 2, 2, 2, 518, 519, 3, 2, 2, 2, 519, 520, - 8, 61, 13, 2, 520, 122, 3, 2, 2, 2, 521, 523, 7, 15, 2, 2, 522, 524, 7, - 12, 2, 2, 523, 522, 3, 2, 2, 2, 523, 524, 3, 2, 2, 2, 524, 527, 3, 2, 2, - 2, 525, 527, 7, 12, 2, 2, 526, 521, 3, 2, 2, 2, 526, 525, 3, 2, 2, 2, 527, - 528, 3, 2, 2, 2, 528, 529, 8, 62, 13, 2, 529, 124, 3, 2, 2, 2, 50, 2, 159, - 173, 205, 211, 219, 234, 236, 267, 296, 302, 306, 311, 313, 321, 324, 333, - 337, 339, 351, 357, 359, 364, 370, 376, 381, 392, 398, 402, 408, 436, 440, - 445, 451, 456, 463, 467, 474, 477, 484, 489, 493, 502, 505, 512, 517, 523, - 526, 14, 3, 38, 2, 3, 38, 3, 3, 38, 4, 3, 38, 5, 3, 38, 6, 3, 38, 7, 3, - 38, 8, 3, 38, 9, 3, 38, 10, 3, 38, 11, 3, 38, 12, 8, 2, 2, + 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, + 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 308, 10, 34, 3, 35, 3, 35, 3, 35, + 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, + 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, + 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 5, + 35, 344, 10, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, + 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, + 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 373, + 10, 36, 3, 37, 3, 37, 3, 37, 3, 37, 5, 37, 379, 10, 37, 3, 38, 3, 38, 5, + 38, 383, 10, 38, 3, 39, 3, 39, 3, 39, 7, 39, 388, 10, 39, 12, 39, 14, 39, + 391, 11, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 5, 39, 398, 10, 39, 3, + 40, 5, 40, 401, 10, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, + 5, 40, 410, 10, 40, 3, 40, 3, 40, 7, 40, 414, 10, 40, 12, 40, 14, 40, 417, + 11, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, + 5, 40, 428, 10, 40, 3, 40, 3, 40, 3, 40, 3, 40, 7, 40, 434, 10, 40, 12, + 40, 14, 40, 437, 11, 40, 3, 40, 3, 40, 5, 40, 441, 10, 40, 3, 41, 3, 41, + 3, 41, 3, 41, 5, 41, 447, 10, 41, 3, 41, 3, 41, 6, 41, 451, 10, 41, 13, + 41, 14, 41, 452, 3, 42, 3, 42, 3, 42, 5, 42, 458, 10, 42, 3, 43, 3, 43, + 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 6, 45, 467, 10, 45, 13, 45, 14, 45, + 468, 3, 46, 3, 46, 7, 46, 473, 10, 46, 12, 46, 14, 46, 476, 11, 46, 3, + 46, 5, 46, 479, 10, 46, 3, 47, 3, 47, 7, 47, 483, 10, 47, 12, 47, 14, 47, + 486, 11, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, + 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, + 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 5, 53, 513, 10, 53, 3, 54, 3, + 54, 5, 54, 517, 10, 54, 3, 54, 3, 54, 3, 54, 5, 54, 522, 10, 54, 3, 55, + 3, 55, 3, 55, 3, 55, 5, 55, 528, 10, 55, 3, 55, 3, 55, 3, 56, 5, 56, 533, + 10, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 5, 56, 540, 10, 56, 3, 57, 3, + 57, 5, 57, 544, 10, 57, 3, 57, 3, 57, 3, 58, 6, 58, 549, 10, 58, 13, 58, + 14, 58, 550, 3, 59, 5, 59, 554, 10, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, + 59, 5, 59, 561, 10, 59, 3, 60, 6, 60, 564, 10, 60, 13, 60, 14, 60, 565, + 3, 61, 3, 61, 5, 61, 570, 10, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, + 62, 3, 62, 5, 62, 579, 10, 62, 3, 62, 5, 62, 582, 10, 62, 3, 62, 3, 62, + 3, 62, 3, 62, 3, 62, 5, 62, 589, 10, 62, 3, 63, 6, 63, 592, 10, 63, 13, + 63, 14, 63, 593, 3, 63, 3, 63, 3, 64, 3, 64, 5, 64, 600, 10, 64, 3, 64, + 5, 64, 603, 10, 64, 3, 64, 3, 64, 2, 2, 65, 3, 3, 5, 4, 7, 5, 9, 6, 11, + 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, + 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, + 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, + 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 2, + 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, 97, 2, 99, 2, 101, 2, 103, 2, + 105, 2, 107, 2, 109, 2, 111, 2, 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, + 123, 2, 125, 43, 127, 44, 3, 2, 19, 3, 2, 41, 41, 4, 2, 36, 36, 94, 94, + 5, 2, 36, 36, 41, 41, 94, 94, 5, 2, 78, 78, 87, 87, 119, 119, 5, 2, 67, + 92, 97, 97, 99, 124, 3, 2, 50, 59, 4, 2, 68, 68, 100, 100, 3, 2, 50, 51, + 4, 2, 90, 90, 122, 122, 3, 2, 51, 59, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, + 99, 104, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 4, 2, 82, 82, 114, + 114, 12, 2, 36, 36, 41, 41, 65, 65, 94, 94, 99, 100, 104, 104, 112, 112, + 116, 116, 118, 118, 120, 120, 4, 2, 11, 11, 34, 34, 2, 642, 2, 3, 3, 2, + 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, + 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, + 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, + 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, + 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, + 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, + 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, + 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, + 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, + 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, + 81, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 3, 129, 3, 2, 2, + 2, 5, 131, 3, 2, 2, 2, 7, 133, 3, 2, 2, 2, 9, 135, 3, 2, 2, 2, 11, 137, + 3, 2, 2, 2, 13, 139, 3, 2, 2, 2, 15, 141, 3, 2, 2, 2, 17, 144, 3, 2, 2, + 2, 19, 146, 3, 2, 2, 2, 21, 149, 3, 2, 2, 2, 23, 152, 3, 2, 2, 2, 25, 163, + 3, 2, 2, 2, 27, 177, 3, 2, 2, 2, 29, 179, 3, 2, 2, 2, 31, 181, 3, 2, 2, + 2, 33, 183, 3, 2, 2, 2, 35, 185, 3, 2, 2, 2, 37, 187, 3, 2, 2, 2, 39, 189, + 3, 2, 2, 2, 41, 192, 3, 2, 2, 2, 43, 195, 3, 2, 2, 2, 45, 198, 3, 2, 2, + 2, 47, 200, 3, 2, 2, 2, 49, 202, 3, 2, 2, 2, 51, 209, 3, 2, 2, 2, 53, 215, + 3, 2, 2, 2, 55, 217, 3, 2, 2, 2, 57, 223, 3, 2, 2, 2, 59, 225, 3, 2, 2, + 2, 61, 228, 3, 2, 2, 2, 63, 235, 3, 2, 2, 2, 65, 271, 3, 2, 2, 2, 67, 307, + 3, 2, 2, 2, 69, 343, 3, 2, 2, 2, 71, 372, 3, 2, 2, 2, 73, 378, 3, 2, 2, + 2, 75, 382, 3, 2, 2, 2, 77, 397, 3, 2, 2, 2, 79, 440, 3, 2, 2, 2, 81, 442, + 3, 2, 2, 2, 83, 457, 3, 2, 2, 2, 85, 459, 3, 2, 2, 2, 87, 461, 3, 2, 2, + 2, 89, 463, 3, 2, 2, 2, 91, 478, 3, 2, 2, 2, 93, 480, 3, 2, 2, 2, 95, 487, + 3, 2, 2, 2, 97, 491, 3, 2, 2, 2, 99, 493, 3, 2, 2, 2, 101, 495, 3, 2, 2, + 2, 103, 497, 3, 2, 2, 2, 105, 512, 3, 2, 2, 2, 107, 521, 3, 2, 2, 2, 109, + 523, 3, 2, 2, 2, 111, 539, 3, 2, 2, 2, 113, 541, 3, 2, 2, 2, 115, 548, + 3, 2, 2, 2, 117, 560, 3, 2, 2, 2, 119, 563, 3, 2, 2, 2, 121, 567, 3, 2, + 2, 2, 123, 588, 3, 2, 2, 2, 125, 591, 3, 2, 2, 2, 127, 602, 3, 2, 2, 2, + 129, 130, 7, 42, 2, 2, 130, 4, 3, 2, 2, 2, 131, 132, 7, 43, 2, 2, 132, + 6, 3, 2, 2, 2, 133, 134, 7, 93, 2, 2, 134, 8, 3, 2, 2, 2, 135, 136, 7, + 46, 2, 2, 136, 10, 3, 2, 2, 2, 137, 138, 7, 95, 2, 2, 138, 12, 3, 2, 2, + 2, 139, 140, 7, 62, 2, 2, 140, 14, 3, 2, 2, 2, 141, 142, 7, 62, 2, 2, 142, + 143, 7, 63, 2, 2, 143, 16, 3, 2, 2, 2, 144, 145, 7, 64, 2, 2, 145, 18, + 3, 2, 2, 2, 146, 147, 7, 64, 2, 2, 147, 148, 7, 63, 2, 2, 148, 20, 3, 2, + 2, 2, 149, 150, 7, 63, 2, 2, 150, 151, 7, 63, 2, 2, 151, 22, 3, 2, 2, 2, + 152, 153, 7, 35, 2, 2, 153, 154, 7, 63, 2, 2, 154, 24, 3, 2, 2, 2, 155, + 156, 7, 110, 2, 2, 156, 157, 7, 107, 2, 2, 157, 158, 7, 109, 2, 2, 158, + 164, 7, 103, 2, 2, 159, 160, 7, 78, 2, 2, 160, 161, 7, 75, 2, 2, 161, 162, + 7, 77, 2, 2, 162, 164, 7, 71, 2, 2, 163, 155, 3, 2, 2, 2, 163, 159, 3, + 2, 2, 2, 164, 26, 3, 2, 2, 2, 165, 166, 7, 103, 2, 2, 166, 167, 7, 122, + 2, 2, 167, 168, 7, 107, 2, 2, 168, 169, 7, 117, 2, 2, 169, 170, 7, 118, + 2, 2, 170, 178, 7, 117, 2, 2, 171, 172, 7, 71, 2, 2, 172, 173, 7, 90, 2, + 2, 173, 174, 7, 75, 2, 2, 174, 175, 7, 85, 2, 2, 175, 176, 7, 86, 2, 2, + 176, 178, 7, 85, 2, 2, 177, 165, 3, 2, 2, 2, 177, 171, 3, 2, 2, 2, 178, + 28, 3, 2, 2, 2, 179, 180, 7, 45, 2, 2, 180, 30, 3, 2, 2, 2, 181, 182, 7, + 47, 2, 2, 182, 32, 3, 2, 2, 2, 183, 184, 7, 44, 2, 2, 184, 34, 3, 2, 2, + 2, 185, 186, 7, 49, 2, 2, 186, 36, 3, 2, 2, 2, 187, 188, 7, 39, 2, 2, 188, + 38, 3, 2, 2, 2, 189, 190, 7, 44, 2, 2, 190, 191, 7, 44, 2, 2, 191, 40, + 3, 2, 2, 2, 192, 193, 7, 62, 2, 2, 193, 194, 7, 62, 2, 2, 194, 42, 3, 2, + 2, 2, 195, 196, 7, 64, 2, 2, 196, 197, 7, 64, 2, 2, 197, 44, 3, 2, 2, 2, + 198, 199, 7, 40, 2, 2, 199, 46, 3, 2, 2, 2, 200, 201, 7, 126, 2, 2, 201, + 48, 3, 2, 2, 2, 202, 203, 7, 96, 2, 2, 203, 50, 3, 2, 2, 2, 204, 205, 7, + 40, 2, 2, 205, 210, 7, 40, 2, 2, 206, 207, 7, 99, 2, 2, 207, 208, 7, 112, + 2, 2, 208, 210, 7, 102, 2, 2, 209, 204, 3, 2, 2, 2, 209, 206, 3, 2, 2, + 2, 210, 52, 3, 2, 2, 2, 211, 212, 7, 126, 2, 2, 212, 216, 7, 126, 2, 2, + 213, 214, 7, 113, 2, 2, 214, 216, 7, 116, 2, 2, 215, 211, 3, 2, 2, 2, 215, + 213, 3, 2, 2, 2, 216, 54, 3, 2, 2, 2, 217, 218, 7, 128, 2, 2, 218, 56, + 3, 2, 2, 2, 219, 224, 7, 35, 2, 2, 220, 221, 7, 112, 2, 2, 221, 222, 7, + 113, 2, 2, 222, 224, 7, 118, 2, 2, 223, 219, 3, 2, 2, 2, 223, 220, 3, 2, + 2, 2, 224, 58, 3, 2, 2, 2, 225, 226, 7, 107, 2, 2, 226, 227, 7, 112, 2, + 2, 227, 60, 3, 2, 2, 2, 228, 229, 7, 112, 2, 2, 229, 230, 7, 113, 2, 2, + 230, 231, 7, 118, 2, 2, 231, 232, 7, 34, 2, 2, 232, 233, 7, 107, 2, 2, + 233, 234, 7, 112, 2, 2, 234, 62, 3, 2, 2, 2, 235, 240, 7, 93, 2, 2, 236, + 239, 5, 125, 63, 2, 237, 239, 5, 127, 64, 2, 238, 236, 3, 2, 2, 2, 238, + 237, 3, 2, 2, 2, 239, 242, 3, 2, 2, 2, 240, 238, 3, 2, 2, 2, 240, 241, + 3, 2, 2, 2, 241, 243, 3, 2, 2, 2, 242, 240, 3, 2, 2, 2, 243, 244, 7, 95, + 2, 2, 244, 64, 3, 2, 2, 2, 245, 246, 7, 108, 2, 2, 246, 247, 7, 117, 2, + 2, 247, 248, 7, 113, 2, 2, 248, 249, 7, 112, 2, 2, 249, 250, 7, 97, 2, + 2, 250, 251, 7, 101, 2, 2, 251, 252, 7, 113, 2, 2, 252, 253, 7, 112, 2, + 2, 253, 254, 7, 118, 2, 2, 254, 255, 7, 99, 2, 2, 255, 256, 7, 107, 2, + 2, 256, 257, 7, 112, 2, 2, 257, 272, 7, 117, 2, 2, 258, 259, 7, 76, 2, + 2, 259, 260, 7, 85, 2, 2, 260, 261, 7, 81, 2, 2, 261, 262, 7, 80, 2, 2, + 262, 263, 7, 97, 2, 2, 263, 264, 7, 69, 2, 2, 264, 265, 7, 81, 2, 2, 265, + 266, 7, 80, 2, 2, 266, 267, 7, 86, 2, 2, 267, 268, 7, 67, 2, 2, 268, 269, + 7, 75, 2, 2, 269, 270, 7, 80, 2, 2, 270, 272, 7, 85, 2, 2, 271, 245, 3, + 2, 2, 2, 271, 258, 3, 2, 2, 2, 272, 66, 3, 2, 2, 2, 273, 274, 7, 108, 2, + 2, 274, 275, 7, 117, 2, 2, 275, 276, 7, 113, 2, 2, 276, 277, 7, 112, 2, + 2, 277, 278, 7, 97, 2, 2, 278, 279, 7, 101, 2, 2, 279, 280, 7, 113, 2, + 2, 280, 281, 7, 112, 2, 2, 281, 282, 7, 118, 2, 2, 282, 283, 7, 99, 2, + 2, 283, 284, 7, 107, 2, 2, 284, 285, 7, 112, 2, 2, 285, 286, 7, 117, 2, + 2, 286, 287, 7, 97, 2, 2, 287, 288, 7, 99, 2, 2, 288, 289, 7, 110, 2, 2, + 289, 308, 7, 110, 2, 2, 290, 291, 7, 76, 2, 2, 291, 292, 7, 85, 2, 2, 292, + 293, 7, 81, 2, 2, 293, 294, 7, 80, 2, 2, 294, 295, 7, 97, 2, 2, 295, 296, + 7, 69, 2, 2, 296, 297, 7, 81, 2, 2, 297, 298, 7, 80, 2, 2, 298, 299, 7, + 86, 2, 2, 299, 300, 7, 67, 2, 2, 300, 301, 7, 75, 2, 2, 301, 302, 7, 80, + 2, 2, 302, 303, 7, 85, 2, 2, 303, 304, 7, 97, 2, 2, 304, 305, 7, 67, 2, + 2, 305, 306, 7, 78, 2, 2, 306, 308, 7, 78, 2, 2, 307, 273, 3, 2, 2, 2, + 307, 290, 3, 2, 2, 2, 308, 68, 3, 2, 2, 2, 309, 310, 7, 108, 2, 2, 310, + 311, 7, 117, 2, 2, 311, 312, 7, 113, 2, 2, 312, 313, 7, 112, 2, 2, 313, + 314, 7, 97, 2, 2, 314, 315, 7, 101, 2, 2, 315, 316, 7, 113, 2, 2, 316, + 317, 7, 112, 2, 2, 317, 318, 7, 118, 2, 2, 318, 319, 7, 99, 2, 2, 319, + 320, 7, 107, 2, 2, 320, 321, 7, 112, 2, 2, 321, 322, 7, 117, 2, 2, 322, + 323, 7, 97, 2, 2, 323, 324, 7, 99, 2, 2, 324, 325, 7, 112, 2, 2, 325, 344, + 7, 123, 2, 2, 326, 327, 7, 76, 2, 2, 327, 328, 7, 85, 2, 2, 328, 329, 7, + 81, 2, 2, 329, 330, 7, 80, 2, 2, 330, 331, 7, 97, 2, 2, 331, 332, 7, 69, + 2, 2, 332, 333, 7, 81, 2, 2, 333, 334, 7, 80, 2, 2, 334, 335, 7, 86, 2, + 2, 335, 336, 7, 67, 2, 2, 336, 337, 7, 75, 2, 2, 337, 338, 7, 80, 2, 2, + 338, 339, 7, 85, 2, 2, 339, 340, 7, 97, 2, 2, 340, 341, 7, 67, 2, 2, 341, + 342, 7, 80, 2, 2, 342, 344, 7, 91, 2, 2, 343, 309, 3, 2, 2, 2, 343, 326, + 3, 2, 2, 2, 344, 70, 3, 2, 2, 2, 345, 346, 7, 118, 2, 2, 346, 347, 7, 116, + 2, 2, 347, 348, 7, 119, 2, 2, 348, 373, 7, 103, 2, 2, 349, 350, 7, 86, + 2, 2, 350, 351, 7, 116, 2, 2, 351, 352, 7, 119, 2, 2, 352, 373, 7, 103, + 2, 2, 353, 354, 7, 86, 2, 2, 354, 355, 7, 84, 2, 2, 355, 356, 7, 87, 2, + 2, 356, 373, 7, 71, 2, 2, 357, 358, 7, 104, 2, 2, 358, 359, 7, 99, 2, 2, + 359, 360, 7, 110, 2, 2, 360, 361, 7, 117, 2, 2, 361, 373, 7, 103, 2, 2, + 362, 363, 7, 72, 2, 2, 363, 364, 7, 99, 2, 2, 364, 365, 7, 110, 2, 2, 365, + 366, 7, 117, 2, 2, 366, 373, 7, 103, 2, 2, 367, 368, 7, 72, 2, 2, 368, + 369, 7, 67, 2, 2, 369, 370, 7, 78, 2, 2, 370, 371, 7, 85, 2, 2, 371, 373, + 7, 71, 2, 2, 372, 345, 3, 2, 2, 2, 372, 349, 3, 2, 2, 2, 372, 353, 3, 2, + 2, 2, 372, 357, 3, 2, 2, 2, 372, 362, 3, 2, 2, 2, 372, 367, 3, 2, 2, 2, + 373, 72, 3, 2, 2, 2, 374, 379, 5, 91, 46, 2, 375, 379, 5, 93, 47, 2, 376, + 379, 5, 95, 48, 2, 377, 379, 5, 89, 45, 2, 378, 374, 3, 2, 2, 2, 378, 375, + 3, 2, 2, 2, 378, 376, 3, 2, 2, 2, 378, 377, 3, 2, 2, 2, 379, 74, 3, 2, + 2, 2, 380, 383, 5, 107, 54, 2, 381, 383, 5, 109, 55, 2, 382, 380, 3, 2, + 2, 2, 382, 381, 3, 2, 2, 2, 383, 76, 3, 2, 2, 2, 384, 389, 5, 85, 43, 2, + 385, 388, 5, 85, 43, 2, 386, 388, 5, 87, 44, 2, 387, 385, 3, 2, 2, 2, 387, + 386, 3, 2, 2, 2, 388, 391, 3, 2, 2, 2, 389, 387, 3, 2, 2, 2, 389, 390, + 3, 2, 2, 2, 390, 398, 3, 2, 2, 2, 391, 389, 3, 2, 2, 2, 392, 393, 7, 38, + 2, 2, 393, 394, 7, 111, 2, 2, 394, 395, 7, 103, 2, 2, 395, 396, 7, 118, + 2, 2, 396, 398, 7, 99, 2, 2, 397, 384, 3, 2, 2, 2, 397, 392, 3, 2, 2, 2, + 398, 78, 3, 2, 2, 2, 399, 401, 5, 83, 42, 2, 400, 399, 3, 2, 2, 2, 400, + 401, 3, 2, 2, 2, 401, 402, 3, 2, 2, 2, 402, 403, 7, 36, 2, 2, 403, 415, + 8, 40, 2, 2, 404, 409, 7, 94, 2, 2, 405, 406, 7, 41, 2, 2, 406, 410, 8, + 40, 3, 2, 407, 408, 10, 2, 2, 2, 408, 410, 8, 40, 4, 2, 409, 405, 3, 2, + 2, 2, 409, 407, 3, 2, 2, 2, 410, 414, 3, 2, 2, 2, 411, 412, 10, 3, 2, 2, + 412, 414, 8, 40, 5, 2, 413, 404, 3, 2, 2, 2, 413, 411, 3, 2, 2, 2, 414, + 417, 3, 2, 2, 2, 415, 413, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 418, + 3, 2, 2, 2, 417, 415, 3, 2, 2, 2, 418, 419, 7, 36, 2, 2, 419, 441, 8, 40, + 6, 2, 420, 421, 7, 41, 2, 2, 421, 435, 8, 40, 7, 2, 422, 427, 7, 94, 2, + 2, 423, 424, 7, 41, 2, 2, 424, 428, 8, 40, 8, 2, 425, 426, 10, 2, 2, 2, + 426, 428, 8, 40, 9, 2, 427, 423, 3, 2, 2, 2, 427, 425, 3, 2, 2, 2, 428, + 434, 3, 2, 2, 2, 429, 430, 7, 36, 2, 2, 430, 434, 8, 40, 10, 2, 431, 432, + 10, 4, 2, 2, 432, 434, 8, 40, 11, 2, 433, 422, 3, 2, 2, 2, 433, 429, 3, + 2, 2, 2, 433, 431, 3, 2, 2, 2, 434, 437, 3, 2, 2, 2, 435, 433, 3, 2, 2, + 2, 435, 436, 3, 2, 2, 2, 436, 438, 3, 2, 2, 2, 437, 435, 3, 2, 2, 2, 438, + 439, 7, 41, 2, 2, 439, 441, 8, 40, 12, 2, 440, 400, 3, 2, 2, 2, 440, 420, + 3, 2, 2, 2, 441, 80, 3, 2, 2, 2, 442, 450, 5, 77, 39, 2, 443, 446, 7, 93, + 2, 2, 444, 447, 5, 79, 40, 2, 445, 447, 5, 91, 46, 2, 446, 444, 3, 2, 2, + 2, 446, 445, 3, 2, 2, 2, 447, 448, 3, 2, 2, 2, 448, 449, 7, 95, 2, 2, 449, + 451, 3, 2, 2, 2, 450, 443, 3, 2, 2, 2, 451, 452, 3, 2, 2, 2, 452, 450, + 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 82, 3, 2, 2, 2, 454, 455, 7, 119, + 2, 2, 455, 458, 7, 58, 2, 2, 456, 458, 9, 5, 2, 2, 457, 454, 3, 2, 2, 2, + 457, 456, 3, 2, 2, 2, 458, 84, 3, 2, 2, 2, 459, 460, 9, 6, 2, 2, 460, 86, + 3, 2, 2, 2, 461, 462, 9, 7, 2, 2, 462, 88, 3, 2, 2, 2, 463, 464, 7, 50, + 2, 2, 464, 466, 9, 8, 2, 2, 465, 467, 9, 9, 2, 2, 466, 465, 3, 2, 2, 2, + 467, 468, 3, 2, 2, 2, 468, 466, 3, 2, 2, 2, 468, 469, 3, 2, 2, 2, 469, + 90, 3, 2, 2, 2, 470, 474, 5, 97, 49, 2, 471, 473, 5, 87, 44, 2, 472, 471, + 3, 2, 2, 2, 473, 476, 3, 2, 2, 2, 474, 472, 3, 2, 2, 2, 474, 475, 3, 2, + 2, 2, 475, 479, 3, 2, 2, 2, 476, 474, 3, 2, 2, 2, 477, 479, 7, 50, 2, 2, + 478, 470, 3, 2, 2, 2, 478, 477, 3, 2, 2, 2, 479, 92, 3, 2, 2, 2, 480, 484, + 7, 50, 2, 2, 481, 483, 5, 99, 50, 2, 482, 481, 3, 2, 2, 2, 483, 486, 3, + 2, 2, 2, 484, 482, 3, 2, 2, 2, 484, 485, 3, 2, 2, 2, 485, 94, 3, 2, 2, + 2, 486, 484, 3, 2, 2, 2, 487, 488, 7, 50, 2, 2, 488, 489, 9, 10, 2, 2, + 489, 490, 5, 119, 60, 2, 490, 96, 3, 2, 2, 2, 491, 492, 9, 11, 2, 2, 492, + 98, 3, 2, 2, 2, 493, 494, 9, 12, 2, 2, 494, 100, 3, 2, 2, 2, 495, 496, + 9, 13, 2, 2, 496, 102, 3, 2, 2, 2, 497, 498, 5, 101, 51, 2, 498, 499, 5, + 101, 51, 2, 499, 500, 5, 101, 51, 2, 500, 501, 5, 101, 51, 2, 501, 104, + 3, 2, 2, 2, 502, 503, 7, 94, 2, 2, 503, 504, 7, 119, 2, 2, 504, 505, 3, + 2, 2, 2, 505, 513, 5, 103, 52, 2, 506, 507, 7, 94, 2, 2, 507, 508, 7, 87, + 2, 2, 508, 509, 3, 2, 2, 2, 509, 510, 5, 103, 52, 2, 510, 511, 5, 103, + 52, 2, 511, 513, 3, 2, 2, 2, 512, 502, 3, 2, 2, 2, 512, 506, 3, 2, 2, 2, + 513, 106, 3, 2, 2, 2, 514, 516, 5, 111, 56, 2, 515, 517, 5, 113, 57, 2, + 516, 515, 3, 2, 2, 2, 516, 517, 3, 2, 2, 2, 517, 522, 3, 2, 2, 2, 518, + 519, 5, 115, 58, 2, 519, 520, 5, 113, 57, 2, 520, 522, 3, 2, 2, 2, 521, + 514, 3, 2, 2, 2, 521, 518, 3, 2, 2, 2, 522, 108, 3, 2, 2, 2, 523, 524, + 7, 50, 2, 2, 524, 527, 9, 10, 2, 2, 525, 528, 5, 117, 59, 2, 526, 528, + 5, 119, 60, 2, 527, 525, 3, 2, 2, 2, 527, 526, 3, 2, 2, 2, 528, 529, 3, + 2, 2, 2, 529, 530, 5, 121, 61, 2, 530, 110, 3, 2, 2, 2, 531, 533, 5, 115, + 58, 2, 532, 531, 3, 2, 2, 2, 532, 533, 3, 2, 2, 2, 533, 534, 3, 2, 2, 2, + 534, 535, 7, 48, 2, 2, 535, 540, 5, 115, 58, 2, 536, 537, 5, 115, 58, 2, + 537, 538, 7, 48, 2, 2, 538, 540, 3, 2, 2, 2, 539, 532, 3, 2, 2, 2, 539, + 536, 3, 2, 2, 2, 540, 112, 3, 2, 2, 2, 541, 543, 9, 14, 2, 2, 542, 544, + 9, 15, 2, 2, 543, 542, 3, 2, 2, 2, 543, 544, 3, 2, 2, 2, 544, 545, 3, 2, + 2, 2, 545, 546, 5, 115, 58, 2, 546, 114, 3, 2, 2, 2, 547, 549, 5, 87, 44, + 2, 548, 547, 3, 2, 2, 2, 549, 550, 3, 2, 2, 2, 550, 548, 3, 2, 2, 2, 550, + 551, 3, 2, 2, 2, 551, 116, 3, 2, 2, 2, 552, 554, 5, 119, 60, 2, 553, 552, + 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 555, 3, 2, 2, 2, 555, 556, 7, 48, + 2, 2, 556, 561, 5, 119, 60, 2, 557, 558, 5, 119, 60, 2, 558, 559, 7, 48, + 2, 2, 559, 561, 3, 2, 2, 2, 560, 553, 3, 2, 2, 2, 560, 557, 3, 2, 2, 2, + 561, 118, 3, 2, 2, 2, 562, 564, 5, 101, 51, 2, 563, 562, 3, 2, 2, 2, 564, + 565, 3, 2, 2, 2, 565, 563, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566, 120, + 3, 2, 2, 2, 567, 569, 9, 16, 2, 2, 568, 570, 9, 15, 2, 2, 569, 568, 3, + 2, 2, 2, 569, 570, 3, 2, 2, 2, 570, 571, 3, 2, 2, 2, 571, 572, 5, 115, + 58, 2, 572, 122, 3, 2, 2, 2, 573, 574, 7, 94, 2, 2, 574, 589, 9, 17, 2, + 2, 575, 576, 7, 94, 2, 2, 576, 578, 5, 99, 50, 2, 577, 579, 5, 99, 50, + 2, 578, 577, 3, 2, 2, 2, 578, 579, 3, 2, 2, 2, 579, 581, 3, 2, 2, 2, 580, + 582, 5, 99, 50, 2, 581, 580, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 589, + 3, 2, 2, 2, 583, 584, 7, 94, 2, 2, 584, 585, 7, 122, 2, 2, 585, 586, 3, + 2, 2, 2, 586, 589, 5, 119, 60, 2, 587, 589, 5, 105, 53, 2, 588, 573, 3, + 2, 2, 2, 588, 575, 3, 2, 2, 2, 588, 583, 3, 2, 2, 2, 588, 587, 3, 2, 2, + 2, 589, 124, 3, 2, 2, 2, 590, 592, 9, 18, 2, 2, 591, 590, 3, 2, 2, 2, 592, + 593, 3, 2, 2, 2, 593, 591, 3, 2, 2, 2, 593, 594, 3, 2, 2, 2, 594, 595, + 3, 2, 2, 2, 595, 596, 8, 63, 13, 2, 596, 126, 3, 2, 2, 2, 597, 599, 7, + 15, 2, 2, 598, 600, 7, 12, 2, 2, 599, 598, 3, 2, 2, 2, 599, 600, 3, 2, + 2, 2, 600, 603, 3, 2, 2, 2, 601, 603, 7, 12, 2, 2, 602, 597, 3, 2, 2, 2, + 602, 601, 3, 2, 2, 2, 603, 604, 3, 2, 2, 2, 604, 605, 8, 64, 13, 2, 605, + 128, 3, 2, 2, 2, 52, 2, 163, 177, 209, 215, 223, 238, 240, 271, 307, 343, + 372, 378, 382, 387, 389, 397, 400, 409, 413, 415, 427, 433, 435, 440, 446, + 452, 457, 468, 474, 478, 484, 512, 516, 521, 527, 532, 539, 543, 550, 553, + 560, 565, 569, 578, 581, 588, 593, 599, 602, 14, 3, 40, 2, 3, 40, 3, 3, + 40, 4, 3, 40, 5, 3, 40, 6, 3, 40, 7, 3, 40, 8, 3, 40, 9, 3, 40, 10, 3, + 40, 11, 3, 40, 12, 8, 2, 2, } var lexerChannelNames = []string{ @@ -281,21 +314,23 @@ var lexerSymbolicNames = []string{ "", "", "", "", "", "", "LT", "LE", "GT", "GE", "EQ", "NE", "LIKE", "EXISTS", "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", "NOT", "IN", "NIN", "EmptyTerm", "JSONContains", - "BooleanConstant", "IntegerConstant", "FloatingConstant", "Identifier", - "StringLiteral", "JSONIdentifier", "Whitespace", "Newline", + "JSONContainsAll", "JSONContainsAny", "BooleanConstant", "IntegerConstant", + "FloatingConstant", "Identifier", "StringLiteral", "JSONIdentifier", "Whitespace", + "Newline", } var lexerRuleNames = []string{ "T__0", "T__1", "T__2", "T__3", "T__4", "LT", "LE", "GT", "GE", "EQ", "NE", "LIKE", "EXISTS", "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", "NOT", "IN", "NIN", "EmptyTerm", - "JSONContains", "BooleanConstant", "IntegerConstant", "FloatingConstant", - "Identifier", "StringLiteral", "JSONIdentifier", "EncodingPrefix", "Nondigit", - "Digit", "BinaryConstant", "DecimalConstant", "OctalConstant", "HexadecimalConstant", - "NonzeroDigit", "OctalDigit", "HexadecimalDigit", "HexQuad", "UniversalCharacterName", - "DecimalFloatingConstant", "HexadecimalFloatingConstant", "FractionalConstant", - "ExponentPart", "DigitSequence", "HexadecimalFractionalConstant", "HexadecimalDigitSequence", - "BinaryExponentPart", "EscapeSequence", "Whitespace", "Newline", + "JSONContains", "JSONContainsAll", "JSONContainsAny", "BooleanConstant", + "IntegerConstant", "FloatingConstant", "Identifier", "StringLiteral", "JSONIdentifier", + "EncodingPrefix", "Nondigit", "Digit", "BinaryConstant", "DecimalConstant", + "OctalConstant", "HexadecimalConstant", "NonzeroDigit", "OctalDigit", "HexadecimalDigit", + "HexQuad", "UniversalCharacterName", "DecimalFloatingConstant", "HexadecimalFloatingConstant", + "FractionalConstant", "ExponentPart", "DigitSequence", "HexadecimalFractionalConstant", + "HexadecimalDigitSequence", "BinaryExponentPart", "EscapeSequence", "Whitespace", + "Newline", } type PlanLexer struct { @@ -367,21 +402,23 @@ const ( PlanLexerNIN = 30 PlanLexerEmptyTerm = 31 PlanLexerJSONContains = 32 - PlanLexerBooleanConstant = 33 - PlanLexerIntegerConstant = 34 - PlanLexerFloatingConstant = 35 - PlanLexerIdentifier = 36 - PlanLexerStringLiteral = 37 - PlanLexerJSONIdentifier = 38 - PlanLexerWhitespace = 39 - PlanLexerNewline = 40 + PlanLexerJSONContainsAll = 33 + PlanLexerJSONContainsAny = 34 + PlanLexerBooleanConstant = 35 + PlanLexerIntegerConstant = 36 + PlanLexerFloatingConstant = 37 + PlanLexerIdentifier = 38 + PlanLexerStringLiteral = 39 + PlanLexerJSONIdentifier = 40 + PlanLexerWhitespace = 41 + PlanLexerNewline = 42 ) var str = "" func (l *PlanLexer) Action(localctx antlr.RuleContext, ruleIndex, actionIndex int) { switch ruleIndex { - case 36: + case 38: l.StringLiteral_Action(localctx, actionIndex) default: diff --git a/internal/parser/planparserv2/generated/plan_parser.go b/internal/parser/planparserv2/generated/plan_parser.go index a5aa51e7b..a5368fdfa 100644 --- a/internal/parser/planparserv2/generated/plan_parser.go +++ b/internal/parser/planparserv2/generated/plan_parser.go @@ -15,53 +15,66 @@ var _ = reflect.Copy var _ = strconv.Itoa var parserATN = []uint16{ - 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 42, 99, 4, - 2, 9, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, - 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, - 2, 27, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, - 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, - 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, - 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, - 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 81, 10, 2, 12, 2, 14, 2, 84, - 11, 2, 3, 2, 5, 2, 87, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 94, 10, - 2, 12, 2, 14, 2, 97, 11, 2, 3, 2, 2, 3, 2, 3, 2, 2, 12, 4, 2, 16, 17, 29, - 30, 3, 2, 18, 20, 3, 2, 16, 17, 3, 2, 22, 23, 3, 2, 8, 9, 4, 2, 38, 38, - 40, 40, 3, 2, 10, 11, 3, 2, 8, 11, 3, 2, 12, 13, 3, 2, 31, 32, 2, 124, - 2, 26, 3, 2, 2, 2, 4, 5, 8, 2, 1, 2, 5, 27, 7, 36, 2, 2, 6, 27, 7, 37, - 2, 2, 7, 27, 7, 35, 2, 2, 8, 27, 7, 39, 2, 2, 9, 27, 7, 38, 2, 2, 10, 27, - 7, 40, 2, 2, 11, 12, 7, 3, 2, 2, 12, 13, 5, 2, 2, 2, 13, 14, 7, 4, 2, 2, - 14, 27, 3, 2, 2, 2, 15, 16, 9, 2, 2, 2, 16, 27, 5, 2, 2, 19, 17, 18, 7, - 34, 2, 2, 18, 19, 7, 3, 2, 2, 19, 20, 5, 2, 2, 2, 20, 21, 7, 6, 2, 2, 21, - 22, 5, 2, 2, 2, 22, 23, 7, 4, 2, 2, 23, 27, 3, 2, 2, 2, 24, 25, 7, 15, - 2, 2, 25, 27, 5, 2, 2, 3, 26, 4, 3, 2, 2, 2, 26, 6, 3, 2, 2, 2, 26, 7, - 3, 2, 2, 2, 26, 8, 3, 2, 2, 2, 26, 9, 3, 2, 2, 2, 26, 10, 3, 2, 2, 2, 26, - 11, 3, 2, 2, 2, 26, 15, 3, 2, 2, 2, 26, 17, 3, 2, 2, 2, 26, 24, 3, 2, 2, - 2, 27, 95, 3, 2, 2, 2, 28, 29, 12, 20, 2, 2, 29, 30, 7, 21, 2, 2, 30, 94, - 5, 2, 2, 21, 31, 32, 12, 18, 2, 2, 32, 33, 9, 3, 2, 2, 33, 94, 5, 2, 2, - 19, 34, 35, 12, 17, 2, 2, 35, 36, 9, 4, 2, 2, 36, 94, 5, 2, 2, 18, 37, - 38, 12, 16, 2, 2, 38, 39, 9, 5, 2, 2, 39, 94, 5, 2, 2, 17, 40, 41, 12, - 12, 2, 2, 41, 42, 9, 6, 2, 2, 42, 43, 9, 7, 2, 2, 43, 44, 9, 6, 2, 2, 44, - 94, 5, 2, 2, 13, 45, 46, 12, 11, 2, 2, 46, 47, 9, 8, 2, 2, 47, 48, 9, 7, - 2, 2, 48, 49, 9, 8, 2, 2, 49, 94, 5, 2, 2, 12, 50, 51, 12, 10, 2, 2, 51, - 52, 9, 9, 2, 2, 52, 94, 5, 2, 2, 11, 53, 54, 12, 9, 2, 2, 54, 55, 9, 10, - 2, 2, 55, 94, 5, 2, 2, 10, 56, 57, 12, 8, 2, 2, 57, 58, 7, 24, 2, 2, 58, - 94, 5, 2, 2, 9, 59, 60, 12, 7, 2, 2, 60, 61, 7, 26, 2, 2, 61, 94, 5, 2, - 2, 8, 62, 63, 12, 6, 2, 2, 63, 64, 7, 25, 2, 2, 64, 94, 5, 2, 2, 7, 65, - 66, 12, 5, 2, 2, 66, 67, 7, 27, 2, 2, 67, 94, 5, 2, 2, 6, 68, 69, 12, 4, - 2, 2, 69, 70, 7, 28, 2, 2, 70, 94, 5, 2, 2, 5, 71, 72, 12, 21, 2, 2, 72, - 73, 7, 14, 2, 2, 73, 94, 7, 39, 2, 2, 74, 75, 12, 15, 2, 2, 75, 76, 9, - 11, 2, 2, 76, 77, 7, 5, 2, 2, 77, 82, 5, 2, 2, 2, 78, 79, 7, 6, 2, 2, 79, - 81, 5, 2, 2, 2, 80, 78, 3, 2, 2, 2, 81, 84, 3, 2, 2, 2, 82, 80, 3, 2, 2, - 2, 82, 83, 3, 2, 2, 2, 83, 86, 3, 2, 2, 2, 84, 82, 3, 2, 2, 2, 85, 87, - 7, 6, 2, 2, 86, 85, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 88, 3, 2, 2, 2, - 88, 89, 7, 7, 2, 2, 89, 94, 3, 2, 2, 2, 90, 91, 12, 14, 2, 2, 91, 92, 9, - 11, 2, 2, 92, 94, 7, 33, 2, 2, 93, 28, 3, 2, 2, 2, 93, 31, 3, 2, 2, 2, - 93, 34, 3, 2, 2, 2, 93, 37, 3, 2, 2, 2, 93, 40, 3, 2, 2, 2, 93, 45, 3, - 2, 2, 2, 93, 50, 3, 2, 2, 2, 93, 53, 3, 2, 2, 2, 93, 56, 3, 2, 2, 2, 93, - 59, 3, 2, 2, 2, 93, 62, 3, 2, 2, 2, 93, 65, 3, 2, 2, 2, 93, 68, 3, 2, 2, - 2, 93, 71, 3, 2, 2, 2, 93, 74, 3, 2, 2, 2, 93, 90, 3, 2, 2, 2, 94, 97, - 3, 2, 2, 2, 95, 93, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 3, 3, 2, 2, 2, - 97, 95, 3, 2, 2, 2, 7, 26, 82, 86, 93, 95, + 3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 44, 127, + 4, 2, 9, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 20, 10, 2, 12, 2, 14, 2, 23, 11, 2, + 3, 2, 5, 2, 26, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 55, 10, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, + 3, 2, 3, 2, 7, 2, 109, 10, 2, 12, 2, 14, 2, 112, 11, 2, 3, 2, 5, 2, 115, + 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 122, 10, 2, 12, 2, 14, 2, 125, + 11, 2, 3, 2, 2, 3, 2, 3, 2, 2, 12, 4, 2, 16, 17, 29, 30, 3, 2, 18, 20, + 3, 2, 16, 17, 3, 2, 22, 23, 3, 2, 8, 9, 4, 2, 40, 40, 42, 42, 3, 2, 10, + 11, 3, 2, 8, 11, 3, 2, 12, 13, 3, 2, 31, 32, 2, 157, 2, 54, 3, 2, 2, 2, + 4, 5, 8, 2, 1, 2, 5, 55, 7, 38, 2, 2, 6, 55, 7, 39, 2, 2, 7, 55, 7, 37, + 2, 2, 8, 55, 7, 41, 2, 2, 9, 55, 7, 40, 2, 2, 10, 55, 7, 42, 2, 2, 11, + 12, 7, 3, 2, 2, 12, 13, 5, 2, 2, 2, 13, 14, 7, 4, 2, 2, 14, 55, 3, 2, 2, + 2, 15, 16, 7, 5, 2, 2, 16, 21, 5, 2, 2, 2, 17, 18, 7, 6, 2, 2, 18, 20, + 5, 2, 2, 2, 19, 17, 3, 2, 2, 2, 20, 23, 3, 2, 2, 2, 21, 19, 3, 2, 2, 2, + 21, 22, 3, 2, 2, 2, 22, 25, 3, 2, 2, 2, 23, 21, 3, 2, 2, 2, 24, 26, 7, + 6, 2, 2, 25, 24, 3, 2, 2, 2, 25, 26, 3, 2, 2, 2, 26, 27, 3, 2, 2, 2, 27, + 28, 7, 7, 2, 2, 28, 55, 3, 2, 2, 2, 29, 30, 9, 2, 2, 2, 30, 55, 5, 2, 2, + 21, 31, 32, 7, 34, 2, 2, 32, 33, 7, 3, 2, 2, 33, 34, 5, 2, 2, 2, 34, 35, + 7, 6, 2, 2, 35, 36, 5, 2, 2, 2, 36, 37, 7, 4, 2, 2, 37, 55, 3, 2, 2, 2, + 38, 39, 7, 35, 2, 2, 39, 40, 7, 3, 2, 2, 40, 41, 5, 2, 2, 2, 41, 42, 7, + 6, 2, 2, 42, 43, 5, 2, 2, 2, 43, 44, 7, 4, 2, 2, 44, 55, 3, 2, 2, 2, 45, + 46, 7, 36, 2, 2, 46, 47, 7, 3, 2, 2, 47, 48, 5, 2, 2, 2, 48, 49, 7, 6, + 2, 2, 49, 50, 5, 2, 2, 2, 50, 51, 7, 4, 2, 2, 51, 55, 3, 2, 2, 2, 52, 53, + 7, 15, 2, 2, 53, 55, 5, 2, 2, 3, 54, 4, 3, 2, 2, 2, 54, 6, 3, 2, 2, 2, + 54, 7, 3, 2, 2, 2, 54, 8, 3, 2, 2, 2, 54, 9, 3, 2, 2, 2, 54, 10, 3, 2, + 2, 2, 54, 11, 3, 2, 2, 2, 54, 15, 3, 2, 2, 2, 54, 29, 3, 2, 2, 2, 54, 31, + 3, 2, 2, 2, 54, 38, 3, 2, 2, 2, 54, 45, 3, 2, 2, 2, 54, 52, 3, 2, 2, 2, + 55, 123, 3, 2, 2, 2, 56, 57, 12, 22, 2, 2, 57, 58, 7, 21, 2, 2, 58, 122, + 5, 2, 2, 23, 59, 60, 12, 20, 2, 2, 60, 61, 9, 3, 2, 2, 61, 122, 5, 2, 2, + 21, 62, 63, 12, 19, 2, 2, 63, 64, 9, 4, 2, 2, 64, 122, 5, 2, 2, 20, 65, + 66, 12, 18, 2, 2, 66, 67, 9, 5, 2, 2, 67, 122, 5, 2, 2, 19, 68, 69, 12, + 12, 2, 2, 69, 70, 9, 6, 2, 2, 70, 71, 9, 7, 2, 2, 71, 72, 9, 6, 2, 2, 72, + 122, 5, 2, 2, 13, 73, 74, 12, 11, 2, 2, 74, 75, 9, 8, 2, 2, 75, 76, 9, + 7, 2, 2, 76, 77, 9, 8, 2, 2, 77, 122, 5, 2, 2, 12, 78, 79, 12, 10, 2, 2, + 79, 80, 9, 9, 2, 2, 80, 122, 5, 2, 2, 11, 81, 82, 12, 9, 2, 2, 82, 83, + 9, 10, 2, 2, 83, 122, 5, 2, 2, 10, 84, 85, 12, 8, 2, 2, 85, 86, 7, 24, + 2, 2, 86, 122, 5, 2, 2, 9, 87, 88, 12, 7, 2, 2, 88, 89, 7, 26, 2, 2, 89, + 122, 5, 2, 2, 8, 90, 91, 12, 6, 2, 2, 91, 92, 7, 25, 2, 2, 92, 122, 5, + 2, 2, 7, 93, 94, 12, 5, 2, 2, 94, 95, 7, 27, 2, 2, 95, 122, 5, 2, 2, 6, + 96, 97, 12, 4, 2, 2, 97, 98, 7, 28, 2, 2, 98, 122, 5, 2, 2, 5, 99, 100, + 12, 23, 2, 2, 100, 101, 7, 14, 2, 2, 101, 122, 7, 41, 2, 2, 102, 103, 12, + 17, 2, 2, 103, 104, 9, 11, 2, 2, 104, 105, 7, 5, 2, 2, 105, 110, 5, 2, + 2, 2, 106, 107, 7, 6, 2, 2, 107, 109, 5, 2, 2, 2, 108, 106, 3, 2, 2, 2, + 109, 112, 3, 2, 2, 2, 110, 108, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 111, + 114, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 113, 115, 7, 6, 2, 2, 114, 113, + 3, 2, 2, 2, 114, 115, 3, 2, 2, 2, 115, 116, 3, 2, 2, 2, 116, 117, 7, 7, + 2, 2, 117, 122, 3, 2, 2, 2, 118, 119, 12, 16, 2, 2, 119, 120, 9, 11, 2, + 2, 120, 122, 7, 33, 2, 2, 121, 56, 3, 2, 2, 2, 121, 59, 3, 2, 2, 2, 121, + 62, 3, 2, 2, 2, 121, 65, 3, 2, 2, 2, 121, 68, 3, 2, 2, 2, 121, 73, 3, 2, + 2, 2, 121, 78, 3, 2, 2, 2, 121, 81, 3, 2, 2, 2, 121, 84, 3, 2, 2, 2, 121, + 87, 3, 2, 2, 2, 121, 90, 3, 2, 2, 2, 121, 93, 3, 2, 2, 2, 121, 96, 3, 2, + 2, 2, 121, 99, 3, 2, 2, 2, 121, 102, 3, 2, 2, 2, 121, 118, 3, 2, 2, 2, + 122, 125, 3, 2, 2, 2, 123, 121, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, + 3, 3, 2, 2, 2, 125, 123, 3, 2, 2, 2, 9, 21, 25, 54, 110, 114, 121, 123, } var literalNames = []string{ "", "'('", "')'", "'['", "','", "']'", "'<'", "'<='", "'>'", "'>='", "'=='", @@ -72,8 +85,9 @@ var symbolicNames = []string{ "", "", "", "", "", "", "LT", "LE", "GT", "GE", "EQ", "NE", "LIKE", "EXISTS", "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", "NOT", "IN", "NIN", "EmptyTerm", "JSONContains", - "BooleanConstant", "IntegerConstant", "FloatingConstant", "Identifier", - "StringLiteral", "JSONIdentifier", "Whitespace", "Newline", + "JSONContainsAll", "JSONContainsAny", "BooleanConstant", "IntegerConstant", + "FloatingConstant", "Identifier", "StringLiteral", "JSONIdentifier", "Whitespace", + "Newline", } var ruleNames = []string{ @@ -144,14 +158,16 @@ const ( PlanParserNIN = 30 PlanParserEmptyTerm = 31 PlanParserJSONContains = 32 - PlanParserBooleanConstant = 33 - PlanParserIntegerConstant = 34 - PlanParserFloatingConstant = 35 - PlanParserIdentifier = 36 - PlanParserStringLiteral = 37 - PlanParserJSONIdentifier = 38 - PlanParserWhitespace = 39 - PlanParserNewline = 40 + PlanParserJSONContainsAll = 33 + PlanParserJSONContainsAny = 34 + PlanParserBooleanConstant = 35 + PlanParserIntegerConstant = 36 + PlanParserFloatingConstant = 37 + PlanParserIdentifier = 38 + PlanParserStringLiteral = 39 + PlanParserJSONIdentifier = 40 + PlanParserWhitespace = 41 + PlanParserNewline = 42 ) // PlanParserRULE_expr is the PlanParser rule. @@ -341,6 +357,61 @@ func (s *FloatingContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } +type JSONContainsAllContext struct { + *ExprContext +} + +func NewJSONContainsAllContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JSONContainsAllContext { + var p = new(JSONContainsAllContext) + + p.ExprContext = NewEmptyExprContext() + p.parser = parser + p.CopyFrom(ctx.(*ExprContext)) + + return p +} + +func (s *JSONContainsAllContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JSONContainsAllContext) JSONContainsAll() antlr.TerminalNode { + return s.GetToken(PlanParserJSONContainsAll, 0) +} + +func (s *JSONContainsAllContext) AllExpr() []IExprContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExprContext)(nil)).Elem()) + var tst = make([]IExprContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IExprContext) + } + } + + return tst +} + +func (s *JSONContainsAllContext) Expr(i int) IExprContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IExprContext) +} + +func (s *JSONContainsAllContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case PlanVisitor: + return t.VisitJSONContainsAll(s) + + default: + return t.VisitChildren(s) + } +} + type LogicalOrContext struct { *ExprContext } @@ -1328,6 +1399,112 @@ func (s *IntegerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { } } +type ArrayContext struct { + *ExprContext +} + +func NewArrayContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArrayContext { + var p = new(ArrayContext) + + p.ExprContext = NewEmptyExprContext() + p.parser = parser + p.CopyFrom(ctx.(*ExprContext)) + + return p +} + +func (s *ArrayContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *ArrayContext) AllExpr() []IExprContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExprContext)(nil)).Elem()) + var tst = make([]IExprContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IExprContext) + } + } + + return tst +} + +func (s *ArrayContext) Expr(i int) IExprContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IExprContext) +} + +func (s *ArrayContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case PlanVisitor: + return t.VisitArray(s) + + default: + return t.VisitChildren(s) + } +} + +type JSONContainsAnyContext struct { + *ExprContext +} + +func NewJSONContainsAnyContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JSONContainsAnyContext { + var p = new(JSONContainsAnyContext) + + p.ExprContext = NewEmptyExprContext() + p.parser = parser + p.CopyFrom(ctx.(*ExprContext)) + + return p +} + +func (s *JSONContainsAnyContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *JSONContainsAnyContext) JSONContainsAny() antlr.TerminalNode { + return s.GetToken(PlanParserJSONContainsAny, 0) +} + +func (s *JSONContainsAnyContext) AllExpr() []IExprContext { + var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IExprContext)(nil)).Elem()) + var tst = make([]IExprContext, len(ts)) + + for i, t := range ts { + if t != nil { + tst[i] = t.(IExprContext) + } + } + + return tst +} + +func (s *JSONContainsAnyContext) Expr(i int) IExprContext { + var t = s.GetTypedRuleContext(reflect.TypeOf((*IExprContext)(nil)).Elem(), i) + + if t == nil { + return nil + } + + return t.(IExprContext) +} + +func (s *JSONContainsAnyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case PlanVisitor: + return t.VisitJSONContainsAny(s) + + default: + return t.VisitChildren(s) + } +} + type BitXorContext struct { *ExprContext } @@ -1623,7 +1800,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(24) + p.SetState(52) p.GetErrorHandler().Sync(p) switch p.GetTokenStream().LA(1) { @@ -1699,12 +1876,60 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.Match(PlanParserT__1) } + case PlanParserT__2: + localctx = NewArrayContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(13) + p.Match(PlanParserT__2) + } + { + p.SetState(14) + p.expr(0) + } + p.SetState(19) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) + + for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { + if _alt == 1 { + { + p.SetState(15) + p.Match(PlanParserT__3) + } + { + p.SetState(16) + p.expr(0) + } + + } + p.SetState(21) + p.GetErrorHandler().Sync(p) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 0, p.GetParserRuleContext()) + } + p.SetState(23) + p.GetErrorHandler().Sync(p) + _la = p.GetTokenStream().LA(1) + + if _la == PlanParserT__3 { + { + p.SetState(22) + p.Match(PlanParserT__3) + } + + } + { + p.SetState(25) + p.Match(PlanParserT__4) + } + case PlanParserADD, PlanParserSUB, PlanParserBNOT, PlanParserNOT: localctx = NewUnaryContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(13) + p.SetState(27) var _lt = p.GetTokenStream().LT(1) @@ -1722,8 +1947,8 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(14) - p.expr(17) + p.SetState(28) + p.expr(19) } case PlanParserJSONContains: @@ -1731,27 +1956,85 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(15) + p.SetState(29) p.Match(PlanParserJSONContains) } { - p.SetState(16) + p.SetState(30) p.Match(PlanParserT__0) } { - p.SetState(17) + p.SetState(31) p.expr(0) } { - p.SetState(18) + p.SetState(32) p.Match(PlanParserT__3) } { - p.SetState(19) + p.SetState(33) p.expr(0) } { - p.SetState(20) + p.SetState(34) + p.Match(PlanParserT__1) + } + + case PlanParserJSONContainsAll: + localctx = NewJSONContainsAllContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(36) + p.Match(PlanParserJSONContainsAll) + } + { + p.SetState(37) + p.Match(PlanParserT__0) + } + { + p.SetState(38) + p.expr(0) + } + { + p.SetState(39) + p.Match(PlanParserT__3) + } + { + p.SetState(40) + p.expr(0) + } + { + p.SetState(41) + p.Match(PlanParserT__1) + } + + case PlanParserJSONContainsAny: + localctx = NewJSONContainsAnyContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(43) + p.Match(PlanParserJSONContainsAny) + } + { + p.SetState(44) + p.Match(PlanParserT__0) + } + { + p.SetState(45) + p.expr(0) + } + { + p.SetState(46) + p.Match(PlanParserT__3) + } + { + p.SetState(47) + p.expr(0) + } + { + p.SetState(48) p.Match(PlanParserT__1) } @@ -1760,11 +2043,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(22) + p.SetState(50) p.Match(PlanParserEXISTS) } { - p.SetState(23) + p.SetState(51) p.expr(1) } @@ -1772,9 +2055,9 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(93) + p.SetState(121) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 6, p.GetParserRuleContext()) for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { @@ -1782,36 +2065,36 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(91) + p.SetState(119) p.GetErrorHandler().Sync(p) - switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) { + switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) { case 1: localctx = NewPowerContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(26) + p.SetState(54) - if !(p.Precpred(p.GetParserRuleContext(), 18)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 20)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", "")) } { - p.SetState(27) + p.SetState(55) p.Match(PlanParserPOW) } { - p.SetState(28) - p.expr(19) + p.SetState(56) + p.expr(21) } case 2: localctx = NewMulDivModContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(29) + p.SetState(57) - if !(p.Precpred(p.GetParserRuleContext(), 16)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 18)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) } { - p.SetState(30) + p.SetState(58) var _lt = p.GetTokenStream().LT(1) @@ -1829,20 +2112,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(31) - p.expr(17) + p.SetState(59) + p.expr(19) } case 3: localctx = NewAddSubContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(32) + p.SetState(60) - if !(p.Precpred(p.GetParserRuleContext(), 15)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 17)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) } { - p.SetState(33) + p.SetState(61) var _lt = p.GetTokenStream().LT(1) @@ -1860,20 +2143,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(34) - p.expr(16) + p.SetState(62) + p.expr(18) } case 4: localctx = NewShiftContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(35) + p.SetState(63) - if !(p.Precpred(p.GetParserRuleContext(), 14)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 16)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", "")) } { - p.SetState(36) + p.SetState(64) var _lt = p.GetTokenStream().LT(1) @@ -1891,20 +2174,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(37) - p.expr(15) + p.SetState(65) + p.expr(17) } case 5: localctx = NewRangeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(38) + p.SetState(66) if !(p.Precpred(p.GetParserRuleContext(), 10)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", "")) } { - p.SetState(39) + p.SetState(67) var _lt = p.GetTokenStream().LT(1) @@ -1922,7 +2205,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(40) + p.SetState(68) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -1933,7 +2216,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(41) + p.SetState(69) var _lt = p.GetTokenStream().LT(1) @@ -1951,20 +2234,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(42) + p.SetState(70) p.expr(11) } case 6: localctx = NewReverseRangeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(43) + p.SetState(71) if !(p.Precpred(p.GetParserRuleContext(), 9)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", "")) } { - p.SetState(44) + p.SetState(72) var _lt = p.GetTokenStream().LT(1) @@ -1982,7 +2265,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(45) + p.SetState(73) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -1993,7 +2276,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(46) + p.SetState(74) var _lt = p.GetTokenStream().LT(1) @@ -2011,20 +2294,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(47) + p.SetState(75) p.expr(10) } case 7: localctx = NewRelationalContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(48) + p.SetState(76) if !(p.Precpred(p.GetParserRuleContext(), 8)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", "")) } { - p.SetState(49) + p.SetState(77) var _lt = p.GetTokenStream().LT(1) @@ -2042,20 +2325,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(50) + p.SetState(78) p.expr(9) } case 8: localctx = NewEqualityContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(51) + p.SetState(79) if !(p.Precpred(p.GetParserRuleContext(), 7)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) } { - p.SetState(52) + p.SetState(80) var _lt = p.GetTokenStream().LT(1) @@ -2073,122 +2356,122 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(53) + p.SetState(81) p.expr(8) } case 9: localctx = NewBitAndContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(54) + p.SetState(82) if !(p.Precpred(p.GetParserRuleContext(), 6)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) } { - p.SetState(55) + p.SetState(83) p.Match(PlanParserBAND) } { - p.SetState(56) + p.SetState(84) p.expr(7) } case 10: localctx = NewBitXorContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(57) + p.SetState(85) if !(p.Precpred(p.GetParserRuleContext(), 5)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) } { - p.SetState(58) + p.SetState(86) p.Match(PlanParserBXOR) } { - p.SetState(59) + p.SetState(87) p.expr(6) } case 11: localctx = NewBitOrContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(60) + p.SetState(88) if !(p.Precpred(p.GetParserRuleContext(), 4)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) } { - p.SetState(61) + p.SetState(89) p.Match(PlanParserBOR) } { - p.SetState(62) + p.SetState(90) p.expr(5) } case 12: localctx = NewLogicalAndContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(63) + p.SetState(91) if !(p.Precpred(p.GetParserRuleContext(), 3)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) } { - p.SetState(64) + p.SetState(92) p.Match(PlanParserAND) } { - p.SetState(65) + p.SetState(93) p.expr(4) } case 13: localctx = NewLogicalOrContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(66) + p.SetState(94) if !(p.Precpred(p.GetParserRuleContext(), 2)) { panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) } { - p.SetState(67) + p.SetState(95) p.Match(PlanParserOR) } { - p.SetState(68) + p.SetState(96) p.expr(3) } case 14: localctx = NewLikeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(69) + p.SetState(97) - if !(p.Precpred(p.GetParserRuleContext(), 19)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 21)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 21)", "")) } { - p.SetState(70) + p.SetState(98) p.Match(PlanParserLIKE) } { - p.SetState(71) + p.SetState(99) p.Match(PlanParserStringLiteral) } case 15: localctx = NewTermContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(72) + p.SetState(100) - if !(p.Precpred(p.GetParserRuleContext(), 13)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 15)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) } { - p.SetState(73) + p.SetState(101) var _lt = p.GetTokenStream().LT(1) @@ -2207,59 +2490,59 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } { - p.SetState(74) + p.SetState(102) p.Match(PlanParserT__2) } { - p.SetState(75) + p.SetState(103) p.expr(0) } - p.SetState(80) + p.SetState(108) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { - p.SetState(76) + p.SetState(104) p.Match(PlanParserT__3) } { - p.SetState(77) + p.SetState(105) p.expr(0) } } - p.SetState(82) + p.SetState(110) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 1, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext()) } - p.SetState(84) + p.SetState(112) p.GetErrorHandler().Sync(p) _la = p.GetTokenStream().LA(1) if _la == PlanParserT__3 { { - p.SetState(83) + p.SetState(111) p.Match(PlanParserT__3) } } { - p.SetState(86) + p.SetState(114) p.Match(PlanParserT__4) } case 16: localctx = NewEmptyTermContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(88) + p.SetState(116) - if !(p.Precpred(p.GetParserRuleContext(), 12)) { - panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) + if !(p.Precpred(p.GetParserRuleContext(), 14)) { + panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) } { - p.SetState(89) + p.SetState(117) var _lt = p.GetTokenStream().LT(1) @@ -2277,16 +2560,16 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(90) + p.SetState(118) p.Match(PlanParserEmptyTerm) } } } - p.SetState(95) + p.SetState(123) p.GetErrorHandler().Sync(p) - _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext()) + _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 6, p.GetParserRuleContext()) } return localctx @@ -2309,16 +2592,16 @@ func (p *PlanParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex in func (p *PlanParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool { switch predIndex { case 0: - return p.Precpred(p.GetParserRuleContext(), 18) + return p.Precpred(p.GetParserRuleContext(), 20) case 1: - return p.Precpred(p.GetParserRuleContext(), 16) + return p.Precpred(p.GetParserRuleContext(), 18) case 2: - return p.Precpred(p.GetParserRuleContext(), 15) + return p.Precpred(p.GetParserRuleContext(), 17) case 3: - return p.Precpred(p.GetParserRuleContext(), 14) + return p.Precpred(p.GetParserRuleContext(), 16) case 4: return p.Precpred(p.GetParserRuleContext(), 10) @@ -2348,13 +2631,13 @@ func (p *PlanParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) boo return p.Precpred(p.GetParserRuleContext(), 2) case 13: - return p.Precpred(p.GetParserRuleContext(), 19) + return p.Precpred(p.GetParserRuleContext(), 21) case 14: - return p.Precpred(p.GetParserRuleContext(), 13) + return p.Precpred(p.GetParserRuleContext(), 15) case 15: - return p.Precpred(p.GetParserRuleContext(), 12) + return p.Precpred(p.GetParserRuleContext(), 14) default: panic("No predicate with index: " + fmt.Sprint(predIndex)) diff --git a/internal/parser/planparserv2/generated/plan_visitor.go b/internal/parser/planparserv2/generated/plan_visitor.go index f448646e6..cb7c5c764 100644 --- a/internal/parser/planparserv2/generated/plan_visitor.go +++ b/internal/parser/planparserv2/generated/plan_visitor.go @@ -19,6 +19,9 @@ type PlanVisitor interface { // Visit a parse tree produced by PlanParser#Floating. VisitFloating(ctx *FloatingContext) interface{} + // Visit a parse tree produced by PlanParser#JSONContainsAll. + VisitJSONContainsAll(ctx *JSONContainsAllContext) interface{} + // Visit a parse tree produced by PlanParser#LogicalOr. VisitLogicalOr(ctx *LogicalOrContext) interface{} @@ -70,6 +73,12 @@ type PlanVisitor interface { // Visit a parse tree produced by PlanParser#Integer. VisitInteger(ctx *IntegerContext) interface{} + // Visit a parse tree produced by PlanParser#Array. + VisitArray(ctx *ArrayContext) interface{} + + // Visit a parse tree produced by PlanParser#JSONContainsAny. + VisitJSONContainsAny(ctx *JSONContainsAnyContext) interface{} + // Visit a parse tree produced by PlanParser#BitXor. VisitBitXor(ctx *BitXorContext) interface{} diff --git a/internal/parser/planparserv2/parser_visitor.go b/internal/parser/planparserv2/parser_visitor.go index eb71684ee..6a5d21b93 100644 --- a/internal/parser/planparserv2/parser_visitor.go +++ b/internal/parser/planparserv2/parser_visitor.go @@ -961,6 +961,9 @@ func (v *ParserVisitor) getColumnInfoFromJSONIdentifier(identifier string) (*pla if (strings.HasPrefix(path, "\"") && strings.HasSuffix(path, "\"")) || (strings.HasPrefix(path, "'") && strings.HasSuffix(path, "'")) { path = path[1 : len(path)-1] + if path == "" { + return nil, fmt.Errorf("invalid identifier: %s", identifier) + } } else if _, err := strconv.ParseInt(path, 10, 64); err != nil { return nil, fmt.Errorf("json key must be enclosed in double quotes or single quotes: \"%s\"", path) } @@ -1052,14 +1055,142 @@ func (v *ParserVisitor) VisitJSONContains(ctx *parser.JSONContainsContext) inter "json_contains operation are only supported explicitly specified element, got: %s", ctx.Expr(1).GetText()) } - values := make([]*planpb.GenericValue, 1) - values[0] = elementValue + elements := make([]*planpb.GenericValue, 1) + elements[0] = elementValue + expr := &planpb.Expr{ - Expr: &planpb.Expr_TermExpr{ - TermExpr: &planpb.TermExpr{ - ColumnInfo: columnInfo, - Values: values, - IsInField: true, + Expr: &planpb.Expr_JsonContainsExpr{ + JsonContainsExpr: &planpb.JSONContainsExpr{ + ColumnInfo: columnInfo, + Elements: elements, + Op: planpb.JSONContainsExpr_Contains, + ElementsSameType: true, + }, + }, + } + return &ExprWithType{ + expr: expr, + dataType: schemapb.DataType_Bool, + } +} + +func (v *ParserVisitor) VisitArray(ctx *parser.ArrayContext) interface{} { + allExpr := ctx.AllExpr() + array := make([]*planpb.GenericValue, 0, len(allExpr)) + dType := schemapb.DataType_None + sameType := true + for i := 0; i < len(allExpr); i++ { + element := allExpr[i].Accept(v) + if err := getError(element); err != nil { + return err + } + elementValue := getGenericValue(element) + if elementValue == nil { + return fmt.Errorf("array element type must be generic value, but got: %s", allExpr[i].GetText()) + } + array = append(array, getGenericValue(element)) + + if dType == schemapb.DataType_None { + dType = element.(*ExprWithType).dataType + } else if dType != element.(*ExprWithType).dataType { + sameType = false + } + } + + return &ExprWithType{ + dataType: schemapb.DataType_Array, + expr: &planpb.Expr{ + Expr: &planpb.Expr_ValueExpr{ + ValueExpr: &planpb.ValueExpr{ + Value: &planpb.GenericValue{ + Val: &planpb.GenericValue_ArrayVal{ + ArrayVal: &planpb.Array{ + Array: array, + SameType: sameType, + }, + }, + }, + }, + }, + }, + } +} + +func (v *ParserVisitor) VisitJSONContainsAll(ctx *parser.JSONContainsAllContext) interface{} { + field := ctx.Expr(0).Accept(v) + if err := getError(field); err != nil { + return err + } + + columnInfo := toColumnInfo(field.(*ExprWithType)) + if columnInfo == nil || !typeutil.IsJSONType(columnInfo.GetDataType()) { + return fmt.Errorf( + "json_contains_all operation are only supported on json fields now, got: %s", ctx.Expr(0).GetText()) + } + + element := ctx.Expr(1).Accept(v) + if err := getError(element); err != nil { + return err + } + elementValue := getGenericValue(element) + if elementValue == nil { + return fmt.Errorf( + "json_contains_all operation are only supported explicitly specified element, got: %s", ctx.Expr(1).GetText()) + } + + if elementValue.GetArrayVal() == nil { + return fmt.Errorf("json_contains_all operation element must be an array") + } + + expr := &planpb.Expr{ + Expr: &planpb.Expr_JsonContainsExpr{ + JsonContainsExpr: &planpb.JSONContainsExpr{ + ColumnInfo: columnInfo, + Elements: elementValue.GetArrayVal().GetArray(), + Op: planpb.JSONContainsExpr_ContainsAll, + ElementsSameType: elementValue.GetArrayVal().GetSameType(), + }, + }, + } + return &ExprWithType{ + expr: expr, + dataType: schemapb.DataType_Bool, + } +} + +func (v *ParserVisitor) VisitJSONContainsAny(ctx *parser.JSONContainsAnyContext) interface{} { + field := ctx.Expr(0).Accept(v) + if err := getError(field); err != nil { + return err + } + + columnInfo := toColumnInfo(field.(*ExprWithType)) + if columnInfo == nil || !typeutil.IsJSONType(columnInfo.GetDataType()) { + return fmt.Errorf( + "json_contains_any operation are only supported on json fields now, got: %s", ctx.Expr(0).GetText()) + } + + element := ctx.Expr(1).Accept(v) + if err := getError(element); err != nil { + return err + } + elementValue := getGenericValue(element) + if elementValue == nil { + return fmt.Errorf( + "json_contains_any operation are only supported explicitly specified element, got: %s", ctx.Expr(1).GetText()) + } + + if elementValue.GetArrayVal() == nil { + return fmt.Errorf("json_contains_any operation element must be an array") + } + + expr := &planpb.Expr{ + Expr: &planpb.Expr_JsonContainsExpr{ + JsonContainsExpr: &planpb.JSONContainsExpr{ + ColumnInfo: columnInfo, + Elements: elementValue.GetArrayVal().GetArray(), + Op: planpb.JSONContainsExpr_ContainsAny, + ElementsSameType: elementValue.GetArrayVal().GetSameType(), }, }, } diff --git a/internal/parser/planparserv2/plan_parser_v2_test.go b/internal/parser/planparserv2/plan_parser_v2_test.go index 7e2cfc27a..6fb59a430 100644 --- a/internal/parser/planparserv2/plan_parser_v2_test.go +++ b/internal/parser/planparserv2/plan_parser_v2_test.go @@ -1293,7 +1293,7 @@ func Test_JSONContains(t *testing.T) { RoundDecimal: 0, }) assert.NoError(t, err) - assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetTermExpr()) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) expr = `not json_contains(A, 10)` plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ @@ -1313,7 +1313,7 @@ func Test_JSONContains(t *testing.T) { RoundDecimal: 0, }) assert.NoError(t, err) - assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetTermExpr()) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) expr = `not json_contains(A, 10.5)` plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ @@ -1333,7 +1333,7 @@ func Test_JSONContains(t *testing.T) { RoundDecimal: 0, }) assert.NoError(t, err) - assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetTermExpr()) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) expr = `not json_contains(A, "10")` plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ @@ -1353,7 +1353,7 @@ func Test_JSONContains(t *testing.T) { RoundDecimal: 0, }) assert.NoError(t, err) - assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetTermExpr()) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) expr = `not json_contains($meta["A"], 10)` plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ @@ -1373,7 +1373,7 @@ func Test_JSONContains(t *testing.T) { RoundDecimal: 0, }) assert.NoError(t, err) - assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetTermExpr()) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) expr = `not json_contains(JSONField["x"], 5)` plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ @@ -1393,7 +1393,17 @@ func Test_JSONContains(t *testing.T) { RoundDecimal: 0, }) assert.NoError(t, err) - assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetTermExpr()) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) + + expr = `json_contains(A, [1,2,3])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.NoError(t, err) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) } func Test_InvalidJSONContains(t *testing.T) { @@ -1445,15 +1455,6 @@ func Test_InvalidJSONContains(t *testing.T) { }) assert.Error(t, err) - expr = `json_contains(A, [1,2,3])` - _, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ - Topk: 0, - MetricType: "", - SearchParams: "", - RoundDecimal: 0, - }) - assert.Error(t, err) - expr = `json_contains($meta, 1)` _, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ Topk: 0, @@ -1685,3 +1686,252 @@ func Test_isEmptyExpression(t *testing.T) { }) } } + +func Test_JSONContainsAll(t *testing.T) { + schema := newTestSchema() + expr := "" + var err error + var plan *planpb.PlanNode + + expr = `json_contains_all(A, [1,2,3])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.NoError(t, err) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) + assert.Equal(t, planpb.JSONContainsExpr_ContainsAll, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetOp()) + assert.True(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetElementsSameType()) + + expr = `json_contains_all(A, [1,"2",3.0])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.NoError(t, err) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) + assert.Equal(t, planpb.JSONContainsExpr_ContainsAll, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetOp()) + assert.False(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetElementsSameType()) + + expr = `JSON_CONTAINS_ALL(A, [1,"2",3.0])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.NoError(t, err) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) + assert.Equal(t, planpb.JSONContainsExpr_ContainsAll, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetOp()) + assert.False(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetElementsSameType()) +} + +func Test_InvalidJSONContainsAll(t *testing.T) { + schema := newTestSchema() + expr := "" + var err error + var plan *planpb.PlanNode + + expr = `JSON_CONTAINS_ALL(A, 1)` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ALL(A, [abc])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ALL(A, [2>a])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ALL(A, [2>>a])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ALL(A[""], [1,2,3])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ALL(Int64Field, [1,2,3])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ALL(A, B)` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) +} + +func Test_JSONContainsAny(t *testing.T) { + schema := newTestSchema() + expr := "" + var err error + var plan *planpb.PlanNode + + expr = `json_contains_any(A, [1,2,3])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.NoError(t, err) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) + assert.Equal(t, planpb.JSONContainsExpr_ContainsAny, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetOp()) + assert.True(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetElementsSameType()) + + expr = `json_contains_any(A, [1,"2",3.0])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.NoError(t, err) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) + assert.Equal(t, planpb.JSONContainsExpr_ContainsAny, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetOp()) + assert.False(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetElementsSameType()) + + expr = `JSON_CONTAINS_ANY(A, [1,"2",3.0])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.NoError(t, err) + assert.NotNil(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr()) + assert.Equal(t, planpb.JSONContainsExpr_ContainsAny, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetOp()) + assert.False(t, plan.GetVectorAnns().GetPredicates().GetJsonContainsExpr().GetElementsSameType()) + + expr = `JSON_CONTAINS_ANY(A, 1)` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) +} + +func Test_InvalidJSONContainsAny(t *testing.T) { + schema := newTestSchema() + expr := "" + var err error + var plan *planpb.PlanNode + + expr = `JSON_CONTAINS_ANY(A, 1)` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ANY(A, [abc])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ANY(A, [2>a])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ANY(A, [2>>a])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ANY(A[""], [1,2,3])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ANY(Int64Field, [1,2,3])` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) + + expr = `JSON_CONTAINS_ANY(A, B)` + plan, err = CreateSearchPlan(schema, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }) + assert.Error(t, err) + assert.Nil(t, plan) +} diff --git a/internal/proto/plan.proto b/internal/proto/plan.proto index 0cb60d631..1521385c6 100644 --- a/internal/proto/plan.proto +++ b/internal/proto/plan.proto @@ -35,9 +35,15 @@ message GenericValue { int64 int64_val = 2; double float_val = 3; string string_val = 4; + Array array_val = 5; }; } +message Array { + repeated GenericValue array = 1; + bool same_type = 2; +} + message QueryInfo { int64 topk = 1; string metric_type = 3; @@ -92,6 +98,23 @@ message TermExpr { bool is_in_field = 3; } +message JSONContainsExpr { + ColumnInfo column_info = 1; + repeated GenericValue elements = 2; + // 0: invalid + // 1: json_contains + // 2: json_contains_all + // 3: json_contains_any + enum JSONOp { + Invalid = 0; + Contains = 1; + ContainsAll = 2; + ContainsAny = 3; + } + JSONOp op = 3; + bool elements_same_type = 4; +} + message UnaryExpr { enum UnaryOp { Invalid = 0; @@ -148,6 +171,7 @@ message Expr { ColumnExpr column_expr = 10; ExistsExpr exists_expr = 11; AlwaysTrueExpr always_true_expr = 12; + JSONContainsExpr json_contains_expr = 13; }; } diff --git a/internal/proto/planpb/plan.pb.go b/internal/proto/planpb/plan.pb.go index 70a65dfca..ef132f284 100644 --- a/internal/proto/planpb/plan.pb.go +++ b/internal/proto/planpb/plan.pb.go @@ -116,6 +116,41 @@ func (ArithOpType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_2d655ab2f7683c23, []int{1} } +// 0: invalid +// 1: json_contains +// 2: json_contains_all +// 3: json_contains_any +type JSONContainsExpr_JSONOp int32 + +const ( + JSONContainsExpr_Invalid JSONContainsExpr_JSONOp = 0 + JSONContainsExpr_Contains JSONContainsExpr_JSONOp = 1 + JSONContainsExpr_ContainsAll JSONContainsExpr_JSONOp = 2 + JSONContainsExpr_ContainsAny JSONContainsExpr_JSONOp = 3 +) + +var JSONContainsExpr_JSONOp_name = map[int32]string{ + 0: "Invalid", + 1: "Contains", + 2: "ContainsAll", + 3: "ContainsAny", +} + +var JSONContainsExpr_JSONOp_value = map[string]int32{ + "Invalid": 0, + "Contains": 1, + "ContainsAll": 2, + "ContainsAny": 3, +} + +func (x JSONContainsExpr_JSONOp) String() string { + return proto.EnumName(JSONContainsExpr_JSONOp_name, int32(x)) +} + +func (JSONContainsExpr_JSONOp) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_2d655ab2f7683c23, []int{11, 0} +} + type UnaryExpr_UnaryOp int32 const ( @@ -138,7 +173,7 @@ func (x UnaryExpr_UnaryOp) String() string { } func (UnaryExpr_UnaryOp) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{10, 0} + return fileDescriptor_2d655ab2f7683c23, []int{12, 0} } type BinaryExpr_BinaryOp int32 @@ -166,7 +201,7 @@ func (x BinaryExpr_BinaryOp) String() string { } func (BinaryExpr_BinaryOp) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{11, 0} + return fileDescriptor_2d655ab2f7683c23, []int{13, 0} } type GenericValue struct { @@ -175,6 +210,7 @@ type GenericValue struct { // *GenericValue_Int64Val // *GenericValue_FloatVal // *GenericValue_StringVal + // *GenericValue_ArrayVal Val isGenericValue_Val `protobuf_oneof:"val"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -226,6 +262,10 @@ type GenericValue_StringVal struct { StringVal string `protobuf:"bytes,4,opt,name=string_val,json=stringVal,proto3,oneof"` } +type GenericValue_ArrayVal struct { + ArrayVal *Array `protobuf:"bytes,5,opt,name=array_val,json=arrayVal,proto3,oneof"` +} + func (*GenericValue_BoolVal) isGenericValue_Val() {} func (*GenericValue_Int64Val) isGenericValue_Val() {} @@ -234,6 +274,8 @@ func (*GenericValue_FloatVal) isGenericValue_Val() {} func (*GenericValue_StringVal) isGenericValue_Val() {} +func (*GenericValue_ArrayVal) isGenericValue_Val() {} + func (m *GenericValue) GetVal() isGenericValue_Val { if m != nil { return m.Val @@ -269,6 +311,13 @@ func (m *GenericValue) GetStringVal() string { return "" } +func (m *GenericValue) GetArrayVal() *Array { + if x, ok := m.GetVal().(*GenericValue_ArrayVal); ok { + return x.ArrayVal + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*GenericValue) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -276,7 +325,55 @@ func (*GenericValue) XXX_OneofWrappers() []interface{} { (*GenericValue_Int64Val)(nil), (*GenericValue_FloatVal)(nil), (*GenericValue_StringVal)(nil), + (*GenericValue_ArrayVal)(nil), + } +} + +type Array struct { + Array []*GenericValue `protobuf:"bytes,1,rep,name=array,proto3" json:"array,omitempty"` + SameType bool `protobuf:"varint,2,opt,name=same_type,json=sameType,proto3" json:"same_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Array) Reset() { *m = Array{} } +func (m *Array) String() string { return proto.CompactTextString(m) } +func (*Array) ProtoMessage() {} +func (*Array) Descriptor() ([]byte, []int) { + return fileDescriptor_2d655ab2f7683c23, []int{1} +} + +func (m *Array) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Array.Unmarshal(m, b) +} +func (m *Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Array.Marshal(b, m, deterministic) +} +func (m *Array) XXX_Merge(src proto.Message) { + xxx_messageInfo_Array.Merge(m, src) +} +func (m *Array) XXX_Size() int { + return xxx_messageInfo_Array.Size(m) +} +func (m *Array) XXX_DiscardUnknown() { + xxx_messageInfo_Array.DiscardUnknown(m) +} + +var xxx_messageInfo_Array proto.InternalMessageInfo + +func (m *Array) GetArray() []*GenericValue { + if m != nil { + return m.Array + } + return nil +} + +func (m *Array) GetSameType() bool { + if m != nil { + return m.SameType } + return false } type QueryInfo struct { @@ -293,7 +390,7 @@ func (m *QueryInfo) Reset() { *m = QueryInfo{} } func (m *QueryInfo) String() string { return proto.CompactTextString(m) } func (*QueryInfo) ProtoMessage() {} func (*QueryInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{1} + return fileDescriptor_2d655ab2f7683c23, []int{2} } func (m *QueryInfo) XXX_Unmarshal(b []byte) error { @@ -358,7 +455,7 @@ func (m *ColumnInfo) Reset() { *m = ColumnInfo{} } func (m *ColumnInfo) String() string { return proto.CompactTextString(m) } func (*ColumnInfo) ProtoMessage() {} func (*ColumnInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{2} + return fileDescriptor_2d655ab2f7683c23, []int{3} } func (m *ColumnInfo) XXX_Unmarshal(b []byte) error { @@ -432,7 +529,7 @@ func (m *ColumnExpr) Reset() { *m = ColumnExpr{} } func (m *ColumnExpr) String() string { return proto.CompactTextString(m) } func (*ColumnExpr) ProtoMessage() {} func (*ColumnExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{3} + return fileDescriptor_2d655ab2f7683c23, []int{4} } func (m *ColumnExpr) XXX_Unmarshal(b []byte) error { @@ -471,7 +568,7 @@ func (m *ExistsExpr) Reset() { *m = ExistsExpr{} } func (m *ExistsExpr) String() string { return proto.CompactTextString(m) } func (*ExistsExpr) ProtoMessage() {} func (*ExistsExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{4} + return fileDescriptor_2d655ab2f7683c23, []int{5} } func (m *ExistsExpr) XXX_Unmarshal(b []byte) error { @@ -510,7 +607,7 @@ func (m *ValueExpr) Reset() { *m = ValueExpr{} } func (m *ValueExpr) String() string { return proto.CompactTextString(m) } func (*ValueExpr) ProtoMessage() {} func (*ValueExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{5} + return fileDescriptor_2d655ab2f7683c23, []int{6} } func (m *ValueExpr) XXX_Unmarshal(b []byte) error { @@ -551,7 +648,7 @@ func (m *UnaryRangeExpr) Reset() { *m = UnaryRangeExpr{} } func (m *UnaryRangeExpr) String() string { return proto.CompactTextString(m) } func (*UnaryRangeExpr) ProtoMessage() {} func (*UnaryRangeExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{6} + return fileDescriptor_2d655ab2f7683c23, []int{7} } func (m *UnaryRangeExpr) XXX_Unmarshal(b []byte) error { @@ -608,7 +705,7 @@ func (m *BinaryRangeExpr) Reset() { *m = BinaryRangeExpr{} } func (m *BinaryRangeExpr) String() string { return proto.CompactTextString(m) } func (*BinaryRangeExpr) ProtoMessage() {} func (*BinaryRangeExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{7} + return fileDescriptor_2d655ab2f7683c23, []int{8} } func (m *BinaryRangeExpr) XXX_Unmarshal(b []byte) error { @@ -677,7 +774,7 @@ func (m *CompareExpr) Reset() { *m = CompareExpr{} } func (m *CompareExpr) String() string { return proto.CompactTextString(m) } func (*CompareExpr) ProtoMessage() {} func (*CompareExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{8} + return fileDescriptor_2d655ab2f7683c23, []int{9} } func (m *CompareExpr) XXX_Unmarshal(b []byte) error { @@ -732,7 +829,7 @@ func (m *TermExpr) Reset() { *m = TermExpr{} } func (m *TermExpr) String() string { return proto.CompactTextString(m) } func (*TermExpr) ProtoMessage() {} func (*TermExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{9} + return fileDescriptor_2d655ab2f7683c23, []int{10} } func (m *TermExpr) XXX_Unmarshal(b []byte) error { @@ -774,6 +871,69 @@ func (m *TermExpr) GetIsInField() bool { return false } +type JSONContainsExpr struct { + ColumnInfo *ColumnInfo `protobuf:"bytes,1,opt,name=column_info,json=columnInfo,proto3" json:"column_info,omitempty"` + Elements []*GenericValue `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"` + Op JSONContainsExpr_JSONOp `protobuf:"varint,3,opt,name=op,proto3,enum=milvus.proto.plan.JSONContainsExpr_JSONOp" json:"op,omitempty"` + ElementsSameType bool `protobuf:"varint,4,opt,name=elements_same_type,json=elementsSameType,proto3" json:"elements_same_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JSONContainsExpr) Reset() { *m = JSONContainsExpr{} } +func (m *JSONContainsExpr) String() string { return proto.CompactTextString(m) } +func (*JSONContainsExpr) ProtoMessage() {} +func (*JSONContainsExpr) Descriptor() ([]byte, []int) { + return fileDescriptor_2d655ab2f7683c23, []int{11} +} + +func (m *JSONContainsExpr) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JSONContainsExpr.Unmarshal(m, b) +} +func (m *JSONContainsExpr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JSONContainsExpr.Marshal(b, m, deterministic) +} +func (m *JSONContainsExpr) XXX_Merge(src proto.Message) { + xxx_messageInfo_JSONContainsExpr.Merge(m, src) +} +func (m *JSONContainsExpr) XXX_Size() int { + return xxx_messageInfo_JSONContainsExpr.Size(m) +} +func (m *JSONContainsExpr) XXX_DiscardUnknown() { + xxx_messageInfo_JSONContainsExpr.DiscardUnknown(m) +} + +var xxx_messageInfo_JSONContainsExpr proto.InternalMessageInfo + +func (m *JSONContainsExpr) GetColumnInfo() *ColumnInfo { + if m != nil { + return m.ColumnInfo + } + return nil +} + +func (m *JSONContainsExpr) GetElements() []*GenericValue { + if m != nil { + return m.Elements + } + return nil +} + +func (m *JSONContainsExpr) GetOp() JSONContainsExpr_JSONOp { + if m != nil { + return m.Op + } + return JSONContainsExpr_Invalid +} + +func (m *JSONContainsExpr) GetElementsSameType() bool { + if m != nil { + return m.ElementsSameType + } + return false +} + type UnaryExpr struct { Op UnaryExpr_UnaryOp `protobuf:"varint,1,opt,name=op,proto3,enum=milvus.proto.plan.UnaryExpr_UnaryOp" json:"op,omitempty"` Child *Expr `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` @@ -786,7 +946,7 @@ func (m *UnaryExpr) Reset() { *m = UnaryExpr{} } func (m *UnaryExpr) String() string { return proto.CompactTextString(m) } func (*UnaryExpr) ProtoMessage() {} func (*UnaryExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{10} + return fileDescriptor_2d655ab2f7683c23, []int{12} } func (m *UnaryExpr) XXX_Unmarshal(b []byte) error { @@ -834,7 +994,7 @@ func (m *BinaryExpr) Reset() { *m = BinaryExpr{} } func (m *BinaryExpr) String() string { return proto.CompactTextString(m) } func (*BinaryExpr) ProtoMessage() {} func (*BinaryExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{11} + return fileDescriptor_2d655ab2f7683c23, []int{13} } func (m *BinaryExpr) XXX_Unmarshal(b []byte) error { @@ -889,7 +1049,7 @@ func (m *BinaryArithOp) Reset() { *m = BinaryArithOp{} } func (m *BinaryArithOp) String() string { return proto.CompactTextString(m) } func (*BinaryArithOp) ProtoMessage() {} func (*BinaryArithOp) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{12} + return fileDescriptor_2d655ab2f7683c23, []int{14} } func (m *BinaryArithOp) XXX_Unmarshal(b []byte) error { @@ -944,7 +1104,7 @@ func (m *BinaryArithExpr) Reset() { *m = BinaryArithExpr{} } func (m *BinaryArithExpr) String() string { return proto.CompactTextString(m) } func (*BinaryArithExpr) ProtoMessage() {} func (*BinaryArithExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{13} + return fileDescriptor_2d655ab2f7683c23, []int{15} } func (m *BinaryArithExpr) XXX_Unmarshal(b []byte) error { @@ -1001,7 +1161,7 @@ func (m *BinaryArithOpEvalRangeExpr) Reset() { *m = BinaryArithOpEvalRan func (m *BinaryArithOpEvalRangeExpr) String() string { return proto.CompactTextString(m) } func (*BinaryArithOpEvalRangeExpr) ProtoMessage() {} func (*BinaryArithOpEvalRangeExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{14} + return fileDescriptor_2d655ab2f7683c23, []int{16} } func (m *BinaryArithOpEvalRangeExpr) XXX_Unmarshal(b []byte) error { @@ -1067,7 +1227,7 @@ func (m *AlwaysTrueExpr) Reset() { *m = AlwaysTrueExpr{} } func (m *AlwaysTrueExpr) String() string { return proto.CompactTextString(m) } func (*AlwaysTrueExpr) ProtoMessage() {} func (*AlwaysTrueExpr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{15} + return fileDescriptor_2d655ab2f7683c23, []int{17} } func (m *AlwaysTrueExpr) XXX_Unmarshal(b []byte) error { @@ -1102,6 +1262,7 @@ type Expr struct { // *Expr_ColumnExpr // *Expr_ExistsExpr // *Expr_AlwaysTrueExpr + // *Expr_JsonContainsExpr Expr isExpr_Expr `protobuf_oneof:"expr"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1112,7 +1273,7 @@ func (m *Expr) Reset() { *m = Expr{} } func (m *Expr) String() string { return proto.CompactTextString(m) } func (*Expr) ProtoMessage() {} func (*Expr) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{16} + return fileDescriptor_2d655ab2f7683c23, []int{18} } func (m *Expr) XXX_Unmarshal(b []byte) error { @@ -1185,6 +1346,10 @@ type Expr_AlwaysTrueExpr struct { AlwaysTrueExpr *AlwaysTrueExpr `protobuf:"bytes,12,opt,name=always_true_expr,json=alwaysTrueExpr,proto3,oneof"` } +type Expr_JsonContainsExpr struct { + JsonContainsExpr *JSONContainsExpr `protobuf:"bytes,13,opt,name=json_contains_expr,json=jsonContainsExpr,proto3,oneof"` +} + func (*Expr_TermExpr) isExpr_Expr() {} func (*Expr_UnaryExpr) isExpr_Expr() {} @@ -1209,6 +1374,8 @@ func (*Expr_ExistsExpr) isExpr_Expr() {} func (*Expr_AlwaysTrueExpr) isExpr_Expr() {} +func (*Expr_JsonContainsExpr) isExpr_Expr() {} + func (m *Expr) GetExpr() isExpr_Expr { if m != nil { return m.Expr @@ -1300,6 +1467,13 @@ func (m *Expr) GetAlwaysTrueExpr() *AlwaysTrueExpr { return nil } +func (m *Expr) GetJsonContainsExpr() *JSONContainsExpr { + if x, ok := m.GetExpr().(*Expr_JsonContainsExpr); ok { + return x.JsonContainsExpr + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Expr) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1315,6 +1489,7 @@ func (*Expr) XXX_OneofWrappers() []interface{} { (*Expr_ColumnExpr)(nil), (*Expr_ExistsExpr)(nil), (*Expr_AlwaysTrueExpr)(nil), + (*Expr_JsonContainsExpr)(nil), } } @@ -1333,7 +1508,7 @@ func (m *VectorANNS) Reset() { *m = VectorANNS{} } func (m *VectorANNS) String() string { return proto.CompactTextString(m) } func (*VectorANNS) ProtoMessage() {} func (*VectorANNS) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{17} + return fileDescriptor_2d655ab2f7683c23, []int{19} } func (m *VectorANNS) XXX_Unmarshal(b []byte) error { @@ -1402,7 +1577,7 @@ func (m *QueryPlanNode) Reset() { *m = QueryPlanNode{} } func (m *QueryPlanNode) String() string { return proto.CompactTextString(m) } func (*QueryPlanNode) ProtoMessage() {} func (*QueryPlanNode) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{18} + return fileDescriptor_2d655ab2f7683c23, []int{20} } func (m *QueryPlanNode) XXX_Unmarshal(b []byte) error { @@ -1460,7 +1635,7 @@ func (m *PlanNode) Reset() { *m = PlanNode{} } func (m *PlanNode) String() string { return proto.CompactTextString(m) } func (*PlanNode) ProtoMessage() {} func (*PlanNode) Descriptor() ([]byte, []int) { - return fileDescriptor_2d655ab2f7683c23, []int{19} + return fileDescriptor_2d655ab2f7683c23, []int{21} } func (m *PlanNode) XXX_Unmarshal(b []byte) error { @@ -1550,9 +1725,11 @@ func (*PlanNode) XXX_OneofWrappers() []interface{} { func init() { proto.RegisterEnum("milvus.proto.plan.OpType", OpType_name, OpType_value) proto.RegisterEnum("milvus.proto.plan.ArithOpType", ArithOpType_name, ArithOpType_value) + proto.RegisterEnum("milvus.proto.plan.JSONContainsExpr_JSONOp", JSONContainsExpr_JSONOp_name, JSONContainsExpr_JSONOp_value) proto.RegisterEnum("milvus.proto.plan.UnaryExpr_UnaryOp", UnaryExpr_UnaryOp_name, UnaryExpr_UnaryOp_value) proto.RegisterEnum("milvus.proto.plan.BinaryExpr_BinaryOp", BinaryExpr_BinaryOp_name, BinaryExpr_BinaryOp_value) proto.RegisterType((*GenericValue)(nil), "milvus.proto.plan.GenericValue") + proto.RegisterType((*Array)(nil), "milvus.proto.plan.Array") proto.RegisterType((*QueryInfo)(nil), "milvus.proto.plan.QueryInfo") proto.RegisterType((*ColumnInfo)(nil), "milvus.proto.plan.ColumnInfo") proto.RegisterType((*ColumnExpr)(nil), "milvus.proto.plan.ColumnExpr") @@ -1562,6 +1739,7 @@ func init() { proto.RegisterType((*BinaryRangeExpr)(nil), "milvus.proto.plan.BinaryRangeExpr") proto.RegisterType((*CompareExpr)(nil), "milvus.proto.plan.CompareExpr") proto.RegisterType((*TermExpr)(nil), "milvus.proto.plan.TermExpr") + proto.RegisterType((*JSONContainsExpr)(nil), "milvus.proto.plan.JSONContainsExpr") proto.RegisterType((*UnaryExpr)(nil), "milvus.proto.plan.UnaryExpr") proto.RegisterType((*BinaryExpr)(nil), "milvus.proto.plan.BinaryExpr") proto.RegisterType((*BinaryArithOp)(nil), "milvus.proto.plan.BinaryArithOp") @@ -1577,105 +1755,116 @@ func init() { func init() { proto.RegisterFile("plan.proto", fileDescriptor_2d655ab2f7683c23) } var fileDescriptor_2d655ab2f7683c23 = []byte{ - // 1591 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x4f, 0x93, 0xe3, 0x46, - 0x15, 0xb7, 0x2c, 0x7b, 0x2c, 0x3d, 0x79, 0x3c, 0x5a, 0x15, 0x55, 0xec, 0x1f, 0xb2, 0x33, 0x88, - 0x14, 0x19, 0x42, 0xed, 0x6c, 0x85, 0x84, 0x0d, 0x09, 0x15, 0x98, 0x7f, 0x9b, 0xb5, 0x2b, 0xd9, - 0x19, 0xa3, 0x4c, 0xf6, 0xc0, 0x45, 0xd5, 0x96, 0x7a, 0xc6, 0x5d, 0x2b, 0x77, 0x6b, 0x5b, 0x2d, - 0xef, 0xfa, 0x2b, 0xc0, 0x89, 0x0f, 0xc0, 0x89, 0x03, 0x77, 0x8e, 0x5c, 0xf8, 0x02, 0x1c, 0x38, - 0x72, 0xe7, 0x13, 0x50, 0x7c, 0x01, 0xaa, 0x5f, 0xcb, 0xff, 0xa6, 0xec, 0x1d, 0x0f, 0x6c, 0x55, - 0x6e, 0xdd, 0xaf, 0xfb, 0xfd, 0xde, 0xff, 0xd7, 0xaf, 0x01, 0xf2, 0x8c, 0xf0, 0x83, 0x5c, 0x0a, - 0x25, 0x82, 0x3b, 0x23, 0x96, 0x8d, 0xcb, 0xc2, 0xec, 0x0e, 0xf4, 0xc1, 0xfd, 0x76, 0x91, 0x0c, - 0xe9, 0x88, 0x18, 0x52, 0xf8, 0x07, 0x0b, 0xda, 0xcf, 0x28, 0xa7, 0x92, 0x25, 0x2f, 0x48, 0x56, - 0xd2, 0xe0, 0x01, 0x38, 0x03, 0x21, 0xb2, 0x78, 0x4c, 0xb2, 0xbb, 0xd6, 0x9e, 0xb5, 0xef, 0x74, - 0x6b, 0x51, 0x4b, 0x53, 0x5e, 0x90, 0x2c, 0x78, 0x0f, 0x5c, 0xc6, 0xd5, 0x93, 0x4f, 0xf0, 0xb4, - 0xbe, 0x67, 0xed, 0xdb, 0xdd, 0x5a, 0xe4, 0x20, 0xa9, 0x3a, 0xbe, 0xcc, 0x04, 0x51, 0x78, 0x6c, - 0xef, 0x59, 0xfb, 0x96, 0x3e, 0x46, 0x92, 0x3e, 0xde, 0x05, 0x28, 0x94, 0x64, 0xfc, 0x0a, 0xcf, - 0x1b, 0x7b, 0xd6, 0xbe, 0xdb, 0xad, 0x45, 0xae, 0xa1, 0xbd, 0x20, 0xd9, 0x71, 0x13, 0xec, 0x31, - 0xc9, 0xc2, 0xdf, 0x59, 0xe0, 0xfe, 0xa6, 0xa4, 0x72, 0xd2, 0xe3, 0x97, 0x22, 0x08, 0xa0, 0xa1, - 0x44, 0xfe, 0x12, 0x95, 0xb1, 0x23, 0x5c, 0x07, 0xbb, 0xe0, 0x8d, 0xa8, 0x92, 0x2c, 0x89, 0xd5, - 0x24, 0xa7, 0x28, 0xca, 0x8d, 0xc0, 0x90, 0x2e, 0x26, 0x39, 0x0d, 0x7e, 0x04, 0xdb, 0x05, 0x25, - 0x32, 0x19, 0xc6, 0x39, 0x91, 0x64, 0x54, 0x18, 0x69, 0x51, 0xdb, 0x10, 0xfb, 0x48, 0xd3, 0x97, - 0xa4, 0x28, 0x79, 0x1a, 0xa7, 0x34, 0x61, 0x23, 0x92, 0xdd, 0x6d, 0xa2, 0x88, 0x36, 0x12, 0x4f, - 0x0d, 0x2d, 0xfc, 0xb7, 0x05, 0x70, 0x22, 0xb2, 0x72, 0xc4, 0x51, 0x9b, 0x7b, 0xe0, 0x5c, 0x32, - 0x9a, 0xa5, 0x31, 0x4b, 0x2b, 0x8d, 0x5a, 0xb8, 0xef, 0xa5, 0xc1, 0xe7, 0xe0, 0xa6, 0x44, 0x11, - 0xa3, 0x92, 0x76, 0x4e, 0xe7, 0x67, 0xef, 0x1d, 0x2c, 0xf9, 0xbf, 0xf2, 0xfc, 0x29, 0x51, 0x44, - 0x6b, 0x19, 0x39, 0x69, 0xb5, 0x0a, 0xde, 0x87, 0x0e, 0x2b, 0xe2, 0x5c, 0xb2, 0x11, 0x91, 0x93, - 0xf8, 0x25, 0x9d, 0xa0, 0x4d, 0x4e, 0xd4, 0x66, 0x45, 0xdf, 0x10, 0xbf, 0xa2, 0x93, 0xe0, 0x01, - 0xb8, 0xac, 0x88, 0x49, 0xa9, 0x44, 0xef, 0x14, 0x2d, 0x72, 0x22, 0x87, 0x15, 0x47, 0xb8, 0xd7, - 0x3e, 0xe1, 0xb4, 0x50, 0x34, 0x8d, 0x73, 0xa2, 0x86, 0x77, 0x9b, 0x7b, 0xb6, 0xf6, 0x89, 0x21, - 0xf5, 0x89, 0x1a, 0x06, 0xfb, 0xe0, 0x6b, 0x19, 0x44, 0x2a, 0xa6, 0x98, 0xe0, 0x28, 0x65, 0x0b, - 0x41, 0x3a, 0xac, 0xe8, 0x4f, 0xc9, 0x5f, 0xd1, 0x49, 0xf8, 0xeb, 0xa9, 0xc9, 0x4f, 0xdf, 0xe4, - 0x32, 0xf8, 0x08, 0x1a, 0x8c, 0x5f, 0x0a, 0x34, 0xd7, 0xbb, 0x6e, 0x12, 0xe6, 0xda, 0xdc, 0x3f, - 0x11, 0x5e, 0xd5, 0x00, 0x4f, 0xdf, 0xb0, 0x42, 0x15, 0xff, 0x2b, 0xc0, 0x31, 0xb8, 0x98, 0x8e, - 0xc8, 0xff, 0x73, 0x68, 0x8e, 0xf5, 0xa6, 0x02, 0xd8, 0x5d, 0x01, 0xb0, 0x98, 0xc2, 0x91, 0xb9, - 0x1d, 0xfe, 0xc5, 0x82, 0xce, 0xb7, 0x9c, 0xc8, 0x49, 0x44, 0xf8, 0x95, 0x41, 0xfa, 0x15, 0x78, - 0x09, 0x8a, 0x8a, 0x37, 0x57, 0x08, 0x92, 0x79, 0xf4, 0x7f, 0x02, 0x75, 0x91, 0x57, 0xb1, 0xbd, - 0xb7, 0x82, 0xed, 0x3c, 0xc7, 0xb8, 0xd6, 0x45, 0x3e, 0x57, 0xda, 0xbe, 0x95, 0xd2, 0x7f, 0xae, - 0xc3, 0xce, 0x31, 0x7b, 0xb7, 0x5a, 0x7f, 0x00, 0x3b, 0x99, 0x78, 0x4d, 0x65, 0xcc, 0x78, 0x92, - 0x95, 0x05, 0x1b, 0x9b, 0xf4, 0x74, 0xa2, 0x0e, 0x92, 0x7b, 0x53, 0xaa, 0xbe, 0x58, 0xe6, 0xf9, - 0xd2, 0x45, 0x93, 0x86, 0x1d, 0x24, 0xcf, 0x2f, 0x1e, 0x82, 0x67, 0x10, 0x8d, 0x89, 0x8d, 0xcd, - 0x4c, 0x04, 0xe4, 0x31, 0x6d, 0xe6, 0x10, 0x3c, 0x23, 0xca, 0x20, 0x34, 0x37, 0x44, 0x40, 0x1e, - 0x5c, 0x87, 0x7f, 0xb7, 0xc0, 0x3b, 0x11, 0xa3, 0x9c, 0x48, 0xe3, 0xa5, 0x67, 0xe0, 0x67, 0xf4, - 0x52, 0xc5, 0xb7, 0x76, 0x55, 0x47, 0xb3, 0x2d, 0x94, 0x78, 0x0f, 0xee, 0x48, 0x76, 0x35, 0x5c, - 0x46, 0xaa, 0x6f, 0x82, 0xb4, 0x83, 0x7c, 0x27, 0xd7, 0xf3, 0xc5, 0xde, 0x20, 0x5f, 0xc2, 0x3f, - 0x59, 0xe0, 0x5c, 0x50, 0x39, 0x7a, 0x27, 0x11, 0xff, 0x14, 0xb6, 0xd0, 0xaf, 0xc5, 0xdd, 0xfa, - 0x9e, 0xbd, 0x89, 0x63, 0xab, 0xeb, 0xc1, 0x43, 0xf0, 0x58, 0x11, 0x33, 0x1e, 0x63, 0x53, 0xab, - 0xa2, 0xef, 0xb2, 0xa2, 0xc7, 0xbf, 0xd4, 0x04, 0xfd, 0x5c, 0xb8, 0x58, 0x53, 0xa8, 0xe6, 0x27, - 0x68, 0x9e, 0x85, 0xe6, 0xbd, 0xbf, 0x42, 0xc4, 0xec, 0xa6, 0x59, 0x9d, 0xe7, 0x58, 0x19, 0x8f, - 0xa0, 0x99, 0x0c, 0x59, 0x96, 0x56, 0x3e, 0xfd, 0xfe, 0x0a, 0x46, 0xcd, 0x13, 0x99, 0x5b, 0xe1, - 0x2e, 0xb4, 0x2a, 0xee, 0xc0, 0x83, 0x56, 0x8f, 0x8f, 0x49, 0xc6, 0x52, 0xbf, 0x16, 0xb4, 0xc0, - 0x3e, 0x13, 0xca, 0xb7, 0xc2, 0x7f, 0x5a, 0x00, 0xa6, 0x64, 0x50, 0xa9, 0x27, 0x0b, 0x4a, 0xfd, - 0x78, 0x05, 0xf6, 0xfc, 0x6a, 0xb5, 0xac, 0xd4, 0xfa, 0x29, 0x34, 0x74, 0x22, 0xdc, 0xa4, 0x15, - 0x5e, 0xd2, 0x36, 0x60, 0xac, 0xab, 0xea, 0x5e, 0x6f, 0x03, 0xde, 0x0a, 0x9f, 0x80, 0x33, 0x95, - 0xb5, 0x6c, 0x44, 0x07, 0xe0, 0x6b, 0x71, 0xc5, 0x12, 0x92, 0x1d, 0xf1, 0xd4, 0xb7, 0x82, 0x6d, - 0x70, 0xab, 0xfd, 0xb9, 0xf4, 0xeb, 0xe1, 0x3f, 0x2c, 0xd8, 0x36, 0x8c, 0x47, 0x92, 0xa9, 0xe1, - 0x79, 0xfe, 0x7f, 0x67, 0xc6, 0x67, 0xe0, 0x10, 0x0d, 0x15, 0xcf, 0xfa, 0xd8, 0xc3, 0x15, 0xcc, - 0x95, 0x34, 0x4c, 0xce, 0x16, 0xa9, 0x44, 0x9f, 0xc2, 0xb6, 0xa9, 0x0b, 0x91, 0x53, 0x49, 0x78, - 0xba, 0x69, 0x67, 0x6b, 0x23, 0xd7, 0xb9, 0x61, 0x0a, 0xff, 0x68, 0x4d, 0x1b, 0x1c, 0x0a, 0xc1, - 0x90, 0x4d, 0x5d, 0x6f, 0xdd, 0xca, 0xf5, 0xf5, 0x4d, 0x5c, 0x1f, 0x1c, 0x2c, 0x94, 0xe0, 0x4d, - 0xa6, 0xea, 0x3a, 0xfc, 0x5b, 0x1d, 0xee, 0x2f, 0xb9, 0xfc, 0xe9, 0x98, 0x64, 0xef, 0xae, 0x17, - 0x7f, 0xd7, 0xfe, 0xaf, 0x5a, 0x52, 0xe3, 0x56, 0x4f, 0x58, 0xf3, 0x56, 0x4f, 0x98, 0x0f, 0x9d, - 0xa3, 0xec, 0x35, 0x99, 0x14, 0x17, 0xd2, 0x3c, 0xe0, 0xe1, 0xef, 0x5b, 0xd0, 0x40, 0xef, 0x7d, - 0x0e, 0xae, 0xa2, 0x72, 0x14, 0xd3, 0x37, 0xb9, 0xac, 0x7c, 0xf7, 0x60, 0x05, 0xea, 0xb4, 0x0f, - 0xea, 0xe9, 0x51, 0x4d, 0x7b, 0xe2, 0x17, 0x00, 0xa5, 0x0e, 0x8b, 0x61, 0x36, 0xc1, 0xff, 0xc1, - 0xdb, 0x9a, 0x8e, 0x9e, 0x2d, 0xcb, 0x59, 0x5b, 0x38, 0x04, 0x6f, 0xc0, 0xe6, 0xfc, 0xf6, 0xda, - 0xc0, 0xcd, 0xfb, 0x43, 0xb7, 0x16, 0xc1, 0x60, 0xde, 0x58, 0x4e, 0xa0, 0x9d, 0x98, 0xf7, 0xc6, - 0x40, 0x98, 0x57, 0xef, 0xe1, 0xca, 0xd8, 0xcf, 0x9e, 0xa5, 0x6e, 0x2d, 0xf2, 0x92, 0x85, 0x57, - 0xea, 0x39, 0xf8, 0xc6, 0x0a, 0xa9, 0x53, 0xca, 0x00, 0x19, 0xf7, 0xfe, 0x70, 0x9d, 0x2d, 0xb3, - 0xe4, 0xeb, 0xd6, 0xa2, 0x4e, 0xb9, 0x3c, 0x1a, 0xf4, 0xe1, 0x4e, 0x65, 0xd5, 0x02, 0xde, 0x16, - 0xe2, 0x85, 0x6b, 0x6d, 0x5b, 0x04, 0xdc, 0x19, 0x5c, 0x1b, 0x36, 0x14, 0xec, 0x56, 0x88, 0xd3, - 0x3c, 0x8d, 0xe9, 0x98, 0x64, 0x8b, 0xf8, 0x2d, 0xc4, 0x7f, 0xb4, 0x16, 0x7f, 0x55, 0xe1, 0x74, - 0x6b, 0xd1, 0xfd, 0xc1, 0xfa, 0xb2, 0x9a, 0xdb, 0x61, 0xa4, 0xa2, 0x1c, 0xe7, 0x06, 0x3b, 0x66, - 0x0d, 0x64, 0x6e, 0xc7, 0xbc, 0xa7, 0x7c, 0x01, 0x80, 0xe9, 0x68, 0xa0, 0xdc, 0xb5, 0xe9, 0x32, - 0x1b, 0x33, 0x75, 0xba, 0x8c, 0x67, 0x33, 0xe7, 0xe1, 0xac, 0xce, 0x91, 0x1f, 0x6e, 0xa8, 0xf3, - 0x69, 0xba, 0x24, 0xf3, 0xb1, 0xf9, 0x10, 0x3c, 0x8a, 0x33, 0xb0, 0x41, 0xf0, 0xd6, 0x22, 0xcc, - 0x27, 0x65, 0x8d, 0x40, 0xe7, 0x73, 0xf3, 0x73, 0xf0, 0x09, 0x16, 0x52, 0xac, 0xe4, 0xd4, 0x90, - 0xf6, 0xda, 0x5c, 0x59, 0xae, 0x39, 0x9d, 0x2b, 0x64, 0x89, 0x72, 0xbc, 0x05, 0x0d, 0x0d, 0x11, - 0xfe, 0xcb, 0x02, 0x78, 0x41, 0x13, 0x25, 0xe4, 0xd1, 0xd9, 0xd9, 0x37, 0xd5, 0xa7, 0xc2, 0xb8, - 0xcf, 0xfc, 0xf8, 0xf4, 0xa7, 0xc2, 0x78, 0x78, 0xe9, 0xbb, 0x53, 0x5f, 0xfe, 0xee, 0x7c, 0x0a, - 0x90, 0x4b, 0x9a, 0xb2, 0x84, 0x28, 0x5a, 0xdc, 0xf4, 0x0e, 0x2e, 0x5c, 0x0d, 0x7e, 0x09, 0xf0, - 0x4a, 0xff, 0xee, 0x4c, 0x07, 0x6d, 0xac, 0x8d, 0xcc, 0xec, 0x0b, 0x18, 0xb9, 0xaf, 0x66, 0xbf, - 0xc1, 0x0f, 0x60, 0x27, 0xcf, 0x48, 0x42, 0x87, 0x22, 0x4b, 0xa9, 0x8c, 0x15, 0xb9, 0xc2, 0xf2, - 0x71, 0xa3, 0xce, 0x02, 0xf9, 0x82, 0x5c, 0x85, 0x13, 0xd8, 0x46, 0x80, 0x7e, 0x46, 0xf8, 0x99, - 0x48, 0xe9, 0x35, 0x7d, 0xad, 0xcd, 0xf5, 0xbd, 0x07, 0x0e, 0x2b, 0xe2, 0x44, 0x94, 0x5c, 0x55, - 0x73, 0x73, 0x8b, 0x15, 0x27, 0x7a, 0x1b, 0x7c, 0x0f, 0x9a, 0x19, 0x1b, 0x31, 0x33, 0x06, 0xd8, - 0x91, 0xd9, 0x84, 0xff, 0xb1, 0xc0, 0x99, 0x89, 0x3d, 0x04, 0x6f, 0x8c, 0xce, 0x8e, 0x09, 0xe7, - 0xc5, 0x5b, 0x1e, 0x8c, 0x79, 0x48, 0x74, 0x1a, 0x18, 0x9e, 0x23, 0xce, 0x8b, 0xe0, 0xb3, 0x25, - 0xc5, 0xdf, 0xfe, 0xea, 0x69, 0xd6, 0x05, 0xd5, 0x7f, 0x01, 0x4d, 0x74, 0x5d, 0xe5, 0xe5, 0xbd, - 0x75, 0x5e, 0x9e, 0x6a, 0xdb, 0xad, 0x45, 0x86, 0x41, 0x7f, 0x16, 0x45, 0xa9, 0xf2, 0x52, 0xc5, - 0xd3, 0xf8, 0xeb, 0x18, 0xdb, 0xfb, 0x76, 0xd4, 0x31, 0xf4, 0x2f, 0x4d, 0x1a, 0x14, 0x3a, 0xad, - 0xb8, 0x48, 0xe9, 0x87, 0x7f, 0xb5, 0x60, 0xcb, 0x3c, 0x1e, 0xcb, 0x23, 0xce, 0x0e, 0x78, 0xcf, - 0x24, 0x25, 0x8a, 0xca, 0x8b, 0x21, 0xe1, 0xbe, 0x15, 0xf8, 0xd0, 0xae, 0x08, 0x4f, 0x5f, 0x95, - 0x24, 0xf3, 0xeb, 0x41, 0x1b, 0x9c, 0xaf, 0x69, 0x51, 0xe0, 0xb9, 0x8d, 0x33, 0x10, 0x2d, 0x0a, - 0x73, 0xd8, 0x08, 0x5c, 0x68, 0x9a, 0x65, 0x53, 0xdf, 0x3b, 0x13, 0xca, 0xec, 0xb6, 0x34, 0x70, - 0x5f, 0xd2, 0x4b, 0xf6, 0xe6, 0x39, 0x51, 0xc9, 0xd0, 0x6f, 0x69, 0xe0, 0xbe, 0x28, 0xd4, 0x8c, - 0xe2, 0x68, 0x5e, 0xb3, 0x74, 0xf5, 0x12, 0xdb, 0x8d, 0x0f, 0xc1, 0x16, 0xd4, 0x7b, 0xdc, 0xf7, - 0x34, 0xe9, 0x4c, 0xa8, 0x1e, 0xf7, 0xdb, 0x1f, 0x3e, 0x03, 0x6f, 0xe1, 0xcd, 0xd5, 0x06, 0x7c, - 0xcb, 0x5f, 0x72, 0xf1, 0x9a, 0x9b, 0x41, 0xf3, 0x28, 0xd5, 0xc3, 0x59, 0x0b, 0xec, 0x6f, 0xca, - 0x81, 0x5f, 0xd7, 0x8b, 0xe7, 0x65, 0xe6, 0xdb, 0x7a, 0x71, 0xca, 0xc6, 0x7e, 0x03, 0x29, 0x22, - 0xf5, 0x9b, 0xc7, 0x1f, 0xff, 0xf6, 0xa3, 0x2b, 0xa6, 0x86, 0xe5, 0xe0, 0x20, 0x11, 0xa3, 0xc7, - 0xc6, 0xdd, 0x8f, 0x98, 0xa8, 0x56, 0x8f, 0x19, 0x57, 0x54, 0x72, 0x92, 0x3d, 0xc6, 0x08, 0x3c, - 0xd6, 0x11, 0xc8, 0x07, 0x83, 0x2d, 0xdc, 0x7d, 0xfc, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, - 0x25, 0x49, 0xed, 0xba, 0x11, 0x00, 0x00, + // 1762 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x93, 0xdb, 0x48, + 0x15, 0xb7, 0x2c, 0x7b, 0x2c, 0x3d, 0x79, 0x3c, 0x8a, 0x8a, 0x2a, 0x26, 0x09, 0x9b, 0x19, 0xb4, + 0x5b, 0xec, 0x10, 0xc8, 0xa4, 0x36, 0xbb, 0x9b, 0xb0, 0xd9, 0x5a, 0x18, 0xcf, 0x9f, 0x8d, 0xcd, + 0x6e, 0x66, 0x06, 0xcd, 0x6c, 0x0e, 0x70, 0x50, 0xb5, 0xa5, 0x9e, 0x71, 0x13, 0xb9, 0xa5, 0x48, + 0x2d, 0x27, 0xfe, 0x0a, 0xdc, 0xf8, 0x00, 0x9c, 0x38, 0x70, 0xe7, 0xc8, 0x05, 0xce, 0x14, 0x07, + 0x8e, 0x1c, 0xa9, 0xe2, 0x13, 0x50, 0x7c, 0x01, 0xaa, 0x5f, 0x4b, 0x96, 0x3d, 0xd8, 0x19, 0x0f, + 0xa4, 0x8a, 0x5b, 0xeb, 0xf5, 0x7b, 0xbf, 0x7e, 0xff, 0xfa, 0xbd, 0xd7, 0x02, 0x48, 0x22, 0xc2, + 0x77, 0x93, 0x34, 0x16, 0xb1, 0x73, 0x6b, 0xc4, 0xa2, 0x71, 0x9e, 0xa9, 0xaf, 0x5d, 0xb9, 0x71, + 0xa7, 0x9d, 0x05, 0x43, 0x3a, 0x22, 0x8a, 0xe4, 0xfe, 0x59, 0x83, 0xf6, 0x33, 0xca, 0x69, 0xca, + 0x82, 0x17, 0x24, 0xca, 0xa9, 0x73, 0x17, 0x8c, 0x41, 0x1c, 0x47, 0xfe, 0x98, 0x44, 0x9b, 0xda, + 0xb6, 0xb6, 0x63, 0xf4, 0x6a, 0x5e, 0x4b, 0x52, 0x5e, 0x90, 0xc8, 0x79, 0x0f, 0x4c, 0xc6, 0xc5, + 0xe3, 0x4f, 0x70, 0xb7, 0xbe, 0xad, 0xed, 0xe8, 0xbd, 0x9a, 0x67, 0x20, 0xa9, 0xd8, 0xbe, 0x88, + 0x62, 0x22, 0x70, 0x5b, 0xdf, 0xd6, 0x76, 0x34, 0xb9, 0x8d, 0x24, 0xb9, 0xbd, 0x05, 0x90, 0x89, + 0x94, 0xf1, 0x4b, 0xdc, 0x6f, 0x6c, 0x6b, 0x3b, 0x66, 0xaf, 0xe6, 0x99, 0x8a, 0x26, 0x19, 0x9e, + 0x80, 0x49, 0xd2, 0x94, 0x4c, 0x70, 0xbf, 0xb9, 0xad, 0xed, 0x58, 0x8f, 0x36, 0x77, 0xff, 0xc3, + 0x82, 0xdd, 0xae, 0xe4, 0x91, 0xc8, 0xc8, 0xfc, 0x82, 0x44, 0xfb, 0x4d, 0xd0, 0xc7, 0x24, 0x72, + 0x7f, 0x01, 0x4d, 0xdc, 0x73, 0x3e, 0x85, 0x26, 0xee, 0x6d, 0x6a, 0xdb, 0xfa, 0x8e, 0xf5, 0x68, + 0x6b, 0x01, 0xc8, 0xac, 0xd1, 0x9e, 0xe2, 0x76, 0xee, 0x82, 0x99, 0x91, 0x11, 0xf5, 0xc5, 0x24, + 0xa1, 0x68, 0x9e, 0xe1, 0x19, 0x92, 0x70, 0x3e, 0x49, 0xa8, 0xfb, 0x2b, 0x0d, 0xcc, 0x9f, 0xe5, + 0x34, 0x9d, 0xf4, 0xf9, 0x45, 0xec, 0x38, 0xd0, 0x10, 0x71, 0xf2, 0x12, 0x5d, 0xa4, 0x7b, 0xb8, + 0x76, 0xb6, 0xc0, 0x1a, 0x51, 0x91, 0xb2, 0x40, 0x01, 0x48, 0x07, 0x98, 0x1e, 0x28, 0x92, 0x84, + 0x70, 0xde, 0x87, 0xf5, 0x8c, 0x92, 0x34, 0x18, 0xfa, 0x09, 0x49, 0xc9, 0x28, 0x53, 0x3e, 0xf0, + 0xda, 0x8a, 0x78, 0x8a, 0x34, 0xc9, 0x94, 0xc6, 0x39, 0x0f, 0xfd, 0x90, 0x06, 0x6c, 0x54, 0x38, + 0x42, 0xf7, 0xda, 0x48, 0x3c, 0x54, 0x34, 0xf7, 0x9f, 0x1a, 0xc0, 0x41, 0x1c, 0xe5, 0x23, 0x8e, + 0xda, 0xdc, 0x06, 0xe3, 0x82, 0xd1, 0x28, 0xf4, 0x59, 0x58, 0x68, 0xd4, 0xc2, 0xef, 0x7e, 0xe8, + 0x3c, 0x05, 0x33, 0x24, 0x82, 0x54, 0x36, 0x75, 0x1e, 0xbd, 0x37, 0xef, 0x8e, 0x22, 0x1f, 0x0e, + 0x89, 0x20, 0x52, 0x4b, 0xcf, 0x08, 0x8b, 0x95, 0xf3, 0x01, 0x74, 0x58, 0xe6, 0x27, 0x29, 0x1b, + 0x91, 0x74, 0xe2, 0xbf, 0xa4, 0x13, 0xb4, 0xc9, 0xf0, 0xda, 0x2c, 0x3b, 0x55, 0xc4, 0xaf, 0x28, + 0x7a, 0x8d, 0x65, 0x3e, 0xc9, 0x45, 0xdc, 0x3f, 0x44, 0x8b, 0x0c, 0xcf, 0x60, 0x59, 0x17, 0xbf, + 0xa5, 0x4f, 0x38, 0xcd, 0x04, 0x0d, 0xfd, 0x84, 0x88, 0xe1, 0x66, 0x73, 0x5b, 0x97, 0x3e, 0x51, + 0xa4, 0x53, 0x22, 0x86, 0xce, 0x0e, 0xd8, 0xf2, 0x0c, 0x92, 0x0a, 0x26, 0x58, 0xcc, 0xf1, 0x94, + 0x35, 0x04, 0xe9, 0xb0, 0xec, 0xb4, 0x24, 0x7f, 0x45, 0x27, 0xee, 0x4f, 0x4a, 0x93, 0x8f, 0xde, + 0x24, 0xa9, 0xf3, 0x11, 0x34, 0x18, 0xbf, 0x88, 0xd1, 0x5c, 0xeb, 0xaa, 0x49, 0x18, 0xe1, 0xca, + 0x3f, 0x1e, 0xb2, 0x4a, 0x80, 0xa3, 0x37, 0x2c, 0x13, 0xd9, 0x7f, 0x0b, 0xb0, 0x0f, 0x26, 0xe6, + 0x0b, 0xca, 0x7f, 0x0a, 0xcd, 0xb1, 0xfc, 0x28, 0x00, 0xae, 0xcf, 0x31, 0xe4, 0x76, 0x7f, 0xaf, + 0x41, 0xe7, 0x1b, 0x4e, 0xd2, 0x89, 0x47, 0xf8, 0xa5, 0x42, 0xfa, 0x31, 0x58, 0x01, 0x1e, 0xe5, + 0xaf, 0xae, 0x10, 0x04, 0x55, 0xf4, 0xbf, 0x0f, 0xf5, 0x38, 0x29, 0x62, 0x7b, 0x7b, 0x81, 0xd8, + 0x49, 0x82, 0x71, 0xad, 0xc7, 0x49, 0xa5, 0xb4, 0x7e, 0x23, 0xa5, 0x7f, 0x57, 0x87, 0x8d, 0x7d, + 0xf6, 0x6e, 0xb5, 0xfe, 0x10, 0x36, 0xa2, 0xf8, 0x35, 0x4d, 0x7d, 0xc6, 0x83, 0x28, 0xcf, 0xd8, + 0xb8, 0xbc, 0x72, 0x1d, 0x24, 0xf7, 0x4b, 0xaa, 0x64, 0xcc, 0x93, 0x64, 0x8e, 0x51, 0xa5, 0x61, + 0x07, 0xc9, 0x15, 0xe3, 0x1e, 0x58, 0x0a, 0x51, 0x99, 0xd8, 0x58, 0xcd, 0x44, 0x40, 0x19, 0x55, + 0xfc, 0xf6, 0xc0, 0x52, 0x47, 0x29, 0x84, 0xe6, 0x8a, 0x08, 0x28, 0x83, 0x6b, 0xf7, 0x2f, 0x1a, + 0x58, 0x07, 0xf1, 0x28, 0x21, 0xa9, 0xf2, 0xd2, 0x33, 0xb0, 0x23, 0x7a, 0x21, 0xfc, 0x1b, 0xbb, + 0xaa, 0x23, 0xc5, 0x66, 0xae, 0x78, 0x1f, 0x6e, 0xa5, 0xec, 0x72, 0x38, 0x8f, 0x54, 0x5f, 0x05, + 0x69, 0x03, 0xe5, 0x0e, 0xae, 0xe6, 0x8b, 0xbe, 0x42, 0xbe, 0xb8, 0xbf, 0xd5, 0xc0, 0x38, 0xa7, + 0xe9, 0xe8, 0x9d, 0x44, 0xfc, 0x09, 0xac, 0xa1, 0x5f, 0xb3, 0xcd, 0xfa, 0x6a, 0x65, 0xb9, 0x60, + 0x77, 0xee, 0x81, 0xc5, 0x32, 0x9f, 0x71, 0x1f, 0x8b, 0x5a, 0x11, 0x7d, 0x93, 0x65, 0x7d, 0xfe, + 0xa5, 0x24, 0xb8, 0x7f, 0xaa, 0x83, 0xfd, 0xd3, 0xb3, 0x93, 0xe3, 0x83, 0x98, 0x0b, 0xc2, 0x78, + 0xf6, 0x4e, 0xb4, 0xfd, 0x1c, 0x0c, 0x1a, 0xd1, 0x11, 0xe5, 0x62, 0x65, 0x7d, 0xa7, 0x02, 0xce, + 0xd3, 0x19, 0x17, 0xdf, 0x5f, 0x20, 0x76, 0x55, 0x5b, 0x24, 0x9c, 0x24, 0x78, 0x47, 0x7f, 0x08, + 0x4e, 0x89, 0xe3, 0x57, 0xed, 0x48, 0x15, 0x56, 0xbb, 0xdc, 0x39, 0x2b, 0xdb, 0xd2, 0x11, 0xac, + 0x29, 0x59, 0xc7, 0x82, 0x56, 0x9f, 0x8f, 0x49, 0xc4, 0x42, 0xbb, 0xe6, 0xb4, 0xc1, 0x28, 0xf1, + 0x6d, 0xcd, 0xd9, 0x90, 0x49, 0xa9, 0xbe, 0xba, 0x51, 0x64, 0xd7, 0xe7, 0x08, 0x7c, 0x62, 0xeb, + 0xee, 0xaf, 0x35, 0x30, 0xb1, 0x2c, 0xa1, 0xef, 0x3e, 0x41, 0xf5, 0x35, 0x54, 0xff, 0x83, 0x05, + 0xea, 0x4f, 0x39, 0xd5, 0xaa, 0x50, 0xfc, 0x01, 0x34, 0x83, 0x21, 0x8b, 0xc2, 0x22, 0x2d, 0xbf, + 0xbd, 0x40, 0x50, 0xca, 0x78, 0x8a, 0xcb, 0xdd, 0x82, 0x56, 0x21, 0x3d, 0xaf, 0x7a, 0x0b, 0xf4, + 0xe3, 0x58, 0xd8, 0x9a, 0xfb, 0x37, 0x0d, 0x40, 0x55, 0x1d, 0x54, 0xea, 0xf1, 0x8c, 0x52, 0xdf, + 0x5b, 0x80, 0x5d, 0xb1, 0x16, 0xcb, 0x42, 0xad, 0x1f, 0x40, 0x43, 0xde, 0xa5, 0xeb, 0xb4, 0x42, + 0x26, 0x69, 0x03, 0x5e, 0x97, 0xa2, 0x40, 0x2e, 0xb7, 0x01, 0xb9, 0xdc, 0xc7, 0x60, 0x94, 0x67, + 0xcd, 0x1b, 0xd1, 0x01, 0xf8, 0x3a, 0xbe, 0x64, 0x01, 0x89, 0xba, 0x3c, 0xb4, 0x35, 0x67, 0x1d, + 0xcc, 0xe2, 0xfb, 0x24, 0xb5, 0xeb, 0xee, 0x5f, 0x35, 0x58, 0x57, 0x82, 0xdd, 0x94, 0x89, 0xe1, + 0x49, 0xf2, 0x3f, 0xa7, 0xeb, 0x67, 0x60, 0x10, 0x09, 0xe5, 0x4f, 0x5b, 0xc1, 0xbd, 0x85, 0xa3, + 0x13, 0x9e, 0x86, 0xf7, 0xbb, 0x45, 0x8a, 0xa3, 0x0f, 0x61, 0x5d, 0x95, 0x96, 0x38, 0xa1, 0x29, + 0xe1, 0xe1, 0xaa, 0xcd, 0xa1, 0x8d, 0x52, 0x27, 0x4a, 0xc8, 0xfd, 0x8d, 0x56, 0xf6, 0x08, 0x3c, + 0x04, 0x43, 0x56, 0xba, 0x5e, 0xbb, 0x91, 0xeb, 0xeb, 0xab, 0xb8, 0xde, 0xd9, 0x9d, 0xb9, 0x62, + 0xd7, 0x99, 0x2a, 0x4b, 0xd9, 0x1f, 0xeb, 0x70, 0x67, 0xce, 0xe5, 0x47, 0x63, 0x12, 0xbd, 0xbb, + 0x76, 0xf6, 0xff, 0xf6, 0x7f, 0x51, 0xd5, 0x1b, 0x37, 0x9a, 0x02, 0x9a, 0x37, 0x9a, 0x02, 0x6c, + 0xe8, 0x74, 0xa3, 0xd7, 0x64, 0x92, 0x9d, 0xa7, 0x6a, 0x06, 0x72, 0xff, 0xde, 0x82, 0x06, 0x7a, + 0xef, 0x29, 0x98, 0x82, 0xa6, 0x23, 0x9f, 0xbe, 0x49, 0xd2, 0xc2, 0x77, 0x77, 0x17, 0xa0, 0x96, + 0xad, 0x44, 0x0e, 0xef, 0xa2, 0x6c, 0x2b, 0x5f, 0x00, 0xe4, 0x32, 0x2c, 0x4a, 0x58, 0x05, 0xff, + 0x3b, 0x6f, 0x2b, 0x3a, 0xf2, 0xd1, 0x90, 0x4f, 0xcb, 0xc2, 0x1e, 0x58, 0x03, 0x56, 0xc9, 0xeb, + 0x4b, 0x03, 0x57, 0xd5, 0x87, 0x5e, 0xcd, 0x83, 0x41, 0x55, 0x58, 0x0e, 0xa0, 0x1d, 0xa8, 0x96, + 0xad, 0x20, 0xd4, 0xe0, 0x70, 0x6f, 0x61, 0xec, 0xa7, 0x9d, 0xbd, 0x57, 0xf3, 0xac, 0x60, 0xa6, + 0xd1, 0x3f, 0x07, 0x5b, 0x59, 0x91, 0xca, 0x94, 0x52, 0x40, 0xca, 0xbd, 0xdf, 0x5d, 0x66, 0xcb, + 0x34, 0xf9, 0x7a, 0x35, 0xaf, 0x93, 0xcf, 0x4f, 0x57, 0xa7, 0x70, 0xab, 0xb0, 0x6a, 0x06, 0x6f, + 0x0d, 0xf1, 0xdc, 0xa5, 0xb6, 0xcd, 0x02, 0x6e, 0x0c, 0xae, 0xcc, 0x6b, 0x02, 0xb6, 0x0a, 0xc4, + 0x32, 0x4f, 0x7d, 0x3a, 0x26, 0xd1, 0x2c, 0x7e, 0x0b, 0xf1, 0x1f, 0x2c, 0xc5, 0x5f, 0x74, 0x71, + 0x7a, 0x35, 0xef, 0xce, 0x60, 0xf9, 0xb5, 0xaa, 0xec, 0x50, 0xa7, 0xe2, 0x39, 0xc6, 0x35, 0x76, + 0x4c, 0x0b, 0x48, 0x65, 0x47, 0x55, 0x53, 0xbe, 0x00, 0xc0, 0x74, 0x54, 0x50, 0xe6, 0xd2, 0x74, + 0x99, 0x4e, 0xea, 0x32, 0x5d, 0xc6, 0xd3, 0xb1, 0x7d, 0x6f, 0x7a, 0xcf, 0x51, 0x1e, 0xae, 0xb9, + 0xe7, 0x65, 0xba, 0x04, 0xd5, 0xcb, 0x63, 0x0f, 0x2c, 0x8a, 0xcf, 0x08, 0x85, 0x60, 0x2d, 0x45, + 0xa8, 0x1e, 0x1b, 0x12, 0x81, 0x56, 0x4f, 0x8f, 0xe7, 0x60, 0x13, 0xbc, 0x48, 0xbe, 0x48, 0x4b, + 0x43, 0xda, 0x4b, 0x73, 0x65, 0xfe, 0xce, 0xc9, 0x5c, 0x21, 0x73, 0x14, 0xe7, 0x0c, 0x9c, 0x5f, + 0x66, 0x31, 0xf7, 0x83, 0xa2, 0xa3, 0x2b, 0xc0, 0x75, 0x04, 0x7c, 0x7f, 0x85, 0xe1, 0xa3, 0x57, + 0xf3, 0x6c, 0x09, 0x30, 0x4b, 0xdb, 0x5f, 0x83, 0x86, 0x84, 0x71, 0xff, 0xa1, 0x01, 0xbc, 0xa0, + 0x81, 0x88, 0xd3, 0xee, 0xf1, 0xf1, 0x59, 0xf1, 0xd8, 0x53, 0x31, 0x51, 0xff, 0x07, 0xe4, 0x63, + 0x4f, 0x85, 0x6d, 0xee, 0x19, 0x5a, 0x9f, 0x7f, 0x86, 0x3e, 0x01, 0x48, 0x52, 0x1a, 0xb2, 0x80, + 0x08, 0x9a, 0x5d, 0xd7, 0x5c, 0x67, 0x58, 0x9d, 0xcf, 0x01, 0x5e, 0xc9, 0x57, 0xb7, 0x2a, 0xcb, + 0x8d, 0xa5, 0xe1, 0x9e, 0x3e, 0xcd, 0x3d, 0xf3, 0xd5, 0xf4, 0x95, 0xfe, 0x21, 0x6c, 0x24, 0x11, + 0x09, 0xe8, 0x30, 0x8e, 0x42, 0x9a, 0xfa, 0x82, 0x5c, 0xe2, 0x9d, 0x34, 0xbd, 0xce, 0x0c, 0xf9, + 0x9c, 0x5c, 0xba, 0x13, 0x58, 0x47, 0x80, 0xd3, 0x88, 0xf0, 0xe3, 0x38, 0xa4, 0x57, 0xf4, 0xd5, + 0x56, 0xd7, 0xf7, 0x36, 0x18, 0x2c, 0xf3, 0x83, 0x38, 0xe7, 0xa2, 0x78, 0xcf, 0xb4, 0x58, 0x76, + 0x20, 0x3f, 0x9d, 0x6f, 0x41, 0x33, 0x62, 0x23, 0xa6, 0x66, 0x0b, 0xdd, 0x53, 0x1f, 0xee, 0xbf, + 0x34, 0x30, 0xa6, 0xc7, 0xee, 0x81, 0x35, 0x46, 0x67, 0xfb, 0x84, 0xf3, 0xec, 0x2d, 0x5d, 0xa8, + 0x0a, 0x89, 0xcc, 0x2d, 0x25, 0xd3, 0xe5, 0x3c, 0x73, 0x3e, 0x9b, 0x53, 0xfc, 0xed, 0xad, 0x54, + 0x8a, 0xce, 0xa8, 0xfe, 0x23, 0x68, 0xa2, 0xeb, 0x0a, 0x2f, 0x6f, 0x2f, 0xf3, 0x72, 0xa9, 0x6d, + 0xaf, 0xe6, 0x29, 0x01, 0xf9, 0x88, 0x8f, 0x73, 0x91, 0xe4, 0xc2, 0x2f, 0xe3, 0x2f, 0x63, 0xac, + 0xef, 0xe8, 0x5e, 0x47, 0xd1, 0xbf, 0x54, 0x69, 0x90, 0xc9, 0xb4, 0xe2, 0x71, 0x48, 0xef, 0xff, + 0x41, 0x83, 0x35, 0xd5, 0x91, 0xe6, 0xe7, 0xa6, 0x0d, 0xb0, 0x9e, 0xa5, 0x94, 0x08, 0x9a, 0x9e, + 0x0f, 0x09, 0xb7, 0x35, 0xc7, 0x86, 0x76, 0x41, 0x38, 0x7a, 0x95, 0x13, 0x39, 0xbb, 0xb6, 0xc1, + 0xf8, 0x9a, 0x66, 0x19, 0xee, 0xeb, 0x38, 0x58, 0xd1, 0x2c, 0x53, 0x9b, 0x0d, 0xc7, 0x84, 0xa6, + 0x5a, 0x36, 0x25, 0xdf, 0x71, 0x2c, 0xd4, 0xd7, 0x9a, 0x04, 0x3e, 0x4d, 0xe9, 0x05, 0x7b, 0xf3, + 0x9c, 0x88, 0x60, 0x68, 0xb7, 0x24, 0xf0, 0x69, 0x9c, 0x89, 0x29, 0xc5, 0x90, 0xb2, 0x6a, 0x69, + 0xca, 0x25, 0xd6, 0x30, 0x1b, 0x9c, 0x35, 0xa8, 0xf7, 0xb9, 0x6d, 0x49, 0xd2, 0x71, 0x2c, 0xfa, + 0xdc, 0x6e, 0xdf, 0x7f, 0x06, 0xd6, 0x4c, 0x23, 0x97, 0x06, 0x7c, 0xc3, 0x5f, 0xf2, 0xf8, 0x35, + 0x57, 0xd3, 0x6b, 0x37, 0x94, 0x13, 0x5f, 0x0b, 0xf4, 0xb3, 0x7c, 0x60, 0xd7, 0xe5, 0xe2, 0x79, + 0x1e, 0xd9, 0xba, 0x5c, 0x1c, 0xb2, 0xb1, 0xdd, 0x40, 0x4a, 0x1c, 0xda, 0xcd, 0xfd, 0x8f, 0x7f, + 0xfe, 0xd1, 0x25, 0x13, 0xc3, 0x7c, 0xb0, 0x1b, 0xc4, 0xa3, 0x87, 0xca, 0xdd, 0x0f, 0x58, 0x5c, + 0xac, 0x1e, 0x32, 0x2e, 0x68, 0xca, 0x49, 0xf4, 0x10, 0x23, 0xf0, 0x50, 0x46, 0x20, 0x19, 0x0c, + 0xd6, 0xf0, 0xeb, 0xe3, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x48, 0x4f, 0x55, 0x7b, 0xe8, 0x13, + 0x00, 0x00, } diff --git a/tests/integration/jsonexpr/json_expr_test.go b/tests/integration/jsonexpr/json_expr_test.go index 61cf55366..4b665434a 100644 --- a/tests/integration/jsonexpr/json_expr_test.go +++ b/tests/integration/jsonexpr/json_expr_test.go @@ -1023,7 +1023,7 @@ func (s *JSONExprSuite) TestJsonWithEscapeString() { } s.doSearch(collectionName, []string{common.MetaFieldName}, expr, dim, checkFunc) - // search fail reason: "string field contains invalid UTF-8" + //search fail reason: "string field contains invalid UTF-8" //expr = `str4 like "abc\367-%"` //checkFunc = func(result *milvuspb.SearchResults) { // s.Equal(1, len(result.Results.FieldsData)) @@ -1034,6 +1034,131 @@ func (s *JSONExprSuite) TestJsonWithEscapeString() { //s.doSearch(collectionName, []string{common.MetaFieldName}, expr, dim, checkFunc) } +func (s *JSONExprSuite) TestJsonContains() { + c := s.Cluster + ctx, cancel := context.WithCancel(c.GetContext()) + defer cancel() + prefix := "TestHelloMilvus" + dbName := "" + collectionName := prefix + funcutil.GenRandomStr() + dim := 128 + rowNum := 100 + + constructCollectionSchema := func() *schemapb.CollectionSchema { + pk := &schemapb.FieldSchema{ + FieldID: 0, + Name: integration.Int64Field, + IsPrimaryKey: true, + Description: "", + DataType: schemapb.DataType_Int64, + TypeParams: nil, + IndexParams: nil, + AutoID: true, + } + fVec := &schemapb.FieldSchema{ + FieldID: 0, + Name: integration.FloatVecField, + IsPrimaryKey: false, + Description: "", + DataType: schemapb.DataType_FloatVector, + TypeParams: []*commonpb.KeyValuePair{ + { + Key: common.DimKey, + Value: strconv.Itoa(dim), + }, + }, + IndexParams: nil, + AutoID: false, + } + return &schemapb.CollectionSchema{ + Name: collectionName, + Description: "", + AutoID: false, + EnableDynamicField: true, + Fields: []*schemapb.FieldSchema{ + pk, + fVec, + }, + } + } + schema := constructCollectionSchema() + marshaledSchema, err := proto.Marshal(schema) + s.NoError(err) + + createCollectionStatus, err := c.Proxy.CreateCollection(ctx, &milvuspb.CreateCollectionRequest{ + DbName: dbName, + CollectionName: collectionName, + Schema: marshaledSchema, + ShardsNum: 2, + }) + s.NoError(err) + if createCollectionStatus.GetErrorCode() != commonpb.ErrorCode_Success { + log.Warn("createCollectionStatus fail reason", zap.String("reason", createCollectionStatus.GetReason())) + } + s.Equal(createCollectionStatus.GetErrorCode(), commonpb.ErrorCode_Success) + + log.Info("CreateCollection result", zap.Any("createCollectionStatus", createCollectionStatus)) + showCollectionsResp, err := c.Proxy.ShowCollections(ctx, &milvuspb.ShowCollectionsRequest{}) + s.NoError(err) + s.Equal(showCollectionsResp.GetStatus().GetErrorCode(), commonpb.ErrorCode_Success) + log.Info("ShowCollections result", zap.Any("showCollectionsResp", showCollectionsResp)) + + describeCollectionResp, err := c.Proxy.DescribeCollection(ctx, &milvuspb.DescribeCollectionRequest{CollectionName: collectionName}) + s.NoError(err) + s.True(describeCollectionResp.Schema.EnableDynamicField) + s.Equal(2, len(describeCollectionResp.GetSchema().GetFields())) + + fVecColumn := integration.NewFloatVectorFieldData(integration.FloatVecField, rowNum, dim) + jsonData := newJSONData(common.MetaFieldName, rowNum) + jsonData.IsDynamic = true + s.insertFlushIndexLoad(ctx, dbName, collectionName, rowNum, dim, []*schemapb.FieldData{fVecColumn, jsonData}) + + expr := "" + // search + expr = `json_contains(C, 0)` + checkFunc := func(result *milvuspb.SearchResults) { + s.Equal(1, len(result.Results.FieldsData)) + s.Equal(common.MetaFieldName, result.Results.FieldsData[0].GetFieldName()) + s.Equal(schemapb.DataType_JSON, result.Results.FieldsData[0].GetType()) + s.Equal(1, len(result.Results.FieldsData[0].GetScalars().GetJsonData().GetData())) + } + s.doSearch(collectionName, []string{"A"}, expr, dim, checkFunc) + + expr = `json_contains_all(C, [0, 100])` + checkFunc = func(result *milvuspb.SearchResults) { + s.Equal(1, len(result.Results.FieldsData)) + s.Equal(common.MetaFieldName, result.Results.FieldsData[0].GetFieldName()) + s.Equal(schemapb.DataType_JSON, result.Results.FieldsData[0].GetType()) + s.Equal(1, len(result.Results.FieldsData[0].GetScalars().GetJsonData().GetData())) + } + s.doSearch(collectionName, []string{"A"}, expr, dim, checkFunc) + + expr = `json_contains_all(C, [0, 99])` + checkFunc = func(result *milvuspb.SearchResults) { + for _, f := range result.Results.GetFieldsData() { + s.Nil(f) + } + } + s.doSearch(collectionName, []string{"A"}, expr, dim, checkFunc) + + expr = `json_contains_any(C, [1, 98])` + checkFunc = func(result *milvuspb.SearchResults) { + s.Equal(1, len(result.Results.FieldsData)) + s.Equal(common.MetaFieldName, result.Results.FieldsData[0].GetFieldName()) + s.Equal(schemapb.DataType_JSON, result.Results.FieldsData[0].GetType()) + s.Equal(4, len(result.Results.FieldsData[0].GetScalars().GetJsonData().GetData())) + } + s.doSearch(collectionName, []string{"A"}, expr, dim, checkFunc) + + expr = `json_contains_any(C, [101, 102])` + checkFunc = func(result *milvuspb.SearchResults) { + for _, f := range result.Results.GetFieldsData() { + s.Nil(f) + } + } + s.doSearch(collectionName, []string{"A"}, expr, dim, checkFunc) +} + func TestJsonExpr(t *testing.T) { suite.Run(t, new(JSONExprSuite)) } -- GitLab