diff --git a/go.mod b/go.mod index 33079cb112c20..1d0cf54d7a29e 100644 --- a/go.mod +++ b/go.mod @@ -271,6 +271,7 @@ replace ( github.com/milvus-io/milvus/pkg => ./pkg github.com/streamnative/pulsarctl => github.com/xiaofan-luan/pulsarctl v0.5.1 github.com/tecbot/gorocksdb => github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b // indirect + github.com/milvus-io/milvus-proto/go-api/v2 => /home/zc/work/milvus-proto/go-api ) exclude github.com/apache/pulsar-client-go/oauth2 v0.0.0-20211108044248-fe3b7c4e445b diff --git a/internal/parser/planparserv2/Plan.g4 b/internal/parser/planparserv2/Plan.g4 index c0644436a281b..c7491a013a2dd 100644 --- a/internal/parser/planparserv2/Plan.g4 +++ b/internal/parser/planparserv2/Plan.g4 @@ -7,6 +7,7 @@ expr: | StringLiteral # String | Identifier # Identifier | JSONIdentifier # JSONIdentifier + | LBRACE Identifier RBRACE # Placeholder | '(' expr ')' # Parens | '[' expr (',' expr)* ','? ']' # Array | EmptyArray # EmptyArray @@ -44,6 +45,8 @@ expr: // INT64: 'int64'; // FLOAT: 'float'; // DOUBLE: 'double'; +LBRACE: '{'; +RBRACE: '}'; LT: '<'; LE: '<='; diff --git a/internal/parser/planparserv2/convert_field_data_to_generic_value.go b/internal/parser/planparserv2/convert_field_data_to_generic_value.go new file mode 100644 index 0000000000000..888e680629570 --- /dev/null +++ b/internal/parser/planparserv2/convert_field_data_to_generic_value.go @@ -0,0 +1,126 @@ +package planparserv2 + +import ( + "encoding/json" + "fmt" + "strings" + + "github.com/milvus-io/milvus-proto/go-api/v2/schemapb" + "github.com/milvus-io/milvus/internal/proto/planpb" +) + +func ConvertFieldDataToGenericValue(data *schemapb.ScalarField, dataType schemapb.DataType) ([]*planpb.GenericValue, error) { + if data == nil { + return nil, fmt.Errorf("convert field data is nil") + } + values := make([]*planpb.GenericValue, 0) + switch dataType { + case schemapb.DataType_Bool: + elements := data.GetBoolData().GetData() + for _, element := range elements { + values = append(values, &planpb.GenericValue{ + Val: &planpb.GenericValue_BoolVal{ + BoolVal: element, + }, + }) + } + case schemapb.DataType_Int8, schemapb.DataType_Int16, schemapb.DataType_Int32: + elements := data.GetIntData().GetData() + for _, element := range elements { + values = append(values, &planpb.GenericValue{ + Val: &planpb.GenericValue_Int64Val{ + Int64Val: int64(element), + }, + }) + } + case schemapb.DataType_Int64: + elements := data.GetLongData().GetData() + for _, element := range elements { + values = append(values, &planpb.GenericValue{ + Val: &planpb.GenericValue_Int64Val{ + Int64Val: element, + }, + }) + } + case schemapb.DataType_Float: + elements := data.GetFloatData().GetData() + for _, element := range elements { + values = append(values, &planpb.GenericValue{ + Val: &planpb.GenericValue_FloatVal{ + FloatVal: float64(element), + }, + }) + } + case schemapb.DataType_Double: + elements := data.GetDoubleData().GetData() + for _, element := range elements { + values = append(values, &planpb.GenericValue{ + Val: &planpb.GenericValue_FloatVal{ + FloatVal: element, + }, + }) + } + case schemapb.DataType_String, schemapb.DataType_VarChar: + elements := data.GetStringData().GetData() + for _, element := range elements { + values = append(values, &planpb.GenericValue{ + Val: &planpb.GenericValue_StringVal{ + StringVal: element, + }, + }) + } + case schemapb.DataType_Array: + elements := data.GetArrayData().GetData() + for _, element := range elements { + arrayElements, err := ConvertFieldDataToGenericValue(element, data.GetArrayData().GetElementType()) + if err != nil { + return nil, err + } + values = append(values, &planpb.GenericValue{ + Val: &planpb.GenericValue_ArrayVal{ + ArrayVal: &planpb.Array{ + Array: arrayElements, + SameType: data.GetArrayData().GetElementType() != schemapb.DataType_JSON, + ElementType: data.GetArrayData().GetElementType(), + }, + }, + }) + } + case schemapb.DataType_JSON: + elements := data.GetJsonData().GetData() + for _, element := range elements { + var j interface{} + desc := json.NewDecoder(strings.NewReader(string(element))) + desc.UseNumber() + err := desc.Decode(&j) + if err != nil { + return nil, err + } + value, _, err := parseJSONValue(j) + if err != nil { + return nil, err + } + values = append(values, value) + } + default: + return nil, fmt.Errorf("expression elements can only be scalars") + + } + + return values, nil +} + +func UnmarshalExpressionValues(input ...*schemapb.FieldData) (map[string]*planpb.GenericValue, error) { + result := make(map[string]*planpb.GenericValue, len(input)) + for _, data := range input { + rv, err := ConvertFieldDataToGenericValue(data.GetScalars(), data.GetType()) + if err != nil { + return nil, err + } + if len(rv) != 1 { + return nil, fmt.Errorf("invalue elements num for %s", data.GetFieldName()) + } + result[data.GetFieldName()] = rv[0] + } + return result, nil +} diff --git a/internal/parser/planparserv2/convert_field_data_to_generic_value_test.go b/internal/parser/planparserv2/convert_field_data_to_generic_value_test.go new file mode 100644 index 0000000000000..7b436c87a3ab8 --- /dev/null +++ b/internal/parser/planparserv2/convert_field_data_to_generic_value_test.go @@ -0,0 +1,395 @@ +package planparserv2 + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/milvus-io/milvus-proto/go-api/v2/schemapb" +) + +func Test_ConvertFieldDataToGenericValue(t *testing.T) { + toJSONBytes := func(v any) []byte { + jsonBytes, err := json.Marshal(v) + assert.Nil(t, err) + return jsonBytes + } + scalarDatas := []*schemapb.FieldData{ + { + Type: schemapb.DataType_Int32, + FieldName: "int", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_IntData{ + IntData: &schemapb.IntArray{ + Data: []int32{1, 2, 3, 4, 5, 6}, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_Int64, + FieldName: "int64", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_LongData{ + LongData: &schemapb.LongArray{ + Data: []int64{1, 2, 3, 4, 5, 6}, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_Bool, + FieldName: "bool", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_BoolData{ + BoolData: &schemapb.BoolArray{ + Data: []bool{true, false, true, false}, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_Float, + FieldName: "float", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_FloatData{ + FloatData: &schemapb.FloatArray{ + Data: []float32{1.1, 2.2, 3.3, 4.4, 5.6}, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_Double, + FieldName: "float", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_DoubleData{ + DoubleData: &schemapb.DoubleArray{ + Data: []float64{1.1, 2.2, 3.3, 4.4, 5.6}, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_String, + FieldName: "string", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_StringData{ + StringData: &schemapb.StringArray{ + Data: []string{"abc", "def", "ghi"}, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_String, + FieldName: "string", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_StringData{ + StringData: &schemapb.StringArray{ + Data: []string{"abc", "def", "ghi"}, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_Array, + FieldName: "int64_array", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_ArrayData{ + ArrayData: &schemapb.ArrayArray{ + ElementType: schemapb.DataType_Int64, + Data: []*schemapb.ScalarField{ + { + Data: &schemapb.ScalarField_LongData{ + LongData: &schemapb.LongArray{ + Data: []int64{1, 2, 3, 4, 5, 6}, + }, + }, + }, + { + Data: &schemapb.ScalarField_LongData{ + LongData: &schemapb.LongArray{ + Data: []int64{2, 3, 4, 5, 6, 7}, + }, + }, + }, + { + Data: &schemapb.ScalarField_LongData{ + LongData: &schemapb.LongArray{ + Data: []int64{3, 4, 5, 6, 7, 8}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_Array, + FieldName: "string_array", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_ArrayData{ + ArrayData: &schemapb.ArrayArray{ + ElementType: schemapb.DataType_String, + Data: []*schemapb.ScalarField{ + { + Data: &schemapb.ScalarField_StringData{ + StringData: &schemapb.StringArray{ + Data: []string{"abc", "def", "ghi"}, + }, + }, + }, + { + Data: &schemapb.ScalarField_StringData{ + StringData: &schemapb.StringArray{ + Data: []string{"jkl", "opq", "rst"}, + }, + }, + }, + { + Data: &schemapb.ScalarField_StringData{ + StringData: &schemapb.StringArray{ + Data: []string{"uvw", "xyz"}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + { + Type: schemapb.DataType_Array, + FieldName: "json_array", + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_ArrayData{ + ArrayData: &schemapb.ArrayArray{ + ElementType: schemapb.DataType_JSON, + Data: []*schemapb.ScalarField{ + { + Data: &schemapb.ScalarField_JsonData{ + JsonData: &schemapb.JSONArray{ + Data: [][]byte{toJSONBytes("abc"), toJSONBytes(1), toJSONBytes(2.2)}, + }, + }, + }, + { + Data: &schemapb.ScalarField_JsonData{ + JsonData: &schemapb.JSONArray{ + Data: [][]byte{toJSONBytes("def"), toJSONBytes(100), toJSONBytes(22.2)}, + }, + }, + }, + { + Data: &schemapb.ScalarField_JsonData{ + JsonData: &schemapb.JSONArray{ + Data: [][]byte{toJSONBytes("100"), toJSONBytes(100), toJSONBytes(99.99)}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } + + for _, data := range scalarDatas { + values, err := ConvertFieldDataToGenericValue(data.GetScalars(), data.GetType()) + assert.Nil(t, err) + fmt.Println(values) + } +} + +func generateExpressionFieldData(name string, dataType schemapb.DataType, data []interface{}) *schemapb.FieldData { + switch dataType { + case schemapb.DataType_Bool: + boolData := make([]bool, len(data)) + for i, v := range data { + boolData[i] = v.(bool) + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_BoolData{ + BoolData: &schemapb.BoolArray{ + Data: boolData, + }, + }, + }, + }, + } + + case schemapb.DataType_Int8, schemapb.DataType_Int16, schemapb.DataType_Int32: + intData := make([]int32, len(data)) + for i, v := range data { + intData[i] = v.(int32) + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_IntData{ + IntData: &schemapb.IntArray{ + Data: intData, + }, + }, + }, + }, + } + + case schemapb.DataType_Int64: + int64Data := make([]int64, len(data)) + for i, v := range data { + int64Data[i] = v.(int64) + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_LongData{ + LongData: &schemapb.LongArray{ + Data: int64Data, + }, + }, + }, + }, + } + + case schemapb.DataType_Float: + floatData := make([]float32, len(data)) + for i, v := range data { + floatData[i] = v.(float32) + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_FloatData{ + FloatData: &schemapb.FloatArray{ + Data: floatData, + }, + }, + }, + }, + } + + case schemapb.DataType_Double: + doubleData := make([]float64, len(data)) + for i, v := range data { + doubleData[i] = v.(float64) + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_DoubleData{ + DoubleData: &schemapb.DoubleArray{ + Data: doubleData, + }, + }, + }, + }, + } + + case schemapb.DataType_String, schemapb.DataType_VarChar: + stringData := make([]string, len(data)) + for i, v := range data { + stringData[i] = v.(string) + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_StringData{ + StringData: &schemapb.StringArray{ + Data: stringData, + }, + }, + }, + }, + } + + case schemapb.DataType_Array: + // Handle array data here + // Assume the inner data is already in an appropriate format. + // Placeholder for array implementation. + // You might want to define a recursive approach based on the data structure. + arrayData := make([]*schemapb.ScalarField, len(data)) + elementType := schemapb.DataType_None + for i, v := range data { + array := v.(*schemapb.FieldData) + arrayData[i] = array.GetScalars() + elementType = array.GetType() + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_ArrayData{ + ArrayData: &schemapb.ArrayArray{ + Data: arrayData, + ElementType: elementType, + }, + }, + }, + }, + } + + case schemapb.DataType_JSON: + // Handle JSON data here + // Assuming the JSON data is encoded as strings or as map[string]interface{} + jsonData := make([][]byte, len(data)) + for i, v := range data { + jsonData[i] = v.([]byte) + } + return &schemapb.FieldData{ + FieldName: name, + Type: dataType, + Field: &schemapb.FieldData_Scalars{ + Scalars: &schemapb.ScalarField{ + Data: &schemapb.ScalarField_JsonData{ + JsonData: &schemapb.JSONArray{ + Data: jsonData, + }, + }, + }, + }, + } + + default: + return nil + } +} diff --git a/internal/parser/planparserv2/fill_expression_value.go b/internal/parser/planparserv2/fill_expression_value.go new file mode 100644 index 0000000000000..2b832dfbd3ac6 --- /dev/null +++ b/internal/parser/planparserv2/fill_expression_value.go @@ -0,0 +1,228 @@ +package planparserv2 + +import ( + "fmt" + + "github.com/milvus-io/milvus-proto/go-api/v2/schemapb" + + "github.com/milvus-io/milvus/pkg/util/typeutil" + + "github.com/milvus-io/milvus/internal/proto/planpb" +) + +func FillExpressionValue(expr *planpb.Expr, valueMap map[string]*planpb.GenericValue) error { + if !expr.GetNeedFillPlaceholder() { + return nil + } + + switch e := expr.GetExpr().(type) { + case *planpb.Expr_TermExpr: + return FillTermExpressionValue(e.TermExpr, valueMap) + case *planpb.Expr_UnaryExpr: + return FillExpressionValue(e.UnaryExpr.GetChild(), valueMap) + case *planpb.Expr_BinaryExpr: + if err := FillExpressionValue(e.BinaryExpr.GetLeft(), valueMap); err != nil { + return err + } + return FillExpressionValue(e.BinaryExpr.GetRight(), valueMap) + case *planpb.Expr_UnaryRangeExpr: + return FillUnaryRangeExpressionValue(e.UnaryRangeExpr, valueMap) + case *planpb.Expr_BinaryRangeExpr: + return FillBinaryRangeExpressionValue(e.BinaryRangeExpr, valueMap) + case *planpb.Expr_BinaryArithOpEvalRangeExpr: + return FillBinaryArithOpEvalRangeExpressionValue(e.BinaryArithOpEvalRangeExpr, valueMap) + case *planpb.Expr_BinaryArithExpr: + if err := FillExpressionValue(e.BinaryArithExpr.GetLeft(), valueMap); err != nil { + return err + } + return FillExpressionValue(e.BinaryArithExpr.GetRight(), valueMap) + case *planpb.Expr_JsonContainsExpr: + return FillJSONContainsExpressionValue(e.JsonContainsExpr, valueMap) + default: + return fmt.Errorf("this expression no need to fill placeholder with expr type: %T", e) + } +} + +func FillTermExpressionValue(expr *planpb.TermExpr, data map[string]*planpb.GenericValue) error { + value, ok := data[expr.GetPlaceholderName()] + if !ok && expr.GetValues() == nil { + return fmt.Errorf("placeholder %s is not found", expr.GetPlaceholderName()) + } + + if value == nil || value.GetArrayVal() == nil { + return fmt.Errorf("expression value: %s is not array", expr.GetPlaceholderName()) + } + dataType := expr.GetColumnInfo().GetDataType() + if typeutil.IsArrayType(dataType) { + if len(expr.GetColumnInfo().GetNestedPath()) != 0 { + dataType = expr.GetColumnInfo().GetElementType() + } + } + + array := value.GetArrayVal().GetArray() + values := make([]*planpb.GenericValue, len(array)) + for i, e := range array { + castedValue, err := castValue(dataType, e) + if err != nil { + return fmt.Errorf("value '%s' in list cannot be casted to %s", e.String(), dataType.String()) + } + values[i] = castedValue + } + expr.Values = values + + return nil +} + +func FillUnaryRangeExpressionValue(expr *planpb.UnaryRangeExpr, data map[string]*planpb.GenericValue) error { + value, ok := data[expr.GetPlaceholderName()] + if !ok { + return fmt.Errorf("placeholder %s is not found", expr.GetPlaceholderName()) + } + + dataType := expr.GetColumnInfo().GetDataType() + if typeutil.IsArrayType(dataType) { + if len(expr.GetColumnInfo().GetNestedPath()) != 0 { + dataType = expr.GetColumnInfo().GetElementType() + } + } + + castedValue, err := castValue(dataType, value) + if err != nil { + return err + } + expr.Value = castedValue + return nil +} + +func FillBinaryRangeExpressionValue(expr *planpb.BinaryRangeExpr, data map[string]*planpb.GenericValue) error { + var ok bool + dataType := expr.GetColumnInfo().GetDataType() + if typeutil.IsArrayType(dataType) && len(expr.GetColumnInfo().GetNestedPath()) != 0 { + dataType = expr.GetColumnInfo().GetElementType() + } + lowerValue := expr.GetLowerValue() + if lowerValue == nil || expr.GetLowerPlaceholderName() != "" { + lowerValue, ok = data[expr.GetLowerPlaceholderName()] + if !ok { + return fmt.Errorf("lower placeholder %s is not found", expr.GetLowerPlaceholderName()) + } + castedLowerValue, err := castValue(dataType, lowerValue) + if err != nil { + return err + } + expr.LowerValue = castedLowerValue + } + + upperValue := expr.GetUpperValue() + if upperValue == nil || expr.GetUpperPlaceholderName() != "" { + upperValue, ok = data[expr.GetUpperPlaceholderName()] + if !ok { + return fmt.Errorf("upper placeholder %s is not found", expr.GetUpperPlaceholderName()) + } + + castedUpperValue, err := castValue(dataType, upperValue) + if err != nil { + return err + } + expr.UpperValue = castedUpperValue + } + + if !(expr.GetLowerInclusive() && expr.GetUpperInclusive()) { + if getGenericValue(GreaterEqual(lowerValue, upperValue)).GetBoolVal() { + return fmt.Errorf("invalid range: lowerbound is greater than upperbound") + } + } else { + if getGenericValue(Greater(lowerValue, upperValue)).GetBoolVal() { + return fmt.Errorf("invalid range: lowerbound is greater than upperbound") + } + } + + return nil +} + +func FillBinaryArithOpEvalRangeExpressionValue(expr *planpb.BinaryArithOpEvalRangeExpr, data map[string]*planpb.GenericValue) error { + var dataType schemapb.DataType + var err error + var ok bool + + operand := expr.GetRightOperand() + if operand == nil || expr.GetOperandPlaceholderName() != "" { + operand, ok = data[expr.GetOperandPlaceholderName()] + if !ok { + return fmt.Errorf("right operand: %s of BinaryArithOpEvalRangeExpression is not found", expr.GetOperandPlaceholderName()) + } + } + + operandExpr := toValueExpr(operand) + lDataType, rDataType := expr.GetColumnInfo().GetDataType(), operandExpr.dataType + if typeutil.IsArrayType(expr.GetColumnInfo().GetDataType()) { + lDataType = expr.GetColumnInfo().GetElementType() + } + + if err = checkValidModArith(expr.GetArithOp(), expr.GetColumnInfo().GetDataType(), expr.GetColumnInfo().GetElementType(), + rDataType, schemapb.DataType_None); err != nil { + return err + } + + if operand.GetArrayVal() != nil { + return fmt.Errorf("can not comparisons array directly") + } + + dataType, err = getTargetType(lDataType, rDataType) + if err != nil { + return err + } + + castedOperand, err := castValue(dataType, operand) + if err != nil { + return err + } + expr.RightOperand = castedOperand + + value := expr.GetValue() + if expr.GetValue() == nil || expr.GetValuePlaceholderName() != "" { + value, ok = data[expr.GetValuePlaceholderName()] + if !ok { + return fmt.Errorf("value: %s of BinaryArithOpEvalRangeExpressionis not found", expr.GetValuePlaceholderName()) + } + } + castedValue, err := castValue(dataType, value) + if err != nil { + return err + } + expr.Value = castedValue + + return nil +} + +func FillJSONContainsExpressionValue(expr *planpb.JSONContainsExpr, data map[string]*planpb.GenericValue) error { + if expr.GetElements() == nil || expr.GetPlaceholderName() != "" { + value, ok := data[expr.GetPlaceholderName()] + if !ok { + return fmt.Errorf("value: %s of JSONContains is not found", expr.GetPlaceholderName()) + } + if err := checkContainsElement(toColumnExpr(expr.GetColumnInfo()), expr.GetOp(), value); err != nil { + return err + } + dataType := expr.GetColumnInfo().GetDataType() + if typeutil.IsArrayType(dataType) { + dataType = expr.GetColumnInfo().GetElementType() + } + if expr.GetOp() == planpb.JSONContainsExpr_Contains { + castedValue, err := castValue(dataType, value) + if err != nil { + return err + } + expr.Elements = append(expr.Elements, castedValue) + } else { + for _, e := range value.GetArrayVal().GetArray() { + castedValue, err := castValue(dataType, e) + if err != nil { + return err + } + expr.Elements = append(expr.Elements, castedValue) + } + } + } + return nil +} diff --git a/internal/parser/planparserv2/fill_expression_value_test.go b/internal/parser/planparserv2/fill_expression_value_test.go new file mode 100644 index 0000000000000..cdb2ba74dcd40 --- /dev/null +++ b/internal/parser/planparserv2/fill_expression_value_test.go @@ -0,0 +1,508 @@ +package planparserv2 + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/milvus-io/milvus-proto/go-api/v2/schemapb" + "github.com/milvus-io/milvus/internal/proto/planpb" +) + +type FillExpressionValueSuite struct { + suite.Suite +} + +func (s *FillExpressionValueSuite) SetupTest() { + +} + +func TestFillExpressionValue(t *testing.T) { + suite.Run(t, new(FillExpressionValueSuite)) +} + +type testcase struct { + expr string + values []*schemapb.FieldData +} + +func (s *FillExpressionValueSuite) jsonMarshal(v interface{}) []byte { + r, err := json.Marshal(v) + s.NoError(err) + return r +} + +func (s *FillExpressionValueSuite) TestTermExpr() { + s.Run("normal case", func() { + testcases := []testcase{ + {`Int64Field in {age}`, []*schemapb.FieldData{ + generateExpressionFieldData("age", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3), int64(4)}), + }), + }}, + {`FloatField in {age}`, []*schemapb.FieldData{ + generateExpressionFieldData("age", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Double, []interface{}{1.1, 2.2, 3.3, 4.4}), + }), + }}, + {`A in {list}`, []*schemapb.FieldData{ + generateExpressionFieldData("list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_JSON, []interface{}{s.jsonMarshal(int64(1)), s.jsonMarshal("abc"), s.jsonMarshal(float32(2.2)), s.jsonMarshal(false)}), + }), + }}, + {`ArrayField in {list}`, []*schemapb.FieldData{ + generateExpressionFieldData("list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3)}), + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(3), int64(4), int64(5)}), + }), + }), + }}, + {`ArrayField[0] in {list}`, []*schemapb.FieldData{ + generateExpressionFieldData("list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int32, []interface{}{int32(1), int32(2), int32(3), int32(4), int32(5)}), + }), + }}, + {`Int64Field in {empty_list}`, []*schemapb.FieldData{ + generateExpressionFieldData("empty_list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int32, []interface{}{}), + }), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.NoError(err) + s.NotNil(plan) + } + }) + + s.Run("failed case", func() { + testcases := []testcase{ + {`Int64Field in {age}`, []*schemapb.FieldData{ + generateExpressionFieldData("age", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_String, []interface{}{"abc", "def"}), + }), + }}, + {`StringField in {list}`, []*schemapb.FieldData{ + generateExpressionFieldData("list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_JSON, []interface{}{s.jsonMarshal(int8(1)), s.jsonMarshal("abc"), s.jsonMarshal(float32(2.2)), s.jsonMarshal(false)}), + }), + }}, + {"ArrayField[0] in {list}", []*schemapb.FieldData{ + generateExpressionFieldData("list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_JSON, []interface{}{s.jsonMarshal(int16(1)), s.jsonMarshal("abc"), s.jsonMarshal(int32(3))}), + }), + }}, + {"Int64Field not in {not_list}", []*schemapb.FieldData{ + generateExpressionFieldData("not_list", schemapb.DataType_String, []interface{}{"abc"}), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + s.Error(err) + s.Nil(plan) + } + }) +} + +func (s *FillExpressionValueSuite) TestUnaryRange() { + s.Run("normal case", func() { + testcases := []testcase{ + {`Int64Field == 10`, nil}, + {`Int64Field > {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Int64, []interface{}{int64(11)}), + }}, + {`FloatField < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Float, []interface{}{float32(12.3)}), + }}, + {`DoubleField != {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{3.5}), + }}, + {`ArrayField[0] >= {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Int64, []interface{}{int64(3)}), + }}, + {`BoolField == {bool}`, []*schemapb.FieldData{ + generateExpressionFieldData("bool", schemapb.DataType_Bool, []interface{}{false}), + }}, + {`{str} != StringField`, []*schemapb.FieldData{ + generateExpressionFieldData("str", schemapb.DataType_String, []interface{}{"abc"}), + }}, + {`{target} > Int64Field`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Int64, []interface{}{int64(11)}), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.NoError(err) + s.NotNil(plan) + s.NotNil(plan.GetVectorAnns()) + s.NotNil(plan.GetVectorAnns().GetPredicates()) + } + }) + + s.Run("failed case", func() { + testcases := []testcase{ + {`Int64Field == 10.5`, nil}, + {`Int64Field > {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{11.2}), + }}, + {`FloatField < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_String, []interface{}{"abc"}), + }}, + {`DoubleField != {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Bool, []interface{}{false}), + }}, + {`ArrayField[0] >= {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{3.5}), + }}, + {`BoolField == {bool}`, []*schemapb.FieldData{ + generateExpressionFieldData("bool", schemapb.DataType_String, []interface{}{"abc"}), + }}, + {`{str} != StringField`, []*schemapb.FieldData{ + generateExpressionFieldData("str", schemapb.DataType_Int64, []interface{}{int64(5)}), + }}, + {`{str} != StringField`, []*schemapb.FieldData{ + generateExpressionFieldData("int", schemapb.DataType_Int64, []interface{}{int64(5)}), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.Error(err) + s.Nil(plan) + } + }) +} + +func (s *FillExpressionValueSuite) TestBinaryRange() { + s.Run("normal case", func() { + testcases := []testcase{ + {`10 < Int64Field < 20`, nil}, + {`{max} > Int64Field > {min}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Int64, []interface{}{int64(11)}), + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`{min} <= FloatField <= {max}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Float, []interface{}{float32(11)}), + generateExpressionFieldData("max", schemapb.DataType_Float, []interface{}{float32(22)}), + }}, + {`{min} < DoubleField < {max}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Double, []interface{}{float64(11)}), + generateExpressionFieldData("max", schemapb.DataType_Double, []interface{}{float64(22)}), + }}, + {`{max} >= ArrayField[0] >= {min}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Int64, []interface{}{int64(11)}), + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`{max} > Int64Field >= 10`, []*schemapb.FieldData{ + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`30 >= Int64Field > {min}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Int64, []interface{}{int64(11)}), + }}, + {`10 < Int64Field <= {max}`, []*schemapb.FieldData{ + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`{min} <= Int64Field < 20`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Int64, []interface{}{int64(11)}), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.NoError(err) + s.NotNil(plan) + s.NotNil(plan.GetVectorAnns()) + s.NotNil(plan.GetVectorAnns().GetPredicates()) + } + }) + + s.Run("failed case", func() { + testcases := []testcase{ + {`10 < Int64Field < 20.5`, nil}, + {`{max} > Int64Field > {min}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Int64, []interface{}{int64(11)}), + generateExpressionFieldData("max", schemapb.DataType_Double, []interface{}{22.5}), + }}, + {`{min} <= FloatField <= {max}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_String, []interface{}{"abc"}), + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(11)}), + }}, + {`{min} < DoubleField < {max}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Int64, []interface{}{int64(33)}), + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`{max} >= ArrayField[0] >= {min}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Double, []interface{}{11.5}), + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`{max} >= Int64Field >= {min}`, []*schemapb.FieldData{ + generateExpressionFieldData("max", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`{max} >= Int64Field >= {min}`, []*schemapb.FieldData{ + generateExpressionFieldData("min", schemapb.DataType_Int64, []interface{}{int64(22)}), + }}, + {`{max} > Int64Field`, []*schemapb.FieldData{ + generateExpressionFieldData("max", schemapb.DataType_Bool, []interface{}{false}), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.Error(err) + s.Nil(plan) + } + }) +} + +func (s *FillExpressionValueSuite) TestBinaryArithOpEvalRange() { + s.Run("normal case", func() { + testcases := []testcase{ + {`Int64Field + 5.5 == 10.5`, nil}, + {`Int64Field - {offset} >= {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Double, []interface{}{3.5}), + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{11.5}), + }}, + {`Int64Field * 3.5 <= {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{11.5}), + }}, + {`Int64Field / {offset} > 11.5`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Double, []interface{}{3.5}), + }}, + {`ArrayField[0] % {offset} < 11`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Int64, []interface{}{int64(3)}), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.NoError(err) + s.NotNil(plan) + s.NotNil(plan.GetVectorAnns()) + s.NotNil(plan.GetVectorAnns().GetPredicates()) + } + }) + + s.Run("failed case", func() { + testcases := []testcase{ + {`Int64Field + 6 == 12.5`, nil}, + {`Int64Field - {offset} == {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Int64, []interface{}{int64(4)}), + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{13.5}), + }}, + {`Int64Field * 6 == {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{13.5}), + }}, + {`Int64Field / {offset} == 11.5`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Int64, []interface{}{int64(6)}), + }}, + {`Int64Field % {offset} < 11`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Double, []interface{}{3.5}), + }}, + {`Int64Field + {offset} < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("target", schemapb.DataType_Double, []interface{}{3.5}), + }}, + {`Int64Field + {offset} < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Double, []interface{}{3.5}), + }}, + {`Int64Field + {offset} < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_String, []interface{}{"abc"}), + generateExpressionFieldData("target", schemapb.DataType_Int64, []interface{}{int64(15)}), + }}, + {`Int64Field + {offset} < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Int64, []interface{}{int64(15)}), + generateExpressionFieldData("target", schemapb.DataType_String, []interface{}{"def"}), + }}, + {`ArrayField + {offset} < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Double, []interface{}{3.5}), + generateExpressionFieldData("target", schemapb.DataType_Int64, []interface{}{int64(5)}), + }}, + {`ArrayField[0] + {offset} < {target}`, []*schemapb.FieldData{ + generateExpressionFieldData("offset", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3)}), + }), + generateExpressionFieldData("target", schemapb.DataType_Int64, []interface{}{int64(5)}), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.Error(err) + s.Nil(plan) + } + }) +} + +func (s *FillExpressionValueSuite) TestJSONContainsExpression() { + s.Run("normal case", func() { + testcases := []testcase{ + {`json_contains(A, 5)`, nil}, + {`json_contains(A, {age})`, []*schemapb.FieldData{ + generateExpressionFieldData("age", schemapb.DataType_Int64, []interface{}{int64(18)}), + }}, + {`json_contains(A, {str})`, []*schemapb.FieldData{ + generateExpressionFieldData("str", schemapb.DataType_String, []interface{}{"abc"}), + }}, + {`json_contains(A, {bool})`, []*schemapb.FieldData{ + generateExpressionFieldData("bool", schemapb.DataType_Bool, []interface{}{false}), + }}, + {`json_contains_any(JSONField, {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_JSON, []interface{}{s.jsonMarshal(1), s.jsonMarshal("abc"), s.jsonMarshal("2.2"), s.jsonMarshal(false)}), + }), + }}, + {`json_contains_any(JSONField, {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3), int64(4)}), + }), + }}, + {`json_contains_any(JSONField["A"], {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3), int64(4)}), + }), + }}, + {`json_contains_all(JSONField["A"], {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_JSON, []interface{}{s.jsonMarshal(1), s.jsonMarshal("abc"), s.jsonMarshal("2.2"), s.jsonMarshal(false)}), + }), + }}, + {`json_contains_all(JSONField["A"], {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3)}), + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(4), int64(5), int64(6)}), + }), + }), + }}, + {`json_contains(ArrayField, {int})`, []*schemapb.FieldData{ + generateExpressionFieldData("int", schemapb.DataType_Int64, []interface{}{int64(1)}), + }}, + {`json_contains_any(ArrayField, {list})`, []*schemapb.FieldData{ + generateExpressionFieldData("list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3), int64(4)}), + }), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.NoError(err) + s.NotNil(plan) + s.NotNil(plan.GetVectorAnns()) + s.NotNil(plan.GetVectorAnns().GetPredicates()) + } + }) + + s.Run("failed case", func() { + testcases := []testcase{ + {`json_contains(ArrayField[0], {str})`, []*schemapb.FieldData{ + generateExpressionFieldData("str", schemapb.DataType_String, []interface{}{"abc"}), + }}, + {`json_contains_any(JSONField, {not_array})`, []*schemapb.FieldData{ + generateExpressionFieldData("not_array", schemapb.DataType_Int64, []interface{}{int64(1)}), + }}, + {`json_contains_all(JSONField, {not_array})`, []*schemapb.FieldData{ + generateExpressionFieldData("not_array", schemapb.DataType_Int64, []interface{}{int64(1)}), + }}, + {`json_contains_all(JSONField, {not_array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3)}), + }), + }}, + {`json_contains_all(ArrayField, {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_JSON, []interface{}{s.jsonMarshal(1), s.jsonMarshal("abc"), s.jsonMarshal("2.2"), s.jsonMarshal(false)}), + }), + }}, + {`json_contains(ArrayField, {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_Int64, []interface{}{int64(1), int64(2), int64(3)}), + }), + }}, + {`json_contains_any(ArrayField, {array})`, []*schemapb.FieldData{ + generateExpressionFieldData("array", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_JSON, []interface{}{s.jsonMarshal(1), s.jsonMarshal("abc"), s.jsonMarshal("2.2"), s.jsonMarshal(false)}), + }), + }}, + } + schemaH := newTestSchemaHelper(s.T()) + + for _, c := range testcases { + plan, err := CreateSearchPlan(schemaH, c.expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, c.values...) + + s.Error(err) + s.Nil(plan) + } + }) +} diff --git a/internal/parser/planparserv2/generated/Plan.interp b/internal/parser/planparserv2/generated/Plan.interp index 41ef66eeefa7d..0a6061d7acc07 100644 --- a/internal/parser/planparserv2/generated/Plan.interp +++ b/internal/parser/planparserv2/generated/Plan.interp @@ -5,6 +5,8 @@ null '[' ',' ']' +'{' +'}' '<' '<=' '>' @@ -54,6 +56,8 @@ null null null null +LBRACE +RBRACE LT LE GT @@ -101,4 +105,4 @@ expr atn: -[4, 1, 46, 123, 2, 0, 7, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 18, 8, 0, 10, 0, 12, 0, 21, 9, 0, 1, 0, 3, 0, 24, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 64, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 80, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 118, 8, 0, 10, 0, 12, 0, 121, 9, 0, 1, 0, 0, 1, 0, 1, 0, 0, 12, 2, 0, 15, 16, 28, 29, 2, 0, 32, 32, 35, 35, 2, 0, 33, 33, 36, 36, 2, 0, 34, 34, 37, 37, 2, 0, 42, 42, 44, 44, 1, 0, 17, 19, 1, 0, 15, 16, 1, 0, 21, 22, 1, 0, 6, 7, 1, 0, 8, 9, 1, 0, 6, 9, 1, 0, 10, 11, 154, 0, 63, 1, 0, 0, 0, 2, 3, 6, 0, -1, 0, 3, 64, 5, 40, 0, 0, 4, 64, 5, 41, 0, 0, 5, 64, 5, 39, 0, 0, 6, 64, 5, 43, 0, 0, 7, 64, 5, 42, 0, 0, 8, 64, 5, 44, 0, 0, 9, 10, 5, 1, 0, 0, 10, 11, 3, 0, 0, 0, 11, 12, 5, 2, 0, 0, 12, 64, 1, 0, 0, 0, 13, 14, 5, 3, 0, 0, 14, 19, 3, 0, 0, 0, 15, 16, 5, 4, 0, 0, 16, 18, 3, 0, 0, 0, 17, 15, 1, 0, 0, 0, 18, 21, 1, 0, 0, 0, 19, 17, 1, 0, 0, 0, 19, 20, 1, 0, 0, 0, 20, 23, 1, 0, 0, 0, 21, 19, 1, 0, 0, 0, 22, 24, 5, 4, 0, 0, 23, 22, 1, 0, 0, 0, 23, 24, 1, 0, 0, 0, 24, 25, 1, 0, 0, 0, 25, 26, 5, 5, 0, 0, 26, 64, 1, 0, 0, 0, 27, 64, 5, 31, 0, 0, 28, 29, 5, 14, 0, 0, 29, 30, 5, 1, 0, 0, 30, 31, 5, 42, 0, 0, 31, 32, 5, 4, 0, 0, 32, 33, 5, 43, 0, 0, 33, 64, 5, 2, 0, 0, 34, 35, 7, 0, 0, 0, 35, 64, 3, 0, 0, 19, 36, 37, 7, 1, 0, 0, 37, 38, 5, 1, 0, 0, 38, 39, 3, 0, 0, 0, 39, 40, 5, 4, 0, 0, 40, 41, 3, 0, 0, 0, 41, 42, 5, 2, 0, 0, 42, 64, 1, 0, 0, 0, 43, 44, 7, 2, 0, 0, 44, 45, 5, 1, 0, 0, 45, 46, 3, 0, 0, 0, 46, 47, 5, 4, 0, 0, 47, 48, 3, 0, 0, 0, 48, 49, 5, 2, 0, 0, 49, 64, 1, 0, 0, 0, 50, 51, 7, 3, 0, 0, 51, 52, 5, 1, 0, 0, 52, 53, 3, 0, 0, 0, 53, 54, 5, 4, 0, 0, 54, 55, 3, 0, 0, 0, 55, 56, 5, 2, 0, 0, 56, 64, 1, 0, 0, 0, 57, 58, 5, 38, 0, 0, 58, 59, 5, 1, 0, 0, 59, 60, 7, 4, 0, 0, 60, 64, 5, 2, 0, 0, 61, 62, 5, 13, 0, 0, 62, 64, 3, 0, 0, 1, 63, 2, 1, 0, 0, 0, 63, 4, 1, 0, 0, 0, 63, 5, 1, 0, 0, 0, 63, 6, 1, 0, 0, 0, 63, 7, 1, 0, 0, 0, 63, 8, 1, 0, 0, 0, 63, 9, 1, 0, 0, 0, 63, 13, 1, 0, 0, 0, 63, 27, 1, 0, 0, 0, 63, 28, 1, 0, 0, 0, 63, 34, 1, 0, 0, 0, 63, 36, 1, 0, 0, 0, 63, 43, 1, 0, 0, 0, 63, 50, 1, 0, 0, 0, 63, 57, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 64, 119, 1, 0, 0, 0, 65, 66, 10, 20, 0, 0, 66, 67, 5, 20, 0, 0, 67, 118, 3, 0, 0, 21, 68, 69, 10, 18, 0, 0, 69, 70, 7, 5, 0, 0, 70, 118, 3, 0, 0, 19, 71, 72, 10, 17, 0, 0, 72, 73, 7, 6, 0, 0, 73, 118, 3, 0, 0, 18, 74, 75, 10, 16, 0, 0, 75, 76, 7, 7, 0, 0, 76, 118, 3, 0, 0, 17, 77, 79, 10, 15, 0, 0, 78, 80, 5, 29, 0, 0, 79, 78, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 82, 5, 30, 0, 0, 82, 118, 3, 0, 0, 16, 83, 84, 10, 10, 0, 0, 84, 85, 7, 8, 0, 0, 85, 86, 7, 4, 0, 0, 86, 87, 7, 8, 0, 0, 87, 118, 3, 0, 0, 11, 88, 89, 10, 9, 0, 0, 89, 90, 7, 9, 0, 0, 90, 91, 7, 4, 0, 0, 91, 92, 7, 9, 0, 0, 92, 118, 3, 0, 0, 10, 93, 94, 10, 8, 0, 0, 94, 95, 7, 10, 0, 0, 95, 118, 3, 0, 0, 9, 96, 97, 10, 7, 0, 0, 97, 98, 7, 11, 0, 0, 98, 118, 3, 0, 0, 8, 99, 100, 10, 6, 0, 0, 100, 101, 5, 23, 0, 0, 101, 118, 3, 0, 0, 7, 102, 103, 10, 5, 0, 0, 103, 104, 5, 25, 0, 0, 104, 118, 3, 0, 0, 6, 105, 106, 10, 4, 0, 0, 106, 107, 5, 24, 0, 0, 107, 118, 3, 0, 0, 5, 108, 109, 10, 3, 0, 0, 109, 110, 5, 26, 0, 0, 110, 118, 3, 0, 0, 4, 111, 112, 10, 2, 0, 0, 112, 113, 5, 27, 0, 0, 113, 118, 3, 0, 0, 3, 114, 115, 10, 22, 0, 0, 115, 116, 5, 12, 0, 0, 116, 118, 5, 43, 0, 0, 117, 65, 1, 0, 0, 0, 117, 68, 1, 0, 0, 0, 117, 71, 1, 0, 0, 0, 117, 74, 1, 0, 0, 0, 117, 77, 1, 0, 0, 0, 117, 83, 1, 0, 0, 0, 117, 88, 1, 0, 0, 0, 117, 93, 1, 0, 0, 0, 117, 96, 1, 0, 0, 0, 117, 99, 1, 0, 0, 0, 117, 102, 1, 0, 0, 0, 117, 105, 1, 0, 0, 0, 117, 108, 1, 0, 0, 0, 117, 111, 1, 0, 0, 0, 117, 114, 1, 0, 0, 0, 118, 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 1, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 6, 19, 23, 63, 79, 117, 119] \ No newline at end of file +[4, 1, 48, 126, 2, 0, 7, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 21, 8, 0, 10, 0, 12, 0, 24, 9, 0, 1, 0, 3, 0, 27, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 67, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 83, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 121, 8, 0, 10, 0, 12, 0, 124, 9, 0, 1, 0, 0, 1, 0, 1, 0, 0, 12, 2, 0, 17, 18, 30, 31, 2, 0, 34, 34, 37, 37, 2, 0, 35, 35, 38, 38, 2, 0, 36, 36, 39, 39, 2, 0, 44, 44, 46, 46, 1, 0, 19, 21, 1, 0, 17, 18, 1, 0, 23, 24, 1, 0, 8, 9, 1, 0, 10, 11, 1, 0, 8, 11, 1, 0, 12, 13, 158, 0, 66, 1, 0, 0, 0, 2, 3, 6, 0, -1, 0, 3, 67, 5, 42, 0, 0, 4, 67, 5, 43, 0, 0, 5, 67, 5, 41, 0, 0, 6, 67, 5, 45, 0, 0, 7, 67, 5, 44, 0, 0, 8, 67, 5, 46, 0, 0, 9, 10, 5, 6, 0, 0, 10, 11, 5, 44, 0, 0, 11, 67, 5, 7, 0, 0, 12, 13, 5, 1, 0, 0, 13, 14, 3, 0, 0, 0, 14, 15, 5, 2, 0, 0, 15, 67, 1, 0, 0, 0, 16, 17, 5, 3, 0, 0, 17, 22, 3, 0, 0, 0, 18, 19, 5, 4, 0, 0, 19, 21, 3, 0, 0, 0, 20, 18, 1, 0, 0, 0, 21, 24, 1, 0, 0, 0, 22, 20, 1, 0, 0, 0, 22, 23, 1, 0, 0, 0, 23, 26, 1, 0, 0, 0, 24, 22, 1, 0, 0, 0, 25, 27, 5, 4, 0, 0, 26, 25, 1, 0, 0, 0, 26, 27, 1, 0, 0, 0, 27, 28, 1, 0, 0, 0, 28, 29, 5, 5, 0, 0, 29, 67, 1, 0, 0, 0, 30, 67, 5, 33, 0, 0, 31, 32, 5, 16, 0, 0, 32, 33, 5, 1, 0, 0, 33, 34, 5, 44, 0, 0, 34, 35, 5, 4, 0, 0, 35, 36, 5, 45, 0, 0, 36, 67, 5, 2, 0, 0, 37, 38, 7, 0, 0, 0, 38, 67, 3, 0, 0, 19, 39, 40, 7, 1, 0, 0, 40, 41, 5, 1, 0, 0, 41, 42, 3, 0, 0, 0, 42, 43, 5, 4, 0, 0, 43, 44, 3, 0, 0, 0, 44, 45, 5, 2, 0, 0, 45, 67, 1, 0, 0, 0, 46, 47, 7, 2, 0, 0, 47, 48, 5, 1, 0, 0, 48, 49, 3, 0, 0, 0, 49, 50, 5, 4, 0, 0, 50, 51, 3, 0, 0, 0, 51, 52, 5, 2, 0, 0, 52, 67, 1, 0, 0, 0, 53, 54, 7, 3, 0, 0, 54, 55, 5, 1, 0, 0, 55, 56, 3, 0, 0, 0, 56, 57, 5, 4, 0, 0, 57, 58, 3, 0, 0, 0, 58, 59, 5, 2, 0, 0, 59, 67, 1, 0, 0, 0, 60, 61, 5, 40, 0, 0, 61, 62, 5, 1, 0, 0, 62, 63, 7, 4, 0, 0, 63, 67, 5, 2, 0, 0, 64, 65, 5, 15, 0, 0, 65, 67, 3, 0, 0, 1, 66, 2, 1, 0, 0, 0, 66, 4, 1, 0, 0, 0, 66, 5, 1, 0, 0, 0, 66, 6, 1, 0, 0, 0, 66, 7, 1, 0, 0, 0, 66, 8, 1, 0, 0, 0, 66, 9, 1, 0, 0, 0, 66, 12, 1, 0, 0, 0, 66, 16, 1, 0, 0, 0, 66, 30, 1, 0, 0, 0, 66, 31, 1, 0, 0, 0, 66, 37, 1, 0, 0, 0, 66, 39, 1, 0, 0, 0, 66, 46, 1, 0, 0, 0, 66, 53, 1, 0, 0, 0, 66, 60, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 67, 122, 1, 0, 0, 0, 68, 69, 10, 20, 0, 0, 69, 70, 5, 22, 0, 0, 70, 121, 3, 0, 0, 21, 71, 72, 10, 18, 0, 0, 72, 73, 7, 5, 0, 0, 73, 121, 3, 0, 0, 19, 74, 75, 10, 17, 0, 0, 75, 76, 7, 6, 0, 0, 76, 121, 3, 0, 0, 18, 77, 78, 10, 16, 0, 0, 78, 79, 7, 7, 0, 0, 79, 121, 3, 0, 0, 17, 80, 82, 10, 15, 0, 0, 81, 83, 5, 31, 0, 0, 82, 81, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 85, 5, 32, 0, 0, 85, 121, 3, 0, 0, 16, 86, 87, 10, 10, 0, 0, 87, 88, 7, 8, 0, 0, 88, 89, 7, 4, 0, 0, 89, 90, 7, 8, 0, 0, 90, 121, 3, 0, 0, 11, 91, 92, 10, 9, 0, 0, 92, 93, 7, 9, 0, 0, 93, 94, 7, 4, 0, 0, 94, 95, 7, 9, 0, 0, 95, 121, 3, 0, 0, 10, 96, 97, 10, 8, 0, 0, 97, 98, 7, 10, 0, 0, 98, 121, 3, 0, 0, 9, 99, 100, 10, 7, 0, 0, 100, 101, 7, 11, 0, 0, 101, 121, 3, 0, 0, 8, 102, 103, 10, 6, 0, 0, 103, 104, 5, 25, 0, 0, 104, 121, 3, 0, 0, 7, 105, 106, 10, 5, 0, 0, 106, 107, 5, 27, 0, 0, 107, 121, 3, 0, 0, 6, 108, 109, 10, 4, 0, 0, 109, 110, 5, 26, 0, 0, 110, 121, 3, 0, 0, 5, 111, 112, 10, 3, 0, 0, 112, 113, 5, 28, 0, 0, 113, 121, 3, 0, 0, 4, 114, 115, 10, 2, 0, 0, 115, 116, 5, 29, 0, 0, 116, 121, 3, 0, 0, 3, 117, 118, 10, 22, 0, 0, 118, 119, 5, 14, 0, 0, 119, 121, 5, 45, 0, 0, 120, 68, 1, 0, 0, 0, 120, 71, 1, 0, 0, 0, 120, 74, 1, 0, 0, 0, 120, 77, 1, 0, 0, 0, 120, 80, 1, 0, 0, 0, 120, 86, 1, 0, 0, 0, 120, 91, 1, 0, 0, 0, 120, 96, 1, 0, 0, 0, 120, 99, 1, 0, 0, 0, 120, 102, 1, 0, 0, 0, 120, 105, 1, 0, 0, 0, 120, 108, 1, 0, 0, 0, 120, 111, 1, 0, 0, 0, 120, 114, 1, 0, 0, 0, 120, 117, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 1, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 6, 22, 26, 66, 82, 120, 122] \ No newline at end of file diff --git a/internal/parser/planparserv2/generated/Plan.tokens b/internal/parser/planparserv2/generated/Plan.tokens index 766b852b6b4f2..5d12236e1a2b0 100644 --- a/internal/parser/planparserv2/generated/Plan.tokens +++ b/internal/parser/planparserv2/generated/Plan.tokens @@ -3,67 +3,71 @@ T__1=2 T__2=3 T__3=4 T__4=5 -LT=6 -LE=7 -GT=8 -GE=9 -EQ=10 -NE=11 -LIKE=12 -EXISTS=13 -TEXTMATCH=14 -ADD=15 -SUB=16 -MUL=17 -DIV=18 -MOD=19 -POW=20 -SHL=21 -SHR=22 -BAND=23 -BOR=24 -BXOR=25 -AND=26 -OR=27 -BNOT=28 -NOT=29 -IN=30 -EmptyArray=31 -JSONContains=32 -JSONContainsAll=33 -JSONContainsAny=34 -ArrayContains=35 -ArrayContainsAll=36 -ArrayContainsAny=37 -ArrayLength=38 -BooleanConstant=39 -IntegerConstant=40 -FloatingConstant=41 -Identifier=42 -StringLiteral=43 -JSONIdentifier=44 -Whitespace=45 -Newline=46 +LBRACE=6 +RBRACE=7 +LT=8 +LE=9 +GT=10 +GE=11 +EQ=12 +NE=13 +LIKE=14 +EXISTS=15 +TEXTMATCH=16 +ADD=17 +SUB=18 +MUL=19 +DIV=20 +MOD=21 +POW=22 +SHL=23 +SHR=24 +BAND=25 +BOR=26 +BXOR=27 +AND=28 +OR=29 +BNOT=30 +NOT=31 +IN=32 +EmptyArray=33 +JSONContains=34 +JSONContainsAll=35 +JSONContainsAny=36 +ArrayContains=37 +ArrayContainsAll=38 +ArrayContainsAny=39 +ArrayLength=40 +BooleanConstant=41 +IntegerConstant=42 +FloatingConstant=43 +Identifier=44 +StringLiteral=45 +JSONIdentifier=46 +Whitespace=47 +Newline=48 '('=1 ')'=2 '['=3 ','=4 ']'=5 -'<'=6 -'<='=7 -'>'=8 -'>='=9 -'=='=10 -'!='=11 -'+'=15 -'-'=16 -'*'=17 -'/'=18 -'%'=19 -'**'=20 -'<<'=21 -'>>'=22 -'&'=23 -'|'=24 -'^'=25 -'~'=28 +'{'=6 +'}'=7 +'<'=8 +'<='=9 +'>'=10 +'>='=11 +'=='=12 +'!='=13 +'+'=17 +'-'=18 +'*'=19 +'/'=20 +'%'=21 +'**'=22 +'<<'=23 +'>>'=24 +'&'=25 +'|'=26 +'^'=27 +'~'=30 diff --git a/internal/parser/planparserv2/generated/PlanLexer.interp b/internal/parser/planparserv2/generated/PlanLexer.interp index 5291a301fd55d..d8806619f0124 100644 --- a/internal/parser/planparserv2/generated/PlanLexer.interp +++ b/internal/parser/planparserv2/generated/PlanLexer.interp @@ -5,6 +5,8 @@ null '[' ',' ']' +'{' +'}' '<' '<=' '>' @@ -54,6 +56,8 @@ null null null null +LBRACE +RBRACE LT LE GT @@ -102,6 +106,8 @@ T__1 T__2 T__3 T__4 +LBRACE +RBRACE LT LE GT @@ -177,4 +183,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 46, 777, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 178, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 192, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 221, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 253, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 259, 8, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 267, 8, 28, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 273, 8, 29, 1, 30, 1, 30, 1, 30, 5, 30, 278, 8, 30, 10, 30, 12, 30, 281, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 311, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 347, 8, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 383, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 413, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 451, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 489, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 515, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 544, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 550, 8, 39, 1, 40, 1, 40, 3, 40, 554, 8, 40, 1, 41, 1, 41, 1, 41, 5, 41, 559, 8, 41, 10, 41, 12, 41, 562, 9, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 569, 8, 41, 1, 42, 3, 42, 572, 8, 42, 1, 42, 1, 42, 3, 42, 576, 8, 42, 1, 42, 1, 42, 1, 42, 3, 42, 581, 8, 42, 1, 42, 3, 42, 584, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 590, 8, 43, 1, 43, 1, 43, 4, 43, 594, 8, 43, 11, 43, 12, 43, 595, 1, 44, 1, 44, 1, 44, 3, 44, 601, 8, 44, 1, 45, 4, 45, 604, 8, 45, 11, 45, 12, 45, 605, 1, 46, 4, 46, 609, 8, 46, 11, 46, 12, 46, 610, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 620, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 629, 8, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 4, 51, 638, 8, 51, 11, 51, 12, 51, 639, 1, 52, 1, 52, 5, 52, 644, 8, 52, 10, 52, 12, 52, 647, 9, 52, 1, 52, 3, 52, 650, 8, 52, 1, 53, 1, 53, 5, 53, 654, 8, 53, 10, 53, 12, 53, 657, 9, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 684, 8, 59, 1, 60, 1, 60, 3, 60, 688, 8, 60, 1, 60, 1, 60, 1, 60, 3, 60, 693, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 699, 8, 61, 1, 61, 1, 61, 1, 62, 3, 62, 704, 8, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 711, 8, 62, 1, 63, 1, 63, 3, 63, 715, 8, 63, 1, 63, 1, 63, 1, 64, 4, 64, 720, 8, 64, 11, 64, 12, 64, 721, 1, 65, 3, 65, 725, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 732, 8, 65, 1, 66, 4, 66, 735, 8, 66, 11, 66, 12, 66, 736, 1, 67, 1, 67, 3, 67, 741, 8, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 750, 8, 68, 1, 68, 3, 68, 753, 8, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 760, 8, 68, 1, 69, 4, 69, 763, 8, 69, 11, 69, 12, 69, 764, 1, 69, 1, 69, 1, 70, 1, 70, 3, 70, 771, 8, 70, 1, 70, 3, 70, 774, 8, 70, 1, 70, 1, 70, 0, 0, 71, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 0, 91, 0, 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, 129, 0, 131, 0, 133, 0, 135, 0, 137, 0, 139, 45, 141, 46, 1, 0, 16, 3, 0, 76, 76, 85, 85, 117, 117, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 4, 0, 10, 10, 13, 13, 39, 39, 92, 92, 3, 0, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 2, 0, 66, 66, 98, 98, 1, 0, 48, 49, 2, 0, 88, 88, 120, 120, 1, 0, 49, 57, 1, 0, 48, 55, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 2, 0, 80, 80, 112, 112, 10, 0, 34, 34, 39, 39, 63, 63, 92, 92, 97, 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, 2, 0, 9, 9, 32, 32, 819, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 1, 143, 1, 0, 0, 0, 3, 145, 1, 0, 0, 0, 5, 147, 1, 0, 0, 0, 7, 149, 1, 0, 0, 0, 9, 151, 1, 0, 0, 0, 11, 153, 1, 0, 0, 0, 13, 155, 1, 0, 0, 0, 15, 158, 1, 0, 0, 0, 17, 160, 1, 0, 0, 0, 19, 163, 1, 0, 0, 0, 21, 166, 1, 0, 0, 0, 23, 177, 1, 0, 0, 0, 25, 191, 1, 0, 0, 0, 27, 220, 1, 0, 0, 0, 29, 222, 1, 0, 0, 0, 31, 224, 1, 0, 0, 0, 33, 226, 1, 0, 0, 0, 35, 228, 1, 0, 0, 0, 37, 230, 1, 0, 0, 0, 39, 232, 1, 0, 0, 0, 41, 235, 1, 0, 0, 0, 43, 238, 1, 0, 0, 0, 45, 241, 1, 0, 0, 0, 47, 243, 1, 0, 0, 0, 49, 245, 1, 0, 0, 0, 51, 252, 1, 0, 0, 0, 53, 258, 1, 0, 0, 0, 55, 260, 1, 0, 0, 0, 57, 266, 1, 0, 0, 0, 59, 272, 1, 0, 0, 0, 61, 274, 1, 0, 0, 0, 63, 310, 1, 0, 0, 0, 65, 346, 1, 0, 0, 0, 67, 382, 1, 0, 0, 0, 69, 412, 1, 0, 0, 0, 71, 450, 1, 0, 0, 0, 73, 488, 1, 0, 0, 0, 75, 514, 1, 0, 0, 0, 77, 543, 1, 0, 0, 0, 79, 549, 1, 0, 0, 0, 81, 553, 1, 0, 0, 0, 83, 568, 1, 0, 0, 0, 85, 571, 1, 0, 0, 0, 87, 585, 1, 0, 0, 0, 89, 600, 1, 0, 0, 0, 91, 603, 1, 0, 0, 0, 93, 608, 1, 0, 0, 0, 95, 619, 1, 0, 0, 0, 97, 628, 1, 0, 0, 0, 99, 630, 1, 0, 0, 0, 101, 632, 1, 0, 0, 0, 103, 634, 1, 0, 0, 0, 105, 649, 1, 0, 0, 0, 107, 651, 1, 0, 0, 0, 109, 658, 1, 0, 0, 0, 111, 662, 1, 0, 0, 0, 113, 664, 1, 0, 0, 0, 115, 666, 1, 0, 0, 0, 117, 668, 1, 0, 0, 0, 119, 683, 1, 0, 0, 0, 121, 692, 1, 0, 0, 0, 123, 694, 1, 0, 0, 0, 125, 710, 1, 0, 0, 0, 127, 712, 1, 0, 0, 0, 129, 719, 1, 0, 0, 0, 131, 731, 1, 0, 0, 0, 133, 734, 1, 0, 0, 0, 135, 738, 1, 0, 0, 0, 137, 759, 1, 0, 0, 0, 139, 762, 1, 0, 0, 0, 141, 773, 1, 0, 0, 0, 143, 144, 5, 40, 0, 0, 144, 2, 1, 0, 0, 0, 145, 146, 5, 41, 0, 0, 146, 4, 1, 0, 0, 0, 147, 148, 5, 91, 0, 0, 148, 6, 1, 0, 0, 0, 149, 150, 5, 44, 0, 0, 150, 8, 1, 0, 0, 0, 151, 152, 5, 93, 0, 0, 152, 10, 1, 0, 0, 0, 153, 154, 5, 60, 0, 0, 154, 12, 1, 0, 0, 0, 155, 156, 5, 60, 0, 0, 156, 157, 5, 61, 0, 0, 157, 14, 1, 0, 0, 0, 158, 159, 5, 62, 0, 0, 159, 16, 1, 0, 0, 0, 160, 161, 5, 62, 0, 0, 161, 162, 5, 61, 0, 0, 162, 18, 1, 0, 0, 0, 163, 164, 5, 61, 0, 0, 164, 165, 5, 61, 0, 0, 165, 20, 1, 0, 0, 0, 166, 167, 5, 33, 0, 0, 167, 168, 5, 61, 0, 0, 168, 22, 1, 0, 0, 0, 169, 170, 5, 108, 0, 0, 170, 171, 5, 105, 0, 0, 171, 172, 5, 107, 0, 0, 172, 178, 5, 101, 0, 0, 173, 174, 5, 76, 0, 0, 174, 175, 5, 73, 0, 0, 175, 176, 5, 75, 0, 0, 176, 178, 5, 69, 0, 0, 177, 169, 1, 0, 0, 0, 177, 173, 1, 0, 0, 0, 178, 24, 1, 0, 0, 0, 179, 180, 5, 101, 0, 0, 180, 181, 5, 120, 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 115, 0, 0, 183, 184, 5, 116, 0, 0, 184, 192, 5, 115, 0, 0, 185, 186, 5, 69, 0, 0, 186, 187, 5, 88, 0, 0, 187, 188, 5, 73, 0, 0, 188, 189, 5, 83, 0, 0, 189, 190, 5, 84, 0, 0, 190, 192, 5, 83, 0, 0, 191, 179, 1, 0, 0, 0, 191, 185, 1, 0, 0, 0, 192, 26, 1, 0, 0, 0, 193, 194, 5, 84, 0, 0, 194, 195, 5, 101, 0, 0, 195, 196, 5, 120, 0, 0, 196, 197, 5, 116, 0, 0, 197, 198, 5, 77, 0, 0, 198, 199, 5, 97, 0, 0, 199, 200, 5, 116, 0, 0, 200, 201, 5, 99, 0, 0, 201, 221, 5, 104, 0, 0, 202, 203, 5, 116, 0, 0, 203, 204, 5, 101, 0, 0, 204, 205, 5, 120, 0, 0, 205, 206, 5, 116, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, 97, 0, 0, 208, 209, 5, 116, 0, 0, 209, 210, 5, 99, 0, 0, 210, 221, 5, 104, 0, 0, 211, 212, 5, 84, 0, 0, 212, 213, 5, 69, 0, 0, 213, 214, 5, 88, 0, 0, 214, 215, 5, 84, 0, 0, 215, 216, 5, 77, 0, 0, 216, 217, 5, 65, 0, 0, 217, 218, 5, 84, 0, 0, 218, 219, 5, 67, 0, 0, 219, 221, 5, 72, 0, 0, 220, 193, 1, 0, 0, 0, 220, 202, 1, 0, 0, 0, 220, 211, 1, 0, 0, 0, 221, 28, 1, 0, 0, 0, 222, 223, 5, 43, 0, 0, 223, 30, 1, 0, 0, 0, 224, 225, 5, 45, 0, 0, 225, 32, 1, 0, 0, 0, 226, 227, 5, 42, 0, 0, 227, 34, 1, 0, 0, 0, 228, 229, 5, 47, 0, 0, 229, 36, 1, 0, 0, 0, 230, 231, 5, 37, 0, 0, 231, 38, 1, 0, 0, 0, 232, 233, 5, 42, 0, 0, 233, 234, 5, 42, 0, 0, 234, 40, 1, 0, 0, 0, 235, 236, 5, 60, 0, 0, 236, 237, 5, 60, 0, 0, 237, 42, 1, 0, 0, 0, 238, 239, 5, 62, 0, 0, 239, 240, 5, 62, 0, 0, 240, 44, 1, 0, 0, 0, 241, 242, 5, 38, 0, 0, 242, 46, 1, 0, 0, 0, 243, 244, 5, 124, 0, 0, 244, 48, 1, 0, 0, 0, 245, 246, 5, 94, 0, 0, 246, 50, 1, 0, 0, 0, 247, 248, 5, 38, 0, 0, 248, 253, 5, 38, 0, 0, 249, 250, 5, 97, 0, 0, 250, 251, 5, 110, 0, 0, 251, 253, 5, 100, 0, 0, 252, 247, 1, 0, 0, 0, 252, 249, 1, 0, 0, 0, 253, 52, 1, 0, 0, 0, 254, 255, 5, 124, 0, 0, 255, 259, 5, 124, 0, 0, 256, 257, 5, 111, 0, 0, 257, 259, 5, 114, 0, 0, 258, 254, 1, 0, 0, 0, 258, 256, 1, 0, 0, 0, 259, 54, 1, 0, 0, 0, 260, 261, 5, 126, 0, 0, 261, 56, 1, 0, 0, 0, 262, 267, 5, 33, 0, 0, 263, 264, 5, 110, 0, 0, 264, 265, 5, 111, 0, 0, 265, 267, 5, 116, 0, 0, 266, 262, 1, 0, 0, 0, 266, 263, 1, 0, 0, 0, 267, 58, 1, 0, 0, 0, 268, 269, 5, 105, 0, 0, 269, 273, 5, 110, 0, 0, 270, 271, 5, 73, 0, 0, 271, 273, 5, 78, 0, 0, 272, 268, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 273, 60, 1, 0, 0, 0, 274, 279, 5, 91, 0, 0, 275, 278, 3, 139, 69, 0, 276, 278, 3, 141, 70, 0, 277, 275, 1, 0, 0, 0, 277, 276, 1, 0, 0, 0, 278, 281, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 282, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 282, 283, 5, 93, 0, 0, 283, 62, 1, 0, 0, 0, 284, 285, 5, 106, 0, 0, 285, 286, 5, 115, 0, 0, 286, 287, 5, 111, 0, 0, 287, 288, 5, 110, 0, 0, 288, 289, 5, 95, 0, 0, 289, 290, 5, 99, 0, 0, 290, 291, 5, 111, 0, 0, 291, 292, 5, 110, 0, 0, 292, 293, 5, 116, 0, 0, 293, 294, 5, 97, 0, 0, 294, 295, 5, 105, 0, 0, 295, 296, 5, 110, 0, 0, 296, 311, 5, 115, 0, 0, 297, 298, 5, 74, 0, 0, 298, 299, 5, 83, 0, 0, 299, 300, 5, 79, 0, 0, 300, 301, 5, 78, 0, 0, 301, 302, 5, 95, 0, 0, 302, 303, 5, 67, 0, 0, 303, 304, 5, 79, 0, 0, 304, 305, 5, 78, 0, 0, 305, 306, 5, 84, 0, 0, 306, 307, 5, 65, 0, 0, 307, 308, 5, 73, 0, 0, 308, 309, 5, 78, 0, 0, 309, 311, 5, 83, 0, 0, 310, 284, 1, 0, 0, 0, 310, 297, 1, 0, 0, 0, 311, 64, 1, 0, 0, 0, 312, 313, 5, 106, 0, 0, 313, 314, 5, 115, 0, 0, 314, 315, 5, 111, 0, 0, 315, 316, 5, 110, 0, 0, 316, 317, 5, 95, 0, 0, 317, 318, 5, 99, 0, 0, 318, 319, 5, 111, 0, 0, 319, 320, 5, 110, 0, 0, 320, 321, 5, 116, 0, 0, 321, 322, 5, 97, 0, 0, 322, 323, 5, 105, 0, 0, 323, 324, 5, 110, 0, 0, 324, 325, 5, 115, 0, 0, 325, 326, 5, 95, 0, 0, 326, 327, 5, 97, 0, 0, 327, 328, 5, 108, 0, 0, 328, 347, 5, 108, 0, 0, 329, 330, 5, 74, 0, 0, 330, 331, 5, 83, 0, 0, 331, 332, 5, 79, 0, 0, 332, 333, 5, 78, 0, 0, 333, 334, 5, 95, 0, 0, 334, 335, 5, 67, 0, 0, 335, 336, 5, 79, 0, 0, 336, 337, 5, 78, 0, 0, 337, 338, 5, 84, 0, 0, 338, 339, 5, 65, 0, 0, 339, 340, 5, 73, 0, 0, 340, 341, 5, 78, 0, 0, 341, 342, 5, 83, 0, 0, 342, 343, 5, 95, 0, 0, 343, 344, 5, 65, 0, 0, 344, 345, 5, 76, 0, 0, 345, 347, 5, 76, 0, 0, 346, 312, 1, 0, 0, 0, 346, 329, 1, 0, 0, 0, 347, 66, 1, 0, 0, 0, 348, 349, 5, 106, 0, 0, 349, 350, 5, 115, 0, 0, 350, 351, 5, 111, 0, 0, 351, 352, 5, 110, 0, 0, 352, 353, 5, 95, 0, 0, 353, 354, 5, 99, 0, 0, 354, 355, 5, 111, 0, 0, 355, 356, 5, 110, 0, 0, 356, 357, 5, 116, 0, 0, 357, 358, 5, 97, 0, 0, 358, 359, 5, 105, 0, 0, 359, 360, 5, 110, 0, 0, 360, 361, 5, 115, 0, 0, 361, 362, 5, 95, 0, 0, 362, 363, 5, 97, 0, 0, 363, 364, 5, 110, 0, 0, 364, 383, 5, 121, 0, 0, 365, 366, 5, 74, 0, 0, 366, 367, 5, 83, 0, 0, 367, 368, 5, 79, 0, 0, 368, 369, 5, 78, 0, 0, 369, 370, 5, 95, 0, 0, 370, 371, 5, 67, 0, 0, 371, 372, 5, 79, 0, 0, 372, 373, 5, 78, 0, 0, 373, 374, 5, 84, 0, 0, 374, 375, 5, 65, 0, 0, 375, 376, 5, 73, 0, 0, 376, 377, 5, 78, 0, 0, 377, 378, 5, 83, 0, 0, 378, 379, 5, 95, 0, 0, 379, 380, 5, 65, 0, 0, 380, 381, 5, 78, 0, 0, 381, 383, 5, 89, 0, 0, 382, 348, 1, 0, 0, 0, 382, 365, 1, 0, 0, 0, 383, 68, 1, 0, 0, 0, 384, 385, 5, 97, 0, 0, 385, 386, 5, 114, 0, 0, 386, 387, 5, 114, 0, 0, 387, 388, 5, 97, 0, 0, 388, 389, 5, 121, 0, 0, 389, 390, 5, 95, 0, 0, 390, 391, 5, 99, 0, 0, 391, 392, 5, 111, 0, 0, 392, 393, 5, 110, 0, 0, 393, 394, 5, 116, 0, 0, 394, 395, 5, 97, 0, 0, 395, 396, 5, 105, 0, 0, 396, 397, 5, 110, 0, 0, 397, 413, 5, 115, 0, 0, 398, 399, 5, 65, 0, 0, 399, 400, 5, 82, 0, 0, 400, 401, 5, 82, 0, 0, 401, 402, 5, 65, 0, 0, 402, 403, 5, 89, 0, 0, 403, 404, 5, 95, 0, 0, 404, 405, 5, 67, 0, 0, 405, 406, 5, 79, 0, 0, 406, 407, 5, 78, 0, 0, 407, 408, 5, 84, 0, 0, 408, 409, 5, 65, 0, 0, 409, 410, 5, 73, 0, 0, 410, 411, 5, 78, 0, 0, 411, 413, 5, 83, 0, 0, 412, 384, 1, 0, 0, 0, 412, 398, 1, 0, 0, 0, 413, 70, 1, 0, 0, 0, 414, 415, 5, 97, 0, 0, 415, 416, 5, 114, 0, 0, 416, 417, 5, 114, 0, 0, 417, 418, 5, 97, 0, 0, 418, 419, 5, 121, 0, 0, 419, 420, 5, 95, 0, 0, 420, 421, 5, 99, 0, 0, 421, 422, 5, 111, 0, 0, 422, 423, 5, 110, 0, 0, 423, 424, 5, 116, 0, 0, 424, 425, 5, 97, 0, 0, 425, 426, 5, 105, 0, 0, 426, 427, 5, 110, 0, 0, 427, 428, 5, 115, 0, 0, 428, 429, 5, 95, 0, 0, 429, 430, 5, 97, 0, 0, 430, 431, 5, 108, 0, 0, 431, 451, 5, 108, 0, 0, 432, 433, 5, 65, 0, 0, 433, 434, 5, 82, 0, 0, 434, 435, 5, 82, 0, 0, 435, 436, 5, 65, 0, 0, 436, 437, 5, 89, 0, 0, 437, 438, 5, 95, 0, 0, 438, 439, 5, 67, 0, 0, 439, 440, 5, 79, 0, 0, 440, 441, 5, 78, 0, 0, 441, 442, 5, 84, 0, 0, 442, 443, 5, 65, 0, 0, 443, 444, 5, 73, 0, 0, 444, 445, 5, 78, 0, 0, 445, 446, 5, 83, 0, 0, 446, 447, 5, 95, 0, 0, 447, 448, 5, 65, 0, 0, 448, 449, 5, 76, 0, 0, 449, 451, 5, 76, 0, 0, 450, 414, 1, 0, 0, 0, 450, 432, 1, 0, 0, 0, 451, 72, 1, 0, 0, 0, 452, 453, 5, 97, 0, 0, 453, 454, 5, 114, 0, 0, 454, 455, 5, 114, 0, 0, 455, 456, 5, 97, 0, 0, 456, 457, 5, 121, 0, 0, 457, 458, 5, 95, 0, 0, 458, 459, 5, 99, 0, 0, 459, 460, 5, 111, 0, 0, 460, 461, 5, 110, 0, 0, 461, 462, 5, 116, 0, 0, 462, 463, 5, 97, 0, 0, 463, 464, 5, 105, 0, 0, 464, 465, 5, 110, 0, 0, 465, 466, 5, 115, 0, 0, 466, 467, 5, 95, 0, 0, 467, 468, 5, 97, 0, 0, 468, 469, 5, 110, 0, 0, 469, 489, 5, 121, 0, 0, 470, 471, 5, 65, 0, 0, 471, 472, 5, 82, 0, 0, 472, 473, 5, 82, 0, 0, 473, 474, 5, 65, 0, 0, 474, 475, 5, 89, 0, 0, 475, 476, 5, 95, 0, 0, 476, 477, 5, 67, 0, 0, 477, 478, 5, 79, 0, 0, 478, 479, 5, 78, 0, 0, 479, 480, 5, 84, 0, 0, 480, 481, 5, 65, 0, 0, 481, 482, 5, 73, 0, 0, 482, 483, 5, 78, 0, 0, 483, 484, 5, 83, 0, 0, 484, 485, 5, 95, 0, 0, 485, 486, 5, 65, 0, 0, 486, 487, 5, 78, 0, 0, 487, 489, 5, 89, 0, 0, 488, 452, 1, 0, 0, 0, 488, 470, 1, 0, 0, 0, 489, 74, 1, 0, 0, 0, 490, 491, 5, 97, 0, 0, 491, 492, 5, 114, 0, 0, 492, 493, 5, 114, 0, 0, 493, 494, 5, 97, 0, 0, 494, 495, 5, 121, 0, 0, 495, 496, 5, 95, 0, 0, 496, 497, 5, 108, 0, 0, 497, 498, 5, 101, 0, 0, 498, 499, 5, 110, 0, 0, 499, 500, 5, 103, 0, 0, 500, 501, 5, 116, 0, 0, 501, 515, 5, 104, 0, 0, 502, 503, 5, 65, 0, 0, 503, 504, 5, 82, 0, 0, 504, 505, 5, 82, 0, 0, 505, 506, 5, 65, 0, 0, 506, 507, 5, 89, 0, 0, 507, 508, 5, 95, 0, 0, 508, 509, 5, 76, 0, 0, 509, 510, 5, 69, 0, 0, 510, 511, 5, 78, 0, 0, 511, 512, 5, 71, 0, 0, 512, 513, 5, 84, 0, 0, 513, 515, 5, 72, 0, 0, 514, 490, 1, 0, 0, 0, 514, 502, 1, 0, 0, 0, 515, 76, 1, 0, 0, 0, 516, 517, 5, 116, 0, 0, 517, 518, 5, 114, 0, 0, 518, 519, 5, 117, 0, 0, 519, 544, 5, 101, 0, 0, 520, 521, 5, 84, 0, 0, 521, 522, 5, 114, 0, 0, 522, 523, 5, 117, 0, 0, 523, 544, 5, 101, 0, 0, 524, 525, 5, 84, 0, 0, 525, 526, 5, 82, 0, 0, 526, 527, 5, 85, 0, 0, 527, 544, 5, 69, 0, 0, 528, 529, 5, 102, 0, 0, 529, 530, 5, 97, 0, 0, 530, 531, 5, 108, 0, 0, 531, 532, 5, 115, 0, 0, 532, 544, 5, 101, 0, 0, 533, 534, 5, 70, 0, 0, 534, 535, 5, 97, 0, 0, 535, 536, 5, 108, 0, 0, 536, 537, 5, 115, 0, 0, 537, 544, 5, 101, 0, 0, 538, 539, 5, 70, 0, 0, 539, 540, 5, 65, 0, 0, 540, 541, 5, 76, 0, 0, 541, 542, 5, 83, 0, 0, 542, 544, 5, 69, 0, 0, 543, 516, 1, 0, 0, 0, 543, 520, 1, 0, 0, 0, 543, 524, 1, 0, 0, 0, 543, 528, 1, 0, 0, 0, 543, 533, 1, 0, 0, 0, 543, 538, 1, 0, 0, 0, 544, 78, 1, 0, 0, 0, 545, 550, 3, 105, 52, 0, 546, 550, 3, 107, 53, 0, 547, 550, 3, 109, 54, 0, 548, 550, 3, 103, 51, 0, 549, 545, 1, 0, 0, 0, 549, 546, 1, 0, 0, 0, 549, 547, 1, 0, 0, 0, 549, 548, 1, 0, 0, 0, 550, 80, 1, 0, 0, 0, 551, 554, 3, 121, 60, 0, 552, 554, 3, 123, 61, 0, 553, 551, 1, 0, 0, 0, 553, 552, 1, 0, 0, 0, 554, 82, 1, 0, 0, 0, 555, 560, 3, 99, 49, 0, 556, 559, 3, 99, 49, 0, 557, 559, 3, 101, 50, 0, 558, 556, 1, 0, 0, 0, 558, 557, 1, 0, 0, 0, 559, 562, 1, 0, 0, 0, 560, 558, 1, 0, 0, 0, 560, 561, 1, 0, 0, 0, 561, 569, 1, 0, 0, 0, 562, 560, 1, 0, 0, 0, 563, 564, 5, 36, 0, 0, 564, 565, 5, 109, 0, 0, 565, 566, 5, 101, 0, 0, 566, 567, 5, 116, 0, 0, 567, 569, 5, 97, 0, 0, 568, 555, 1, 0, 0, 0, 568, 563, 1, 0, 0, 0, 569, 84, 1, 0, 0, 0, 570, 572, 3, 89, 44, 0, 571, 570, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 583, 1, 0, 0, 0, 573, 575, 5, 34, 0, 0, 574, 576, 3, 91, 45, 0, 575, 574, 1, 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 577, 1, 0, 0, 0, 577, 584, 5, 34, 0, 0, 578, 580, 5, 39, 0, 0, 579, 581, 3, 93, 46, 0, 580, 579, 1, 0, 0, 0, 580, 581, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 584, 5, 39, 0, 0, 583, 573, 1, 0, 0, 0, 583, 578, 1, 0, 0, 0, 584, 86, 1, 0, 0, 0, 585, 593, 3, 83, 41, 0, 586, 589, 5, 91, 0, 0, 587, 590, 3, 85, 42, 0, 588, 590, 3, 105, 52, 0, 589, 587, 1, 0, 0, 0, 589, 588, 1, 0, 0, 0, 590, 591, 1, 0, 0, 0, 591, 592, 5, 93, 0, 0, 592, 594, 1, 0, 0, 0, 593, 586, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 593, 1, 0, 0, 0, 595, 596, 1, 0, 0, 0, 596, 88, 1, 0, 0, 0, 597, 598, 5, 117, 0, 0, 598, 601, 5, 56, 0, 0, 599, 601, 7, 0, 0, 0, 600, 597, 1, 0, 0, 0, 600, 599, 1, 0, 0, 0, 601, 90, 1, 0, 0, 0, 602, 604, 3, 95, 47, 0, 603, 602, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 603, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 92, 1, 0, 0, 0, 607, 609, 3, 97, 48, 0, 608, 607, 1, 0, 0, 0, 609, 610, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 94, 1, 0, 0, 0, 612, 620, 8, 1, 0, 0, 613, 620, 3, 137, 68, 0, 614, 615, 5, 92, 0, 0, 615, 620, 5, 10, 0, 0, 616, 617, 5, 92, 0, 0, 617, 618, 5, 13, 0, 0, 618, 620, 5, 10, 0, 0, 619, 612, 1, 0, 0, 0, 619, 613, 1, 0, 0, 0, 619, 614, 1, 0, 0, 0, 619, 616, 1, 0, 0, 0, 620, 96, 1, 0, 0, 0, 621, 629, 8, 2, 0, 0, 622, 629, 3, 137, 68, 0, 623, 624, 5, 92, 0, 0, 624, 629, 5, 10, 0, 0, 625, 626, 5, 92, 0, 0, 626, 627, 5, 13, 0, 0, 627, 629, 5, 10, 0, 0, 628, 621, 1, 0, 0, 0, 628, 622, 1, 0, 0, 0, 628, 623, 1, 0, 0, 0, 628, 625, 1, 0, 0, 0, 629, 98, 1, 0, 0, 0, 630, 631, 7, 3, 0, 0, 631, 100, 1, 0, 0, 0, 632, 633, 7, 4, 0, 0, 633, 102, 1, 0, 0, 0, 634, 635, 5, 48, 0, 0, 635, 637, 7, 5, 0, 0, 636, 638, 7, 6, 0, 0, 637, 636, 1, 0, 0, 0, 638, 639, 1, 0, 0, 0, 639, 637, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 104, 1, 0, 0, 0, 641, 645, 3, 111, 55, 0, 642, 644, 3, 101, 50, 0, 643, 642, 1, 0, 0, 0, 644, 647, 1, 0, 0, 0, 645, 643, 1, 0, 0, 0, 645, 646, 1, 0, 0, 0, 646, 650, 1, 0, 0, 0, 647, 645, 1, 0, 0, 0, 648, 650, 5, 48, 0, 0, 649, 641, 1, 0, 0, 0, 649, 648, 1, 0, 0, 0, 650, 106, 1, 0, 0, 0, 651, 655, 5, 48, 0, 0, 652, 654, 3, 113, 56, 0, 653, 652, 1, 0, 0, 0, 654, 657, 1, 0, 0, 0, 655, 653, 1, 0, 0, 0, 655, 656, 1, 0, 0, 0, 656, 108, 1, 0, 0, 0, 657, 655, 1, 0, 0, 0, 658, 659, 5, 48, 0, 0, 659, 660, 7, 7, 0, 0, 660, 661, 3, 133, 66, 0, 661, 110, 1, 0, 0, 0, 662, 663, 7, 8, 0, 0, 663, 112, 1, 0, 0, 0, 664, 665, 7, 9, 0, 0, 665, 114, 1, 0, 0, 0, 666, 667, 7, 10, 0, 0, 667, 116, 1, 0, 0, 0, 668, 669, 3, 115, 57, 0, 669, 670, 3, 115, 57, 0, 670, 671, 3, 115, 57, 0, 671, 672, 3, 115, 57, 0, 672, 118, 1, 0, 0, 0, 673, 674, 5, 92, 0, 0, 674, 675, 5, 117, 0, 0, 675, 676, 1, 0, 0, 0, 676, 684, 3, 117, 58, 0, 677, 678, 5, 92, 0, 0, 678, 679, 5, 85, 0, 0, 679, 680, 1, 0, 0, 0, 680, 681, 3, 117, 58, 0, 681, 682, 3, 117, 58, 0, 682, 684, 1, 0, 0, 0, 683, 673, 1, 0, 0, 0, 683, 677, 1, 0, 0, 0, 684, 120, 1, 0, 0, 0, 685, 687, 3, 125, 62, 0, 686, 688, 3, 127, 63, 0, 687, 686, 1, 0, 0, 0, 687, 688, 1, 0, 0, 0, 688, 693, 1, 0, 0, 0, 689, 690, 3, 129, 64, 0, 690, 691, 3, 127, 63, 0, 691, 693, 1, 0, 0, 0, 692, 685, 1, 0, 0, 0, 692, 689, 1, 0, 0, 0, 693, 122, 1, 0, 0, 0, 694, 695, 5, 48, 0, 0, 695, 698, 7, 7, 0, 0, 696, 699, 3, 131, 65, 0, 697, 699, 3, 133, 66, 0, 698, 696, 1, 0, 0, 0, 698, 697, 1, 0, 0, 0, 699, 700, 1, 0, 0, 0, 700, 701, 3, 135, 67, 0, 701, 124, 1, 0, 0, 0, 702, 704, 3, 129, 64, 0, 703, 702, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 705, 1, 0, 0, 0, 705, 706, 5, 46, 0, 0, 706, 711, 3, 129, 64, 0, 707, 708, 3, 129, 64, 0, 708, 709, 5, 46, 0, 0, 709, 711, 1, 0, 0, 0, 710, 703, 1, 0, 0, 0, 710, 707, 1, 0, 0, 0, 711, 126, 1, 0, 0, 0, 712, 714, 7, 11, 0, 0, 713, 715, 7, 12, 0, 0, 714, 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 717, 3, 129, 64, 0, 717, 128, 1, 0, 0, 0, 718, 720, 3, 101, 50, 0, 719, 718, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 719, 1, 0, 0, 0, 721, 722, 1, 0, 0, 0, 722, 130, 1, 0, 0, 0, 723, 725, 3, 133, 66, 0, 724, 723, 1, 0, 0, 0, 724, 725, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, 726, 727, 5, 46, 0, 0, 727, 732, 3, 133, 66, 0, 728, 729, 3, 133, 66, 0, 729, 730, 5, 46, 0, 0, 730, 732, 1, 0, 0, 0, 731, 724, 1, 0, 0, 0, 731, 728, 1, 0, 0, 0, 732, 132, 1, 0, 0, 0, 733, 735, 3, 115, 57, 0, 734, 733, 1, 0, 0, 0, 735, 736, 1, 0, 0, 0, 736, 734, 1, 0, 0, 0, 736, 737, 1, 0, 0, 0, 737, 134, 1, 0, 0, 0, 738, 740, 7, 13, 0, 0, 739, 741, 7, 12, 0, 0, 740, 739, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 742, 743, 3, 129, 64, 0, 743, 136, 1, 0, 0, 0, 744, 745, 5, 92, 0, 0, 745, 760, 7, 14, 0, 0, 746, 747, 5, 92, 0, 0, 747, 749, 3, 113, 56, 0, 748, 750, 3, 113, 56, 0, 749, 748, 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 750, 752, 1, 0, 0, 0, 751, 753, 3, 113, 56, 0, 752, 751, 1, 0, 0, 0, 752, 753, 1, 0, 0, 0, 753, 760, 1, 0, 0, 0, 754, 755, 5, 92, 0, 0, 755, 756, 5, 120, 0, 0, 756, 757, 1, 0, 0, 0, 757, 760, 3, 133, 66, 0, 758, 760, 3, 119, 59, 0, 759, 744, 1, 0, 0, 0, 759, 746, 1, 0, 0, 0, 759, 754, 1, 0, 0, 0, 759, 758, 1, 0, 0, 0, 760, 138, 1, 0, 0, 0, 761, 763, 7, 15, 0, 0, 762, 761, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 762, 1, 0, 0, 0, 764, 765, 1, 0, 0, 0, 765, 766, 1, 0, 0, 0, 766, 767, 6, 69, 0, 0, 767, 140, 1, 0, 0, 0, 768, 770, 5, 13, 0, 0, 769, 771, 5, 10, 0, 0, 770, 769, 1, 0, 0, 0, 770, 771, 1, 0, 0, 0, 771, 774, 1, 0, 0, 0, 772, 774, 5, 10, 0, 0, 773, 768, 1, 0, 0, 0, 773, 772, 1, 0, 0, 0, 774, 775, 1, 0, 0, 0, 775, 776, 6, 70, 0, 0, 776, 142, 1, 0, 0, 0, 56, 0, 177, 191, 220, 252, 258, 266, 272, 277, 279, 310, 346, 382, 412, 450, 488, 514, 543, 549, 553, 558, 560, 568, 571, 575, 580, 583, 589, 595, 600, 605, 610, 619, 628, 639, 645, 649, 655, 683, 687, 692, 698, 703, 710, 714, 721, 724, 731, 736, 740, 749, 752, 759, 764, 770, 773, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 48, 785, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 186, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 200, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 229, 8, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 261, 8, 27, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 267, 8, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 275, 8, 30, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 281, 8, 31, 1, 32, 1, 32, 1, 32, 5, 32, 286, 8, 32, 10, 32, 12, 32, 289, 9, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 319, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 355, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 391, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 421, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 459, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 497, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 523, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 552, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 558, 8, 41, 1, 42, 1, 42, 3, 42, 562, 8, 42, 1, 43, 1, 43, 1, 43, 5, 43, 567, 8, 43, 10, 43, 12, 43, 570, 9, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 577, 8, 43, 1, 44, 3, 44, 580, 8, 44, 1, 44, 1, 44, 3, 44, 584, 8, 44, 1, 44, 1, 44, 1, 44, 3, 44, 589, 8, 44, 1, 44, 3, 44, 592, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 598, 8, 45, 1, 45, 1, 45, 4, 45, 602, 8, 45, 11, 45, 12, 45, 603, 1, 46, 1, 46, 1, 46, 3, 46, 609, 8, 46, 1, 47, 4, 47, 612, 8, 47, 11, 47, 12, 47, 613, 1, 48, 4, 48, 617, 8, 48, 11, 48, 12, 48, 618, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 628, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 3, 50, 637, 8, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 4, 53, 646, 8, 53, 11, 53, 12, 53, 647, 1, 54, 1, 54, 5, 54, 652, 8, 54, 10, 54, 12, 54, 655, 9, 54, 1, 54, 3, 54, 658, 8, 54, 1, 55, 1, 55, 5, 55, 662, 8, 55, 10, 55, 12, 55, 665, 9, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 692, 8, 61, 1, 62, 1, 62, 3, 62, 696, 8, 62, 1, 62, 1, 62, 1, 62, 3, 62, 701, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 707, 8, 63, 1, 63, 1, 63, 1, 64, 3, 64, 712, 8, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 719, 8, 64, 1, 65, 1, 65, 3, 65, 723, 8, 65, 1, 65, 1, 65, 1, 66, 4, 66, 728, 8, 66, 11, 66, 12, 66, 729, 1, 67, 3, 67, 733, 8, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 740, 8, 67, 1, 68, 4, 68, 743, 8, 68, 11, 68, 12, 68, 744, 1, 69, 1, 69, 3, 69, 749, 8, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 758, 8, 70, 1, 70, 3, 70, 761, 8, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 768, 8, 70, 1, 71, 4, 71, 771, 8, 71, 11, 71, 12, 71, 772, 1, 71, 1, 71, 1, 72, 1, 72, 3, 72, 779, 8, 72, 1, 72, 3, 72, 782, 8, 72, 1, 72, 1, 72, 0, 0, 73, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, 129, 0, 131, 0, 133, 0, 135, 0, 137, 0, 139, 0, 141, 0, 143, 47, 145, 48, 1, 0, 16, 3, 0, 76, 76, 85, 85, 117, 117, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 4, 0, 10, 10, 13, 13, 39, 39, 92, 92, 3, 0, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 2, 0, 66, 66, 98, 98, 1, 0, 48, 49, 2, 0, 88, 88, 120, 120, 1, 0, 49, 57, 1, 0, 48, 55, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 2, 0, 80, 80, 112, 112, 10, 0, 34, 34, 39, 39, 63, 63, 92, 92, 97, 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, 2, 0, 9, 9, 32, 32, 827, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 1, 147, 1, 0, 0, 0, 3, 149, 1, 0, 0, 0, 5, 151, 1, 0, 0, 0, 7, 153, 1, 0, 0, 0, 9, 155, 1, 0, 0, 0, 11, 157, 1, 0, 0, 0, 13, 159, 1, 0, 0, 0, 15, 161, 1, 0, 0, 0, 17, 163, 1, 0, 0, 0, 19, 166, 1, 0, 0, 0, 21, 168, 1, 0, 0, 0, 23, 171, 1, 0, 0, 0, 25, 174, 1, 0, 0, 0, 27, 185, 1, 0, 0, 0, 29, 199, 1, 0, 0, 0, 31, 228, 1, 0, 0, 0, 33, 230, 1, 0, 0, 0, 35, 232, 1, 0, 0, 0, 37, 234, 1, 0, 0, 0, 39, 236, 1, 0, 0, 0, 41, 238, 1, 0, 0, 0, 43, 240, 1, 0, 0, 0, 45, 243, 1, 0, 0, 0, 47, 246, 1, 0, 0, 0, 49, 249, 1, 0, 0, 0, 51, 251, 1, 0, 0, 0, 53, 253, 1, 0, 0, 0, 55, 260, 1, 0, 0, 0, 57, 266, 1, 0, 0, 0, 59, 268, 1, 0, 0, 0, 61, 274, 1, 0, 0, 0, 63, 280, 1, 0, 0, 0, 65, 282, 1, 0, 0, 0, 67, 318, 1, 0, 0, 0, 69, 354, 1, 0, 0, 0, 71, 390, 1, 0, 0, 0, 73, 420, 1, 0, 0, 0, 75, 458, 1, 0, 0, 0, 77, 496, 1, 0, 0, 0, 79, 522, 1, 0, 0, 0, 81, 551, 1, 0, 0, 0, 83, 557, 1, 0, 0, 0, 85, 561, 1, 0, 0, 0, 87, 576, 1, 0, 0, 0, 89, 579, 1, 0, 0, 0, 91, 593, 1, 0, 0, 0, 93, 608, 1, 0, 0, 0, 95, 611, 1, 0, 0, 0, 97, 616, 1, 0, 0, 0, 99, 627, 1, 0, 0, 0, 101, 636, 1, 0, 0, 0, 103, 638, 1, 0, 0, 0, 105, 640, 1, 0, 0, 0, 107, 642, 1, 0, 0, 0, 109, 657, 1, 0, 0, 0, 111, 659, 1, 0, 0, 0, 113, 666, 1, 0, 0, 0, 115, 670, 1, 0, 0, 0, 117, 672, 1, 0, 0, 0, 119, 674, 1, 0, 0, 0, 121, 676, 1, 0, 0, 0, 123, 691, 1, 0, 0, 0, 125, 700, 1, 0, 0, 0, 127, 702, 1, 0, 0, 0, 129, 718, 1, 0, 0, 0, 131, 720, 1, 0, 0, 0, 133, 727, 1, 0, 0, 0, 135, 739, 1, 0, 0, 0, 137, 742, 1, 0, 0, 0, 139, 746, 1, 0, 0, 0, 141, 767, 1, 0, 0, 0, 143, 770, 1, 0, 0, 0, 145, 781, 1, 0, 0, 0, 147, 148, 5, 40, 0, 0, 148, 2, 1, 0, 0, 0, 149, 150, 5, 41, 0, 0, 150, 4, 1, 0, 0, 0, 151, 152, 5, 91, 0, 0, 152, 6, 1, 0, 0, 0, 153, 154, 5, 44, 0, 0, 154, 8, 1, 0, 0, 0, 155, 156, 5, 93, 0, 0, 156, 10, 1, 0, 0, 0, 157, 158, 5, 123, 0, 0, 158, 12, 1, 0, 0, 0, 159, 160, 5, 125, 0, 0, 160, 14, 1, 0, 0, 0, 161, 162, 5, 60, 0, 0, 162, 16, 1, 0, 0, 0, 163, 164, 5, 60, 0, 0, 164, 165, 5, 61, 0, 0, 165, 18, 1, 0, 0, 0, 166, 167, 5, 62, 0, 0, 167, 20, 1, 0, 0, 0, 168, 169, 5, 62, 0, 0, 169, 170, 5, 61, 0, 0, 170, 22, 1, 0, 0, 0, 171, 172, 5, 61, 0, 0, 172, 173, 5, 61, 0, 0, 173, 24, 1, 0, 0, 0, 174, 175, 5, 33, 0, 0, 175, 176, 5, 61, 0, 0, 176, 26, 1, 0, 0, 0, 177, 178, 5, 108, 0, 0, 178, 179, 5, 105, 0, 0, 179, 180, 5, 107, 0, 0, 180, 186, 5, 101, 0, 0, 181, 182, 5, 76, 0, 0, 182, 183, 5, 73, 0, 0, 183, 184, 5, 75, 0, 0, 184, 186, 5, 69, 0, 0, 185, 177, 1, 0, 0, 0, 185, 181, 1, 0, 0, 0, 186, 28, 1, 0, 0, 0, 187, 188, 5, 101, 0, 0, 188, 189, 5, 120, 0, 0, 189, 190, 5, 105, 0, 0, 190, 191, 5, 115, 0, 0, 191, 192, 5, 116, 0, 0, 192, 200, 5, 115, 0, 0, 193, 194, 5, 69, 0, 0, 194, 195, 5, 88, 0, 0, 195, 196, 5, 73, 0, 0, 196, 197, 5, 83, 0, 0, 197, 198, 5, 84, 0, 0, 198, 200, 5, 83, 0, 0, 199, 187, 1, 0, 0, 0, 199, 193, 1, 0, 0, 0, 200, 30, 1, 0, 0, 0, 201, 202, 5, 84, 0, 0, 202, 203, 5, 101, 0, 0, 203, 204, 5, 120, 0, 0, 204, 205, 5, 116, 0, 0, 205, 206, 5, 77, 0, 0, 206, 207, 5, 97, 0, 0, 207, 208, 5, 116, 0, 0, 208, 209, 5, 99, 0, 0, 209, 229, 5, 104, 0, 0, 210, 211, 5, 116, 0, 0, 211, 212, 5, 101, 0, 0, 212, 213, 5, 120, 0, 0, 213, 214, 5, 116, 0, 0, 214, 215, 5, 109, 0, 0, 215, 216, 5, 97, 0, 0, 216, 217, 5, 116, 0, 0, 217, 218, 5, 99, 0, 0, 218, 229, 5, 104, 0, 0, 219, 220, 5, 84, 0, 0, 220, 221, 5, 69, 0, 0, 221, 222, 5, 88, 0, 0, 222, 223, 5, 84, 0, 0, 223, 224, 5, 77, 0, 0, 224, 225, 5, 65, 0, 0, 225, 226, 5, 84, 0, 0, 226, 227, 5, 67, 0, 0, 227, 229, 5, 72, 0, 0, 228, 201, 1, 0, 0, 0, 228, 210, 1, 0, 0, 0, 228, 219, 1, 0, 0, 0, 229, 32, 1, 0, 0, 0, 230, 231, 5, 43, 0, 0, 231, 34, 1, 0, 0, 0, 232, 233, 5, 45, 0, 0, 233, 36, 1, 0, 0, 0, 234, 235, 5, 42, 0, 0, 235, 38, 1, 0, 0, 0, 236, 237, 5, 47, 0, 0, 237, 40, 1, 0, 0, 0, 238, 239, 5, 37, 0, 0, 239, 42, 1, 0, 0, 0, 240, 241, 5, 42, 0, 0, 241, 242, 5, 42, 0, 0, 242, 44, 1, 0, 0, 0, 243, 244, 5, 60, 0, 0, 244, 245, 5, 60, 0, 0, 245, 46, 1, 0, 0, 0, 246, 247, 5, 62, 0, 0, 247, 248, 5, 62, 0, 0, 248, 48, 1, 0, 0, 0, 249, 250, 5, 38, 0, 0, 250, 50, 1, 0, 0, 0, 251, 252, 5, 124, 0, 0, 252, 52, 1, 0, 0, 0, 253, 254, 5, 94, 0, 0, 254, 54, 1, 0, 0, 0, 255, 256, 5, 38, 0, 0, 256, 261, 5, 38, 0, 0, 257, 258, 5, 97, 0, 0, 258, 259, 5, 110, 0, 0, 259, 261, 5, 100, 0, 0, 260, 255, 1, 0, 0, 0, 260, 257, 1, 0, 0, 0, 261, 56, 1, 0, 0, 0, 262, 263, 5, 124, 0, 0, 263, 267, 5, 124, 0, 0, 264, 265, 5, 111, 0, 0, 265, 267, 5, 114, 0, 0, 266, 262, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 267, 58, 1, 0, 0, 0, 268, 269, 5, 126, 0, 0, 269, 60, 1, 0, 0, 0, 270, 275, 5, 33, 0, 0, 271, 272, 5, 110, 0, 0, 272, 273, 5, 111, 0, 0, 273, 275, 5, 116, 0, 0, 274, 270, 1, 0, 0, 0, 274, 271, 1, 0, 0, 0, 275, 62, 1, 0, 0, 0, 276, 277, 5, 105, 0, 0, 277, 281, 5, 110, 0, 0, 278, 279, 5, 73, 0, 0, 279, 281, 5, 78, 0, 0, 280, 276, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 281, 64, 1, 0, 0, 0, 282, 287, 5, 91, 0, 0, 283, 286, 3, 143, 71, 0, 284, 286, 3, 145, 72, 0, 285, 283, 1, 0, 0, 0, 285, 284, 1, 0, 0, 0, 286, 289, 1, 0, 0, 0, 287, 285, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 290, 1, 0, 0, 0, 289, 287, 1, 0, 0, 0, 290, 291, 5, 93, 0, 0, 291, 66, 1, 0, 0, 0, 292, 293, 5, 106, 0, 0, 293, 294, 5, 115, 0, 0, 294, 295, 5, 111, 0, 0, 295, 296, 5, 110, 0, 0, 296, 297, 5, 95, 0, 0, 297, 298, 5, 99, 0, 0, 298, 299, 5, 111, 0, 0, 299, 300, 5, 110, 0, 0, 300, 301, 5, 116, 0, 0, 301, 302, 5, 97, 0, 0, 302, 303, 5, 105, 0, 0, 303, 304, 5, 110, 0, 0, 304, 319, 5, 115, 0, 0, 305, 306, 5, 74, 0, 0, 306, 307, 5, 83, 0, 0, 307, 308, 5, 79, 0, 0, 308, 309, 5, 78, 0, 0, 309, 310, 5, 95, 0, 0, 310, 311, 5, 67, 0, 0, 311, 312, 5, 79, 0, 0, 312, 313, 5, 78, 0, 0, 313, 314, 5, 84, 0, 0, 314, 315, 5, 65, 0, 0, 315, 316, 5, 73, 0, 0, 316, 317, 5, 78, 0, 0, 317, 319, 5, 83, 0, 0, 318, 292, 1, 0, 0, 0, 318, 305, 1, 0, 0, 0, 319, 68, 1, 0, 0, 0, 320, 321, 5, 106, 0, 0, 321, 322, 5, 115, 0, 0, 322, 323, 5, 111, 0, 0, 323, 324, 5, 110, 0, 0, 324, 325, 5, 95, 0, 0, 325, 326, 5, 99, 0, 0, 326, 327, 5, 111, 0, 0, 327, 328, 5, 110, 0, 0, 328, 329, 5, 116, 0, 0, 329, 330, 5, 97, 0, 0, 330, 331, 5, 105, 0, 0, 331, 332, 5, 110, 0, 0, 332, 333, 5, 115, 0, 0, 333, 334, 5, 95, 0, 0, 334, 335, 5, 97, 0, 0, 335, 336, 5, 108, 0, 0, 336, 355, 5, 108, 0, 0, 337, 338, 5, 74, 0, 0, 338, 339, 5, 83, 0, 0, 339, 340, 5, 79, 0, 0, 340, 341, 5, 78, 0, 0, 341, 342, 5, 95, 0, 0, 342, 343, 5, 67, 0, 0, 343, 344, 5, 79, 0, 0, 344, 345, 5, 78, 0, 0, 345, 346, 5, 84, 0, 0, 346, 347, 5, 65, 0, 0, 347, 348, 5, 73, 0, 0, 348, 349, 5, 78, 0, 0, 349, 350, 5, 83, 0, 0, 350, 351, 5, 95, 0, 0, 351, 352, 5, 65, 0, 0, 352, 353, 5, 76, 0, 0, 353, 355, 5, 76, 0, 0, 354, 320, 1, 0, 0, 0, 354, 337, 1, 0, 0, 0, 355, 70, 1, 0, 0, 0, 356, 357, 5, 106, 0, 0, 357, 358, 5, 115, 0, 0, 358, 359, 5, 111, 0, 0, 359, 360, 5, 110, 0, 0, 360, 361, 5, 95, 0, 0, 361, 362, 5, 99, 0, 0, 362, 363, 5, 111, 0, 0, 363, 364, 5, 110, 0, 0, 364, 365, 5, 116, 0, 0, 365, 366, 5, 97, 0, 0, 366, 367, 5, 105, 0, 0, 367, 368, 5, 110, 0, 0, 368, 369, 5, 115, 0, 0, 369, 370, 5, 95, 0, 0, 370, 371, 5, 97, 0, 0, 371, 372, 5, 110, 0, 0, 372, 391, 5, 121, 0, 0, 373, 374, 5, 74, 0, 0, 374, 375, 5, 83, 0, 0, 375, 376, 5, 79, 0, 0, 376, 377, 5, 78, 0, 0, 377, 378, 5, 95, 0, 0, 378, 379, 5, 67, 0, 0, 379, 380, 5, 79, 0, 0, 380, 381, 5, 78, 0, 0, 381, 382, 5, 84, 0, 0, 382, 383, 5, 65, 0, 0, 383, 384, 5, 73, 0, 0, 384, 385, 5, 78, 0, 0, 385, 386, 5, 83, 0, 0, 386, 387, 5, 95, 0, 0, 387, 388, 5, 65, 0, 0, 388, 389, 5, 78, 0, 0, 389, 391, 5, 89, 0, 0, 390, 356, 1, 0, 0, 0, 390, 373, 1, 0, 0, 0, 391, 72, 1, 0, 0, 0, 392, 393, 5, 97, 0, 0, 393, 394, 5, 114, 0, 0, 394, 395, 5, 114, 0, 0, 395, 396, 5, 97, 0, 0, 396, 397, 5, 121, 0, 0, 397, 398, 5, 95, 0, 0, 398, 399, 5, 99, 0, 0, 399, 400, 5, 111, 0, 0, 400, 401, 5, 110, 0, 0, 401, 402, 5, 116, 0, 0, 402, 403, 5, 97, 0, 0, 403, 404, 5, 105, 0, 0, 404, 405, 5, 110, 0, 0, 405, 421, 5, 115, 0, 0, 406, 407, 5, 65, 0, 0, 407, 408, 5, 82, 0, 0, 408, 409, 5, 82, 0, 0, 409, 410, 5, 65, 0, 0, 410, 411, 5, 89, 0, 0, 411, 412, 5, 95, 0, 0, 412, 413, 5, 67, 0, 0, 413, 414, 5, 79, 0, 0, 414, 415, 5, 78, 0, 0, 415, 416, 5, 84, 0, 0, 416, 417, 5, 65, 0, 0, 417, 418, 5, 73, 0, 0, 418, 419, 5, 78, 0, 0, 419, 421, 5, 83, 0, 0, 420, 392, 1, 0, 0, 0, 420, 406, 1, 0, 0, 0, 421, 74, 1, 0, 0, 0, 422, 423, 5, 97, 0, 0, 423, 424, 5, 114, 0, 0, 424, 425, 5, 114, 0, 0, 425, 426, 5, 97, 0, 0, 426, 427, 5, 121, 0, 0, 427, 428, 5, 95, 0, 0, 428, 429, 5, 99, 0, 0, 429, 430, 5, 111, 0, 0, 430, 431, 5, 110, 0, 0, 431, 432, 5, 116, 0, 0, 432, 433, 5, 97, 0, 0, 433, 434, 5, 105, 0, 0, 434, 435, 5, 110, 0, 0, 435, 436, 5, 115, 0, 0, 436, 437, 5, 95, 0, 0, 437, 438, 5, 97, 0, 0, 438, 439, 5, 108, 0, 0, 439, 459, 5, 108, 0, 0, 440, 441, 5, 65, 0, 0, 441, 442, 5, 82, 0, 0, 442, 443, 5, 82, 0, 0, 443, 444, 5, 65, 0, 0, 444, 445, 5, 89, 0, 0, 445, 446, 5, 95, 0, 0, 446, 447, 5, 67, 0, 0, 447, 448, 5, 79, 0, 0, 448, 449, 5, 78, 0, 0, 449, 450, 5, 84, 0, 0, 450, 451, 5, 65, 0, 0, 451, 452, 5, 73, 0, 0, 452, 453, 5, 78, 0, 0, 453, 454, 5, 83, 0, 0, 454, 455, 5, 95, 0, 0, 455, 456, 5, 65, 0, 0, 456, 457, 5, 76, 0, 0, 457, 459, 5, 76, 0, 0, 458, 422, 1, 0, 0, 0, 458, 440, 1, 0, 0, 0, 459, 76, 1, 0, 0, 0, 460, 461, 5, 97, 0, 0, 461, 462, 5, 114, 0, 0, 462, 463, 5, 114, 0, 0, 463, 464, 5, 97, 0, 0, 464, 465, 5, 121, 0, 0, 465, 466, 5, 95, 0, 0, 466, 467, 5, 99, 0, 0, 467, 468, 5, 111, 0, 0, 468, 469, 5, 110, 0, 0, 469, 470, 5, 116, 0, 0, 470, 471, 5, 97, 0, 0, 471, 472, 5, 105, 0, 0, 472, 473, 5, 110, 0, 0, 473, 474, 5, 115, 0, 0, 474, 475, 5, 95, 0, 0, 475, 476, 5, 97, 0, 0, 476, 477, 5, 110, 0, 0, 477, 497, 5, 121, 0, 0, 478, 479, 5, 65, 0, 0, 479, 480, 5, 82, 0, 0, 480, 481, 5, 82, 0, 0, 481, 482, 5, 65, 0, 0, 482, 483, 5, 89, 0, 0, 483, 484, 5, 95, 0, 0, 484, 485, 5, 67, 0, 0, 485, 486, 5, 79, 0, 0, 486, 487, 5, 78, 0, 0, 487, 488, 5, 84, 0, 0, 488, 489, 5, 65, 0, 0, 489, 490, 5, 73, 0, 0, 490, 491, 5, 78, 0, 0, 491, 492, 5, 83, 0, 0, 492, 493, 5, 95, 0, 0, 493, 494, 5, 65, 0, 0, 494, 495, 5, 78, 0, 0, 495, 497, 5, 89, 0, 0, 496, 460, 1, 0, 0, 0, 496, 478, 1, 0, 0, 0, 497, 78, 1, 0, 0, 0, 498, 499, 5, 97, 0, 0, 499, 500, 5, 114, 0, 0, 500, 501, 5, 114, 0, 0, 501, 502, 5, 97, 0, 0, 502, 503, 5, 121, 0, 0, 503, 504, 5, 95, 0, 0, 504, 505, 5, 108, 0, 0, 505, 506, 5, 101, 0, 0, 506, 507, 5, 110, 0, 0, 507, 508, 5, 103, 0, 0, 508, 509, 5, 116, 0, 0, 509, 523, 5, 104, 0, 0, 510, 511, 5, 65, 0, 0, 511, 512, 5, 82, 0, 0, 512, 513, 5, 82, 0, 0, 513, 514, 5, 65, 0, 0, 514, 515, 5, 89, 0, 0, 515, 516, 5, 95, 0, 0, 516, 517, 5, 76, 0, 0, 517, 518, 5, 69, 0, 0, 518, 519, 5, 78, 0, 0, 519, 520, 5, 71, 0, 0, 520, 521, 5, 84, 0, 0, 521, 523, 5, 72, 0, 0, 522, 498, 1, 0, 0, 0, 522, 510, 1, 0, 0, 0, 523, 80, 1, 0, 0, 0, 524, 525, 5, 116, 0, 0, 525, 526, 5, 114, 0, 0, 526, 527, 5, 117, 0, 0, 527, 552, 5, 101, 0, 0, 528, 529, 5, 84, 0, 0, 529, 530, 5, 114, 0, 0, 530, 531, 5, 117, 0, 0, 531, 552, 5, 101, 0, 0, 532, 533, 5, 84, 0, 0, 533, 534, 5, 82, 0, 0, 534, 535, 5, 85, 0, 0, 535, 552, 5, 69, 0, 0, 536, 537, 5, 102, 0, 0, 537, 538, 5, 97, 0, 0, 538, 539, 5, 108, 0, 0, 539, 540, 5, 115, 0, 0, 540, 552, 5, 101, 0, 0, 541, 542, 5, 70, 0, 0, 542, 543, 5, 97, 0, 0, 543, 544, 5, 108, 0, 0, 544, 545, 5, 115, 0, 0, 545, 552, 5, 101, 0, 0, 546, 547, 5, 70, 0, 0, 547, 548, 5, 65, 0, 0, 548, 549, 5, 76, 0, 0, 549, 550, 5, 83, 0, 0, 550, 552, 5, 69, 0, 0, 551, 524, 1, 0, 0, 0, 551, 528, 1, 0, 0, 0, 551, 532, 1, 0, 0, 0, 551, 536, 1, 0, 0, 0, 551, 541, 1, 0, 0, 0, 551, 546, 1, 0, 0, 0, 552, 82, 1, 0, 0, 0, 553, 558, 3, 109, 54, 0, 554, 558, 3, 111, 55, 0, 555, 558, 3, 113, 56, 0, 556, 558, 3, 107, 53, 0, 557, 553, 1, 0, 0, 0, 557, 554, 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 557, 556, 1, 0, 0, 0, 558, 84, 1, 0, 0, 0, 559, 562, 3, 125, 62, 0, 560, 562, 3, 127, 63, 0, 561, 559, 1, 0, 0, 0, 561, 560, 1, 0, 0, 0, 562, 86, 1, 0, 0, 0, 563, 568, 3, 103, 51, 0, 564, 567, 3, 103, 51, 0, 565, 567, 3, 105, 52, 0, 566, 564, 1, 0, 0, 0, 566, 565, 1, 0, 0, 0, 567, 570, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 568, 569, 1, 0, 0, 0, 569, 577, 1, 0, 0, 0, 570, 568, 1, 0, 0, 0, 571, 572, 5, 36, 0, 0, 572, 573, 5, 109, 0, 0, 573, 574, 5, 101, 0, 0, 574, 575, 5, 116, 0, 0, 575, 577, 5, 97, 0, 0, 576, 563, 1, 0, 0, 0, 576, 571, 1, 0, 0, 0, 577, 88, 1, 0, 0, 0, 578, 580, 3, 93, 46, 0, 579, 578, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 591, 1, 0, 0, 0, 581, 583, 5, 34, 0, 0, 582, 584, 3, 95, 47, 0, 583, 582, 1, 0, 0, 0, 583, 584, 1, 0, 0, 0, 584, 585, 1, 0, 0, 0, 585, 592, 5, 34, 0, 0, 586, 588, 5, 39, 0, 0, 587, 589, 3, 97, 48, 0, 588, 587, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 590, 1, 0, 0, 0, 590, 592, 5, 39, 0, 0, 591, 581, 1, 0, 0, 0, 591, 586, 1, 0, 0, 0, 592, 90, 1, 0, 0, 0, 593, 601, 3, 87, 43, 0, 594, 597, 5, 91, 0, 0, 595, 598, 3, 89, 44, 0, 596, 598, 3, 109, 54, 0, 597, 595, 1, 0, 0, 0, 597, 596, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, 600, 5, 93, 0, 0, 600, 602, 1, 0, 0, 0, 601, 594, 1, 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 601, 1, 0, 0, 0, 603, 604, 1, 0, 0, 0, 604, 92, 1, 0, 0, 0, 605, 606, 5, 117, 0, 0, 606, 609, 5, 56, 0, 0, 607, 609, 7, 0, 0, 0, 608, 605, 1, 0, 0, 0, 608, 607, 1, 0, 0, 0, 609, 94, 1, 0, 0, 0, 610, 612, 3, 99, 49, 0, 611, 610, 1, 0, 0, 0, 612, 613, 1, 0, 0, 0, 613, 611, 1, 0, 0, 0, 613, 614, 1, 0, 0, 0, 614, 96, 1, 0, 0, 0, 615, 617, 3, 101, 50, 0, 616, 615, 1, 0, 0, 0, 617, 618, 1, 0, 0, 0, 618, 616, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, 98, 1, 0, 0, 0, 620, 628, 8, 1, 0, 0, 621, 628, 3, 141, 70, 0, 622, 623, 5, 92, 0, 0, 623, 628, 5, 10, 0, 0, 624, 625, 5, 92, 0, 0, 625, 626, 5, 13, 0, 0, 626, 628, 5, 10, 0, 0, 627, 620, 1, 0, 0, 0, 627, 621, 1, 0, 0, 0, 627, 622, 1, 0, 0, 0, 627, 624, 1, 0, 0, 0, 628, 100, 1, 0, 0, 0, 629, 637, 8, 2, 0, 0, 630, 637, 3, 141, 70, 0, 631, 632, 5, 92, 0, 0, 632, 637, 5, 10, 0, 0, 633, 634, 5, 92, 0, 0, 634, 635, 5, 13, 0, 0, 635, 637, 5, 10, 0, 0, 636, 629, 1, 0, 0, 0, 636, 630, 1, 0, 0, 0, 636, 631, 1, 0, 0, 0, 636, 633, 1, 0, 0, 0, 637, 102, 1, 0, 0, 0, 638, 639, 7, 3, 0, 0, 639, 104, 1, 0, 0, 0, 640, 641, 7, 4, 0, 0, 641, 106, 1, 0, 0, 0, 642, 643, 5, 48, 0, 0, 643, 645, 7, 5, 0, 0, 644, 646, 7, 6, 0, 0, 645, 644, 1, 0, 0, 0, 646, 647, 1, 0, 0, 0, 647, 645, 1, 0, 0, 0, 647, 648, 1, 0, 0, 0, 648, 108, 1, 0, 0, 0, 649, 653, 3, 115, 57, 0, 650, 652, 3, 105, 52, 0, 651, 650, 1, 0, 0, 0, 652, 655, 1, 0, 0, 0, 653, 651, 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 658, 1, 0, 0, 0, 655, 653, 1, 0, 0, 0, 656, 658, 5, 48, 0, 0, 657, 649, 1, 0, 0, 0, 657, 656, 1, 0, 0, 0, 658, 110, 1, 0, 0, 0, 659, 663, 5, 48, 0, 0, 660, 662, 3, 117, 58, 0, 661, 660, 1, 0, 0, 0, 662, 665, 1, 0, 0, 0, 663, 661, 1, 0, 0, 0, 663, 664, 1, 0, 0, 0, 664, 112, 1, 0, 0, 0, 665, 663, 1, 0, 0, 0, 666, 667, 5, 48, 0, 0, 667, 668, 7, 7, 0, 0, 668, 669, 3, 137, 68, 0, 669, 114, 1, 0, 0, 0, 670, 671, 7, 8, 0, 0, 671, 116, 1, 0, 0, 0, 672, 673, 7, 9, 0, 0, 673, 118, 1, 0, 0, 0, 674, 675, 7, 10, 0, 0, 675, 120, 1, 0, 0, 0, 676, 677, 3, 119, 59, 0, 677, 678, 3, 119, 59, 0, 678, 679, 3, 119, 59, 0, 679, 680, 3, 119, 59, 0, 680, 122, 1, 0, 0, 0, 681, 682, 5, 92, 0, 0, 682, 683, 5, 117, 0, 0, 683, 684, 1, 0, 0, 0, 684, 692, 3, 121, 60, 0, 685, 686, 5, 92, 0, 0, 686, 687, 5, 85, 0, 0, 687, 688, 1, 0, 0, 0, 688, 689, 3, 121, 60, 0, 689, 690, 3, 121, 60, 0, 690, 692, 1, 0, 0, 0, 691, 681, 1, 0, 0, 0, 691, 685, 1, 0, 0, 0, 692, 124, 1, 0, 0, 0, 693, 695, 3, 129, 64, 0, 694, 696, 3, 131, 65, 0, 695, 694, 1, 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 701, 1, 0, 0, 0, 697, 698, 3, 133, 66, 0, 698, 699, 3, 131, 65, 0, 699, 701, 1, 0, 0, 0, 700, 693, 1, 0, 0, 0, 700, 697, 1, 0, 0, 0, 701, 126, 1, 0, 0, 0, 702, 703, 5, 48, 0, 0, 703, 706, 7, 7, 0, 0, 704, 707, 3, 135, 67, 0, 705, 707, 3, 137, 68, 0, 706, 704, 1, 0, 0, 0, 706, 705, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 709, 3, 139, 69, 0, 709, 128, 1, 0, 0, 0, 710, 712, 3, 133, 66, 0, 711, 710, 1, 0, 0, 0, 711, 712, 1, 0, 0, 0, 712, 713, 1, 0, 0, 0, 713, 714, 5, 46, 0, 0, 714, 719, 3, 133, 66, 0, 715, 716, 3, 133, 66, 0, 716, 717, 5, 46, 0, 0, 717, 719, 1, 0, 0, 0, 718, 711, 1, 0, 0, 0, 718, 715, 1, 0, 0, 0, 719, 130, 1, 0, 0, 0, 720, 722, 7, 11, 0, 0, 721, 723, 7, 12, 0, 0, 722, 721, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 724, 1, 0, 0, 0, 724, 725, 3, 133, 66, 0, 725, 132, 1, 0, 0, 0, 726, 728, 3, 105, 52, 0, 727, 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 727, 1, 0, 0, 0, 729, 730, 1, 0, 0, 0, 730, 134, 1, 0, 0, 0, 731, 733, 3, 137, 68, 0, 732, 731, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 733, 734, 1, 0, 0, 0, 734, 735, 5, 46, 0, 0, 735, 740, 3, 137, 68, 0, 736, 737, 3, 137, 68, 0, 737, 738, 5, 46, 0, 0, 738, 740, 1, 0, 0, 0, 739, 732, 1, 0, 0, 0, 739, 736, 1, 0, 0, 0, 740, 136, 1, 0, 0, 0, 741, 743, 3, 119, 59, 0, 742, 741, 1, 0, 0, 0, 743, 744, 1, 0, 0, 0, 744, 742, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 138, 1, 0, 0, 0, 746, 748, 7, 13, 0, 0, 747, 749, 7, 12, 0, 0, 748, 747, 1, 0, 0, 0, 748, 749, 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 750, 751, 3, 133, 66, 0, 751, 140, 1, 0, 0, 0, 752, 753, 5, 92, 0, 0, 753, 768, 7, 14, 0, 0, 754, 755, 5, 92, 0, 0, 755, 757, 3, 117, 58, 0, 756, 758, 3, 117, 58, 0, 757, 756, 1, 0, 0, 0, 757, 758, 1, 0, 0, 0, 758, 760, 1, 0, 0, 0, 759, 761, 3, 117, 58, 0, 760, 759, 1, 0, 0, 0, 760, 761, 1, 0, 0, 0, 761, 768, 1, 0, 0, 0, 762, 763, 5, 92, 0, 0, 763, 764, 5, 120, 0, 0, 764, 765, 1, 0, 0, 0, 765, 768, 3, 137, 68, 0, 766, 768, 3, 123, 61, 0, 767, 752, 1, 0, 0, 0, 767, 754, 1, 0, 0, 0, 767, 762, 1, 0, 0, 0, 767, 766, 1, 0, 0, 0, 768, 142, 1, 0, 0, 0, 769, 771, 7, 15, 0, 0, 770, 769, 1, 0, 0, 0, 771, 772, 1, 0, 0, 0, 772, 770, 1, 0, 0, 0, 772, 773, 1, 0, 0, 0, 773, 774, 1, 0, 0, 0, 774, 775, 6, 71, 0, 0, 775, 144, 1, 0, 0, 0, 776, 778, 5, 13, 0, 0, 777, 779, 5, 10, 0, 0, 778, 777, 1, 0, 0, 0, 778, 779, 1, 0, 0, 0, 779, 782, 1, 0, 0, 0, 780, 782, 5, 10, 0, 0, 781, 776, 1, 0, 0, 0, 781, 780, 1, 0, 0, 0, 782, 783, 1, 0, 0, 0, 783, 784, 6, 72, 0, 0, 784, 146, 1, 0, 0, 0, 56, 0, 185, 199, 228, 260, 266, 274, 280, 285, 287, 318, 354, 390, 420, 458, 496, 522, 551, 557, 561, 566, 568, 576, 579, 583, 588, 591, 597, 603, 608, 613, 618, 627, 636, 647, 653, 657, 663, 691, 695, 700, 706, 711, 718, 722, 729, 732, 739, 744, 748, 757, 760, 767, 772, 778, 781, 1, 6, 0, 0] \ No newline at end of file diff --git a/internal/parser/planparserv2/generated/PlanLexer.tokens b/internal/parser/planparserv2/generated/PlanLexer.tokens index 766b852b6b4f2..5d12236e1a2b0 100644 --- a/internal/parser/planparserv2/generated/PlanLexer.tokens +++ b/internal/parser/planparserv2/generated/PlanLexer.tokens @@ -3,67 +3,71 @@ T__1=2 T__2=3 T__3=4 T__4=5 -LT=6 -LE=7 -GT=8 -GE=9 -EQ=10 -NE=11 -LIKE=12 -EXISTS=13 -TEXTMATCH=14 -ADD=15 -SUB=16 -MUL=17 -DIV=18 -MOD=19 -POW=20 -SHL=21 -SHR=22 -BAND=23 -BOR=24 -BXOR=25 -AND=26 -OR=27 -BNOT=28 -NOT=29 -IN=30 -EmptyArray=31 -JSONContains=32 -JSONContainsAll=33 -JSONContainsAny=34 -ArrayContains=35 -ArrayContainsAll=36 -ArrayContainsAny=37 -ArrayLength=38 -BooleanConstant=39 -IntegerConstant=40 -FloatingConstant=41 -Identifier=42 -StringLiteral=43 -JSONIdentifier=44 -Whitespace=45 -Newline=46 +LBRACE=6 +RBRACE=7 +LT=8 +LE=9 +GT=10 +GE=11 +EQ=12 +NE=13 +LIKE=14 +EXISTS=15 +TEXTMATCH=16 +ADD=17 +SUB=18 +MUL=19 +DIV=20 +MOD=21 +POW=22 +SHL=23 +SHR=24 +BAND=25 +BOR=26 +BXOR=27 +AND=28 +OR=29 +BNOT=30 +NOT=31 +IN=32 +EmptyArray=33 +JSONContains=34 +JSONContainsAll=35 +JSONContainsAny=36 +ArrayContains=37 +ArrayContainsAll=38 +ArrayContainsAny=39 +ArrayLength=40 +BooleanConstant=41 +IntegerConstant=42 +FloatingConstant=43 +Identifier=44 +StringLiteral=45 +JSONIdentifier=46 +Whitespace=47 +Newline=48 '('=1 ')'=2 '['=3 ','=4 ']'=5 -'<'=6 -'<='=7 -'>'=8 -'>='=9 -'=='=10 -'!='=11 -'+'=15 -'-'=16 -'*'=17 -'/'=18 -'%'=19 -'**'=20 -'<<'=21 -'>>'=22 -'&'=23 -'|'=24 -'^'=25 -'~'=28 +'{'=6 +'}'=7 +'<'=8 +'<='=9 +'>'=10 +'>='=11 +'=='=12 +'!='=13 +'+'=17 +'-'=18 +'*'=19 +'/'=20 +'%'=21 +'**'=22 +'<<'=23 +'>>'=24 +'&'=25 +'|'=26 +'^'=27 +'~'=30 diff --git a/internal/parser/planparserv2/generated/plan_base_visitor.go b/internal/parser/planparserv2/generated/plan_base_visitor.go index e8ae619676116..0d4b1922d9c93 100644 --- a/internal/parser/planparserv2/generated/plan_base_visitor.go +++ b/internal/parser/planparserv2/generated/plan_base_visitor.go @@ -7,6 +7,10 @@ type BasePlanVisitor struct { *antlr.BaseParseTreeVisitor } +func (v *BasePlanVisitor) VisitPlaceholder(ctx *PlaceholderContext) interface{} { + return v.VisitChildren(ctx) +} + func (v *BasePlanVisitor) VisitJSONIdentifier(ctx *JSONIdentifierContext) interface{} { return v.VisitChildren(ctx) } diff --git a/internal/parser/planparserv2/generated/plan_lexer.go b/internal/parser/planparserv2/generated/plan_lexer.go index 89989279b7530..8a26d32897ccf 100644 --- a/internal/parser/planparserv2/generated/plan_lexer.go +++ b/internal/parser/planparserv2/generated/plan_lexer.go @@ -43,27 +43,27 @@ func planlexerLexerInit() { "DEFAULT_MODE", } staticData.LiteralNames = []string{ - "", "'('", "')'", "'['", "','", "']'", "'<'", "'<='", "'>'", "'>='", - "'=='", "'!='", "", "", "", "'+'", "'-'", "'*'", "'/'", "'%'", "'**'", - "'<<'", "'>>'", "'&'", "'|'", "'^'", "", "", "'~'", + "", "'('", "')'", "'['", "','", "']'", "'{'", "'}'", "'<'", "'<='", + "'>'", "'>='", "'=='", "'!='", "", "", "", "'+'", "'-'", "'*'", "'/'", + "'%'", "'**'", "'<<'", "'>>'", "'&'", "'|'", "'^'", "", "", "'~'", } staticData.SymbolicNames = []string{ - "", "", "", "", "", "", "LT", "LE", "GT", "GE", "EQ", "NE", "LIKE", - "EXISTS", "TEXTMATCH", "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "SHL", - "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", "NOT", "IN", "EmptyArray", - "JSONContains", "JSONContainsAll", "JSONContainsAny", "ArrayContains", - "ArrayContainsAll", "ArrayContainsAny", "ArrayLength", "BooleanConstant", - "IntegerConstant", "FloatingConstant", "Identifier", "StringLiteral", - "JSONIdentifier", "Whitespace", "Newline", - } - staticData.RuleNames = []string{ - "T__0", "T__1", "T__2", "T__3", "T__4", "LT", "LE", "GT", "GE", "EQ", - "NE", "LIKE", "EXISTS", "TEXTMATCH", "ADD", "SUB", "MUL", "DIV", "MOD", - "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", "NOT", - "IN", "EmptyArray", "JSONContains", "JSONContainsAll", "JSONContainsAny", + "", "", "", "", "", "", "LBRACE", "RBRACE", "LT", "LE", "GT", "GE", + "EQ", "NE", "LIKE", "EXISTS", "TEXTMATCH", "ADD", "SUB", "MUL", "DIV", + "MOD", "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", + "NOT", "IN", "EmptyArray", "JSONContains", "JSONContainsAll", "JSONContainsAny", "ArrayContains", "ArrayContainsAll", "ArrayContainsAny", "ArrayLength", "BooleanConstant", "IntegerConstant", "FloatingConstant", "Identifier", - "StringLiteral", "JSONIdentifier", "EncodingPrefix", "DoubleSCharSequence", + "StringLiteral", "JSONIdentifier", "Whitespace", "Newline", + } + staticData.RuleNames = []string{ + "T__0", "T__1", "T__2", "T__3", "T__4", "LBRACE", "RBRACE", "LT", "LE", + "GT", "GE", "EQ", "NE", "LIKE", "EXISTS", "TEXTMATCH", "ADD", "SUB", + "MUL", "DIV", "MOD", "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", + "OR", "BNOT", "NOT", "IN", "EmptyArray", "JSONContains", "JSONContainsAll", + "JSONContainsAny", "ArrayContains", "ArrayContainsAll", "ArrayContainsAny", + "ArrayLength", "BooleanConstant", "IntegerConstant", "FloatingConstant", + "Identifier", "StringLiteral", "JSONIdentifier", "EncodingPrefix", "DoubleSCharSequence", "SingleSCharSequence", "DoubleSChar", "SingleSChar", "Nondigit", "Digit", "BinaryConstant", "DecimalConstant", "OctalConstant", "HexadecimalConstant", "NonzeroDigit", "OctalDigit", "HexadecimalDigit", "HexQuad", "UniversalCharacterName", @@ -73,7 +73,7 @@ func planlexerLexerInit() { } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 0, 46, 777, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, + 4, 0, 48, 785, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, @@ -86,345 +86,349 @@ func planlexerLexerInit() { 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, - 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, - 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, - 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, - 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 178, 8, 11, 1, 12, 1, - 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, - 3, 12, 192, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, - 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, - 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 221, - 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, - 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, - 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, - 25, 253, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 259, 8, 26, 1, 27, 1, - 27, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 267, 8, 28, 1, 29, 1, 29, 1, 29, - 1, 29, 3, 29, 273, 8, 29, 1, 30, 1, 30, 1, 30, 5, 30, 278, 8, 30, 10, 30, - 12, 30, 281, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, - 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, - 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, - 31, 311, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, - 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, - 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, - 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 347, 8, 32, 1, 33, 1, 33, 1, - 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, - 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, + 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 1, + 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, + 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, + 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, + 13, 1, 13, 1, 13, 1, 13, 3, 13, 186, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, + 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 200, 8, + 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, + 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, + 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 229, 8, 15, 1, 16, + 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, + 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, + 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 261, 8, + 27, 1, 28, 1, 28, 1, 28, 1, 28, 3, 28, 267, 8, 28, 1, 29, 1, 29, 1, 30, + 1, 30, 1, 30, 1, 30, 3, 30, 275, 8, 30, 1, 31, 1, 31, 1, 31, 1, 31, 3, + 31, 281, 8, 31, 1, 32, 1, 32, 1, 32, 5, 32, 286, 8, 32, 10, 32, 12, 32, + 289, 9, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, - 3, 33, 383, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, + 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 319, + 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, - 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, - 34, 413, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, + 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, + 34, 1, 34, 1, 34, 1, 34, 3, 34, 355, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, - 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 451, 8, 35, 1, - 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, + 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 391, + 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 489, 8, 36, 1, 37, 1, 37, 1, 37, 1, + 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 421, 8, + 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, + 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, - 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, - 37, 515, 8, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, + 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 459, 8, 37, 1, 38, 1, 38, 1, + 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, - 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 544, - 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 550, 8, 39, 1, 40, 1, 40, 3, - 40, 554, 8, 40, 1, 41, 1, 41, 1, 41, 5, 41, 559, 8, 41, 10, 41, 12, 41, - 562, 9, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 569, 8, 41, 1, 42, - 3, 42, 572, 8, 42, 1, 42, 1, 42, 3, 42, 576, 8, 42, 1, 42, 1, 42, 1, 42, - 3, 42, 581, 8, 42, 1, 42, 3, 42, 584, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, - 3, 43, 590, 8, 43, 1, 43, 1, 43, 4, 43, 594, 8, 43, 11, 43, 12, 43, 595, - 1, 44, 1, 44, 1, 44, 3, 44, 601, 8, 44, 1, 45, 4, 45, 604, 8, 45, 11, 45, - 12, 45, 605, 1, 46, 4, 46, 609, 8, 46, 11, 46, 12, 46, 610, 1, 47, 1, 47, - 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 620, 8, 47, 1, 48, 1, 48, 1, - 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 629, 8, 48, 1, 49, 1, 49, 1, 50, - 1, 50, 1, 51, 1, 51, 1, 51, 4, 51, 638, 8, 51, 11, 51, 12, 51, 639, 1, - 52, 1, 52, 5, 52, 644, 8, 52, 10, 52, 12, 52, 647, 9, 52, 1, 52, 3, 52, - 650, 8, 52, 1, 53, 1, 53, 5, 53, 654, 8, 53, 10, 53, 12, 53, 657, 9, 53, - 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, - 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, - 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 684, 8, 59, 1, 60, 1, 60, 3, 60, 688, - 8, 60, 1, 60, 1, 60, 1, 60, 3, 60, 693, 8, 60, 1, 61, 1, 61, 1, 61, 1, - 61, 3, 61, 699, 8, 61, 1, 61, 1, 61, 1, 62, 3, 62, 704, 8, 62, 1, 62, 1, - 62, 1, 62, 1, 62, 1, 62, 3, 62, 711, 8, 62, 1, 63, 1, 63, 3, 63, 715, 8, - 63, 1, 63, 1, 63, 1, 64, 4, 64, 720, 8, 64, 11, 64, 12, 64, 721, 1, 65, - 3, 65, 725, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 732, 8, 65, - 1, 66, 4, 66, 735, 8, 66, 11, 66, 12, 66, 736, 1, 67, 1, 67, 3, 67, 741, - 8, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 750, 8, - 68, 1, 68, 3, 68, 753, 8, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, - 760, 8, 68, 1, 69, 4, 69, 763, 8, 69, 11, 69, 12, 69, 764, 1, 69, 1, 69, - 1, 70, 1, 70, 3, 70, 771, 8, 70, 1, 70, 3, 70, 774, 8, 70, 1, 70, 1, 70, - 0, 0, 71, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, - 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, - 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, - 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, - 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 0, 91, - 0, 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, 107, 0, 109, 0, - 111, 0, 113, 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, - 129, 0, 131, 0, 133, 0, 135, 0, 137, 0, 139, 45, 141, 46, 1, 0, 16, 3, - 0, 76, 76, 85, 85, 117, 117, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 4, 0, - 10, 10, 13, 13, 39, 39, 92, 92, 3, 0, 65, 90, 95, 95, 97, 122, 1, 0, 48, - 57, 2, 0, 66, 66, 98, 98, 1, 0, 48, 49, 2, 0, 88, 88, 120, 120, 1, 0, 49, - 57, 1, 0, 48, 55, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 69, 69, 101, 101, - 2, 0, 43, 43, 45, 45, 2, 0, 80, 80, 112, 112, 10, 0, 34, 34, 39, 39, 63, - 63, 92, 92, 97, 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, 2, - 0, 9, 9, 32, 32, 819, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, - 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, - 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, - 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, - 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, - 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, - 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, - 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, - 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, - 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, - 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, - 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 139, 1, 0, 0, - 0, 0, 141, 1, 0, 0, 0, 1, 143, 1, 0, 0, 0, 3, 145, 1, 0, 0, 0, 5, 147, - 1, 0, 0, 0, 7, 149, 1, 0, 0, 0, 9, 151, 1, 0, 0, 0, 11, 153, 1, 0, 0, 0, - 13, 155, 1, 0, 0, 0, 15, 158, 1, 0, 0, 0, 17, 160, 1, 0, 0, 0, 19, 163, - 1, 0, 0, 0, 21, 166, 1, 0, 0, 0, 23, 177, 1, 0, 0, 0, 25, 191, 1, 0, 0, - 0, 27, 220, 1, 0, 0, 0, 29, 222, 1, 0, 0, 0, 31, 224, 1, 0, 0, 0, 33, 226, - 1, 0, 0, 0, 35, 228, 1, 0, 0, 0, 37, 230, 1, 0, 0, 0, 39, 232, 1, 0, 0, - 0, 41, 235, 1, 0, 0, 0, 43, 238, 1, 0, 0, 0, 45, 241, 1, 0, 0, 0, 47, 243, - 1, 0, 0, 0, 49, 245, 1, 0, 0, 0, 51, 252, 1, 0, 0, 0, 53, 258, 1, 0, 0, - 0, 55, 260, 1, 0, 0, 0, 57, 266, 1, 0, 0, 0, 59, 272, 1, 0, 0, 0, 61, 274, - 1, 0, 0, 0, 63, 310, 1, 0, 0, 0, 65, 346, 1, 0, 0, 0, 67, 382, 1, 0, 0, - 0, 69, 412, 1, 0, 0, 0, 71, 450, 1, 0, 0, 0, 73, 488, 1, 0, 0, 0, 75, 514, - 1, 0, 0, 0, 77, 543, 1, 0, 0, 0, 79, 549, 1, 0, 0, 0, 81, 553, 1, 0, 0, - 0, 83, 568, 1, 0, 0, 0, 85, 571, 1, 0, 0, 0, 87, 585, 1, 0, 0, 0, 89, 600, - 1, 0, 0, 0, 91, 603, 1, 0, 0, 0, 93, 608, 1, 0, 0, 0, 95, 619, 1, 0, 0, - 0, 97, 628, 1, 0, 0, 0, 99, 630, 1, 0, 0, 0, 101, 632, 1, 0, 0, 0, 103, - 634, 1, 0, 0, 0, 105, 649, 1, 0, 0, 0, 107, 651, 1, 0, 0, 0, 109, 658, - 1, 0, 0, 0, 111, 662, 1, 0, 0, 0, 113, 664, 1, 0, 0, 0, 115, 666, 1, 0, - 0, 0, 117, 668, 1, 0, 0, 0, 119, 683, 1, 0, 0, 0, 121, 692, 1, 0, 0, 0, - 123, 694, 1, 0, 0, 0, 125, 710, 1, 0, 0, 0, 127, 712, 1, 0, 0, 0, 129, - 719, 1, 0, 0, 0, 131, 731, 1, 0, 0, 0, 133, 734, 1, 0, 0, 0, 135, 738, - 1, 0, 0, 0, 137, 759, 1, 0, 0, 0, 139, 762, 1, 0, 0, 0, 141, 773, 1, 0, - 0, 0, 143, 144, 5, 40, 0, 0, 144, 2, 1, 0, 0, 0, 145, 146, 5, 41, 0, 0, - 146, 4, 1, 0, 0, 0, 147, 148, 5, 91, 0, 0, 148, 6, 1, 0, 0, 0, 149, 150, - 5, 44, 0, 0, 150, 8, 1, 0, 0, 0, 151, 152, 5, 93, 0, 0, 152, 10, 1, 0, - 0, 0, 153, 154, 5, 60, 0, 0, 154, 12, 1, 0, 0, 0, 155, 156, 5, 60, 0, 0, - 156, 157, 5, 61, 0, 0, 157, 14, 1, 0, 0, 0, 158, 159, 5, 62, 0, 0, 159, - 16, 1, 0, 0, 0, 160, 161, 5, 62, 0, 0, 161, 162, 5, 61, 0, 0, 162, 18, - 1, 0, 0, 0, 163, 164, 5, 61, 0, 0, 164, 165, 5, 61, 0, 0, 165, 20, 1, 0, - 0, 0, 166, 167, 5, 33, 0, 0, 167, 168, 5, 61, 0, 0, 168, 22, 1, 0, 0, 0, - 169, 170, 5, 108, 0, 0, 170, 171, 5, 105, 0, 0, 171, 172, 5, 107, 0, 0, - 172, 178, 5, 101, 0, 0, 173, 174, 5, 76, 0, 0, 174, 175, 5, 73, 0, 0, 175, - 176, 5, 75, 0, 0, 176, 178, 5, 69, 0, 0, 177, 169, 1, 0, 0, 0, 177, 173, - 1, 0, 0, 0, 178, 24, 1, 0, 0, 0, 179, 180, 5, 101, 0, 0, 180, 181, 5, 120, - 0, 0, 181, 182, 5, 105, 0, 0, 182, 183, 5, 115, 0, 0, 183, 184, 5, 116, - 0, 0, 184, 192, 5, 115, 0, 0, 185, 186, 5, 69, 0, 0, 186, 187, 5, 88, 0, - 0, 187, 188, 5, 73, 0, 0, 188, 189, 5, 83, 0, 0, 189, 190, 5, 84, 0, 0, - 190, 192, 5, 83, 0, 0, 191, 179, 1, 0, 0, 0, 191, 185, 1, 0, 0, 0, 192, - 26, 1, 0, 0, 0, 193, 194, 5, 84, 0, 0, 194, 195, 5, 101, 0, 0, 195, 196, - 5, 120, 0, 0, 196, 197, 5, 116, 0, 0, 197, 198, 5, 77, 0, 0, 198, 199, - 5, 97, 0, 0, 199, 200, 5, 116, 0, 0, 200, 201, 5, 99, 0, 0, 201, 221, 5, - 104, 0, 0, 202, 203, 5, 116, 0, 0, 203, 204, 5, 101, 0, 0, 204, 205, 5, - 120, 0, 0, 205, 206, 5, 116, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, - 97, 0, 0, 208, 209, 5, 116, 0, 0, 209, 210, 5, 99, 0, 0, 210, 221, 5, 104, - 0, 0, 211, 212, 5, 84, 0, 0, 212, 213, 5, 69, 0, 0, 213, 214, 5, 88, 0, - 0, 214, 215, 5, 84, 0, 0, 215, 216, 5, 77, 0, 0, 216, 217, 5, 65, 0, 0, - 217, 218, 5, 84, 0, 0, 218, 219, 5, 67, 0, 0, 219, 221, 5, 72, 0, 0, 220, - 193, 1, 0, 0, 0, 220, 202, 1, 0, 0, 0, 220, 211, 1, 0, 0, 0, 221, 28, 1, - 0, 0, 0, 222, 223, 5, 43, 0, 0, 223, 30, 1, 0, 0, 0, 224, 225, 5, 45, 0, - 0, 225, 32, 1, 0, 0, 0, 226, 227, 5, 42, 0, 0, 227, 34, 1, 0, 0, 0, 228, - 229, 5, 47, 0, 0, 229, 36, 1, 0, 0, 0, 230, 231, 5, 37, 0, 0, 231, 38, - 1, 0, 0, 0, 232, 233, 5, 42, 0, 0, 233, 234, 5, 42, 0, 0, 234, 40, 1, 0, - 0, 0, 235, 236, 5, 60, 0, 0, 236, 237, 5, 60, 0, 0, 237, 42, 1, 0, 0, 0, - 238, 239, 5, 62, 0, 0, 239, 240, 5, 62, 0, 0, 240, 44, 1, 0, 0, 0, 241, - 242, 5, 38, 0, 0, 242, 46, 1, 0, 0, 0, 243, 244, 5, 124, 0, 0, 244, 48, - 1, 0, 0, 0, 245, 246, 5, 94, 0, 0, 246, 50, 1, 0, 0, 0, 247, 248, 5, 38, - 0, 0, 248, 253, 5, 38, 0, 0, 249, 250, 5, 97, 0, 0, 250, 251, 5, 110, 0, - 0, 251, 253, 5, 100, 0, 0, 252, 247, 1, 0, 0, 0, 252, 249, 1, 0, 0, 0, - 253, 52, 1, 0, 0, 0, 254, 255, 5, 124, 0, 0, 255, 259, 5, 124, 0, 0, 256, - 257, 5, 111, 0, 0, 257, 259, 5, 114, 0, 0, 258, 254, 1, 0, 0, 0, 258, 256, - 1, 0, 0, 0, 259, 54, 1, 0, 0, 0, 260, 261, 5, 126, 0, 0, 261, 56, 1, 0, - 0, 0, 262, 267, 5, 33, 0, 0, 263, 264, 5, 110, 0, 0, 264, 265, 5, 111, - 0, 0, 265, 267, 5, 116, 0, 0, 266, 262, 1, 0, 0, 0, 266, 263, 1, 0, 0, - 0, 267, 58, 1, 0, 0, 0, 268, 269, 5, 105, 0, 0, 269, 273, 5, 110, 0, 0, - 270, 271, 5, 73, 0, 0, 271, 273, 5, 78, 0, 0, 272, 268, 1, 0, 0, 0, 272, - 270, 1, 0, 0, 0, 273, 60, 1, 0, 0, 0, 274, 279, 5, 91, 0, 0, 275, 278, - 3, 139, 69, 0, 276, 278, 3, 141, 70, 0, 277, 275, 1, 0, 0, 0, 277, 276, - 1, 0, 0, 0, 278, 281, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, - 0, 0, 280, 282, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 282, 283, 5, 93, 0, 0, - 283, 62, 1, 0, 0, 0, 284, 285, 5, 106, 0, 0, 285, 286, 5, 115, 0, 0, 286, - 287, 5, 111, 0, 0, 287, 288, 5, 110, 0, 0, 288, 289, 5, 95, 0, 0, 289, - 290, 5, 99, 0, 0, 290, 291, 5, 111, 0, 0, 291, 292, 5, 110, 0, 0, 292, - 293, 5, 116, 0, 0, 293, 294, 5, 97, 0, 0, 294, 295, 5, 105, 0, 0, 295, - 296, 5, 110, 0, 0, 296, 311, 5, 115, 0, 0, 297, 298, 5, 74, 0, 0, 298, - 299, 5, 83, 0, 0, 299, 300, 5, 79, 0, 0, 300, 301, 5, 78, 0, 0, 301, 302, - 5, 95, 0, 0, 302, 303, 5, 67, 0, 0, 303, 304, 5, 79, 0, 0, 304, 305, 5, - 78, 0, 0, 305, 306, 5, 84, 0, 0, 306, 307, 5, 65, 0, 0, 307, 308, 5, 73, - 0, 0, 308, 309, 5, 78, 0, 0, 309, 311, 5, 83, 0, 0, 310, 284, 1, 0, 0, - 0, 310, 297, 1, 0, 0, 0, 311, 64, 1, 0, 0, 0, 312, 313, 5, 106, 0, 0, 313, - 314, 5, 115, 0, 0, 314, 315, 5, 111, 0, 0, 315, 316, 5, 110, 0, 0, 316, - 317, 5, 95, 0, 0, 317, 318, 5, 99, 0, 0, 318, 319, 5, 111, 0, 0, 319, 320, - 5, 110, 0, 0, 320, 321, 5, 116, 0, 0, 321, 322, 5, 97, 0, 0, 322, 323, - 5, 105, 0, 0, 323, 324, 5, 110, 0, 0, 324, 325, 5, 115, 0, 0, 325, 326, - 5, 95, 0, 0, 326, 327, 5, 97, 0, 0, 327, 328, 5, 108, 0, 0, 328, 347, 5, - 108, 0, 0, 329, 330, 5, 74, 0, 0, 330, 331, 5, 83, 0, 0, 331, 332, 5, 79, - 0, 0, 332, 333, 5, 78, 0, 0, 333, 334, 5, 95, 0, 0, 334, 335, 5, 67, 0, - 0, 335, 336, 5, 79, 0, 0, 336, 337, 5, 78, 0, 0, 337, 338, 5, 84, 0, 0, - 338, 339, 5, 65, 0, 0, 339, 340, 5, 73, 0, 0, 340, 341, 5, 78, 0, 0, 341, - 342, 5, 83, 0, 0, 342, 343, 5, 95, 0, 0, 343, 344, 5, 65, 0, 0, 344, 345, - 5, 76, 0, 0, 345, 347, 5, 76, 0, 0, 346, 312, 1, 0, 0, 0, 346, 329, 1, - 0, 0, 0, 347, 66, 1, 0, 0, 0, 348, 349, 5, 106, 0, 0, 349, 350, 5, 115, - 0, 0, 350, 351, 5, 111, 0, 0, 351, 352, 5, 110, 0, 0, 352, 353, 5, 95, - 0, 0, 353, 354, 5, 99, 0, 0, 354, 355, 5, 111, 0, 0, 355, 356, 5, 110, - 0, 0, 356, 357, 5, 116, 0, 0, 357, 358, 5, 97, 0, 0, 358, 359, 5, 105, - 0, 0, 359, 360, 5, 110, 0, 0, 360, 361, 5, 115, 0, 0, 361, 362, 5, 95, - 0, 0, 362, 363, 5, 97, 0, 0, 363, 364, 5, 110, 0, 0, 364, 383, 5, 121, - 0, 0, 365, 366, 5, 74, 0, 0, 366, 367, 5, 83, 0, 0, 367, 368, 5, 79, 0, - 0, 368, 369, 5, 78, 0, 0, 369, 370, 5, 95, 0, 0, 370, 371, 5, 67, 0, 0, - 371, 372, 5, 79, 0, 0, 372, 373, 5, 78, 0, 0, 373, 374, 5, 84, 0, 0, 374, - 375, 5, 65, 0, 0, 375, 376, 5, 73, 0, 0, 376, 377, 5, 78, 0, 0, 377, 378, - 5, 83, 0, 0, 378, 379, 5, 95, 0, 0, 379, 380, 5, 65, 0, 0, 380, 381, 5, - 78, 0, 0, 381, 383, 5, 89, 0, 0, 382, 348, 1, 0, 0, 0, 382, 365, 1, 0, - 0, 0, 383, 68, 1, 0, 0, 0, 384, 385, 5, 97, 0, 0, 385, 386, 5, 114, 0, - 0, 386, 387, 5, 114, 0, 0, 387, 388, 5, 97, 0, 0, 388, 389, 5, 121, 0, - 0, 389, 390, 5, 95, 0, 0, 390, 391, 5, 99, 0, 0, 391, 392, 5, 111, 0, 0, - 392, 393, 5, 110, 0, 0, 393, 394, 5, 116, 0, 0, 394, 395, 5, 97, 0, 0, - 395, 396, 5, 105, 0, 0, 396, 397, 5, 110, 0, 0, 397, 413, 5, 115, 0, 0, - 398, 399, 5, 65, 0, 0, 399, 400, 5, 82, 0, 0, 400, 401, 5, 82, 0, 0, 401, - 402, 5, 65, 0, 0, 402, 403, 5, 89, 0, 0, 403, 404, 5, 95, 0, 0, 404, 405, - 5, 67, 0, 0, 405, 406, 5, 79, 0, 0, 406, 407, 5, 78, 0, 0, 407, 408, 5, - 84, 0, 0, 408, 409, 5, 65, 0, 0, 409, 410, 5, 73, 0, 0, 410, 411, 5, 78, - 0, 0, 411, 413, 5, 83, 0, 0, 412, 384, 1, 0, 0, 0, 412, 398, 1, 0, 0, 0, - 413, 70, 1, 0, 0, 0, 414, 415, 5, 97, 0, 0, 415, 416, 5, 114, 0, 0, 416, - 417, 5, 114, 0, 0, 417, 418, 5, 97, 0, 0, 418, 419, 5, 121, 0, 0, 419, - 420, 5, 95, 0, 0, 420, 421, 5, 99, 0, 0, 421, 422, 5, 111, 0, 0, 422, 423, - 5, 110, 0, 0, 423, 424, 5, 116, 0, 0, 424, 425, 5, 97, 0, 0, 425, 426, - 5, 105, 0, 0, 426, 427, 5, 110, 0, 0, 427, 428, 5, 115, 0, 0, 428, 429, - 5, 95, 0, 0, 429, 430, 5, 97, 0, 0, 430, 431, 5, 108, 0, 0, 431, 451, 5, - 108, 0, 0, 432, 433, 5, 65, 0, 0, 433, 434, 5, 82, 0, 0, 434, 435, 5, 82, - 0, 0, 435, 436, 5, 65, 0, 0, 436, 437, 5, 89, 0, 0, 437, 438, 5, 95, 0, - 0, 438, 439, 5, 67, 0, 0, 439, 440, 5, 79, 0, 0, 440, 441, 5, 78, 0, 0, - 441, 442, 5, 84, 0, 0, 442, 443, 5, 65, 0, 0, 443, 444, 5, 73, 0, 0, 444, - 445, 5, 78, 0, 0, 445, 446, 5, 83, 0, 0, 446, 447, 5, 95, 0, 0, 447, 448, - 5, 65, 0, 0, 448, 449, 5, 76, 0, 0, 449, 451, 5, 76, 0, 0, 450, 414, 1, - 0, 0, 0, 450, 432, 1, 0, 0, 0, 451, 72, 1, 0, 0, 0, 452, 453, 5, 97, 0, - 0, 453, 454, 5, 114, 0, 0, 454, 455, 5, 114, 0, 0, 455, 456, 5, 97, 0, - 0, 456, 457, 5, 121, 0, 0, 457, 458, 5, 95, 0, 0, 458, 459, 5, 99, 0, 0, - 459, 460, 5, 111, 0, 0, 460, 461, 5, 110, 0, 0, 461, 462, 5, 116, 0, 0, - 462, 463, 5, 97, 0, 0, 463, 464, 5, 105, 0, 0, 464, 465, 5, 110, 0, 0, - 465, 466, 5, 115, 0, 0, 466, 467, 5, 95, 0, 0, 467, 468, 5, 97, 0, 0, 468, - 469, 5, 110, 0, 0, 469, 489, 5, 121, 0, 0, 470, 471, 5, 65, 0, 0, 471, - 472, 5, 82, 0, 0, 472, 473, 5, 82, 0, 0, 473, 474, 5, 65, 0, 0, 474, 475, - 5, 89, 0, 0, 475, 476, 5, 95, 0, 0, 476, 477, 5, 67, 0, 0, 477, 478, 5, - 79, 0, 0, 478, 479, 5, 78, 0, 0, 479, 480, 5, 84, 0, 0, 480, 481, 5, 65, - 0, 0, 481, 482, 5, 73, 0, 0, 482, 483, 5, 78, 0, 0, 483, 484, 5, 83, 0, - 0, 484, 485, 5, 95, 0, 0, 485, 486, 5, 65, 0, 0, 486, 487, 5, 78, 0, 0, - 487, 489, 5, 89, 0, 0, 488, 452, 1, 0, 0, 0, 488, 470, 1, 0, 0, 0, 489, - 74, 1, 0, 0, 0, 490, 491, 5, 97, 0, 0, 491, 492, 5, 114, 0, 0, 492, 493, - 5, 114, 0, 0, 493, 494, 5, 97, 0, 0, 494, 495, 5, 121, 0, 0, 495, 496, - 5, 95, 0, 0, 496, 497, 5, 108, 0, 0, 497, 498, 5, 101, 0, 0, 498, 499, - 5, 110, 0, 0, 499, 500, 5, 103, 0, 0, 500, 501, 5, 116, 0, 0, 501, 515, - 5, 104, 0, 0, 502, 503, 5, 65, 0, 0, 503, 504, 5, 82, 0, 0, 504, 505, 5, - 82, 0, 0, 505, 506, 5, 65, 0, 0, 506, 507, 5, 89, 0, 0, 507, 508, 5, 95, - 0, 0, 508, 509, 5, 76, 0, 0, 509, 510, 5, 69, 0, 0, 510, 511, 5, 78, 0, - 0, 511, 512, 5, 71, 0, 0, 512, 513, 5, 84, 0, 0, 513, 515, 5, 72, 0, 0, - 514, 490, 1, 0, 0, 0, 514, 502, 1, 0, 0, 0, 515, 76, 1, 0, 0, 0, 516, 517, - 5, 116, 0, 0, 517, 518, 5, 114, 0, 0, 518, 519, 5, 117, 0, 0, 519, 544, - 5, 101, 0, 0, 520, 521, 5, 84, 0, 0, 521, 522, 5, 114, 0, 0, 522, 523, - 5, 117, 0, 0, 523, 544, 5, 101, 0, 0, 524, 525, 5, 84, 0, 0, 525, 526, - 5, 82, 0, 0, 526, 527, 5, 85, 0, 0, 527, 544, 5, 69, 0, 0, 528, 529, 5, - 102, 0, 0, 529, 530, 5, 97, 0, 0, 530, 531, 5, 108, 0, 0, 531, 532, 5, - 115, 0, 0, 532, 544, 5, 101, 0, 0, 533, 534, 5, 70, 0, 0, 534, 535, 5, - 97, 0, 0, 535, 536, 5, 108, 0, 0, 536, 537, 5, 115, 0, 0, 537, 544, 5, - 101, 0, 0, 538, 539, 5, 70, 0, 0, 539, 540, 5, 65, 0, 0, 540, 541, 5, 76, - 0, 0, 541, 542, 5, 83, 0, 0, 542, 544, 5, 69, 0, 0, 543, 516, 1, 0, 0, - 0, 543, 520, 1, 0, 0, 0, 543, 524, 1, 0, 0, 0, 543, 528, 1, 0, 0, 0, 543, - 533, 1, 0, 0, 0, 543, 538, 1, 0, 0, 0, 544, 78, 1, 0, 0, 0, 545, 550, 3, - 105, 52, 0, 546, 550, 3, 107, 53, 0, 547, 550, 3, 109, 54, 0, 548, 550, - 3, 103, 51, 0, 549, 545, 1, 0, 0, 0, 549, 546, 1, 0, 0, 0, 549, 547, 1, - 0, 0, 0, 549, 548, 1, 0, 0, 0, 550, 80, 1, 0, 0, 0, 551, 554, 3, 121, 60, - 0, 552, 554, 3, 123, 61, 0, 553, 551, 1, 0, 0, 0, 553, 552, 1, 0, 0, 0, - 554, 82, 1, 0, 0, 0, 555, 560, 3, 99, 49, 0, 556, 559, 3, 99, 49, 0, 557, - 559, 3, 101, 50, 0, 558, 556, 1, 0, 0, 0, 558, 557, 1, 0, 0, 0, 559, 562, - 1, 0, 0, 0, 560, 558, 1, 0, 0, 0, 560, 561, 1, 0, 0, 0, 561, 569, 1, 0, - 0, 0, 562, 560, 1, 0, 0, 0, 563, 564, 5, 36, 0, 0, 564, 565, 5, 109, 0, - 0, 565, 566, 5, 101, 0, 0, 566, 567, 5, 116, 0, 0, 567, 569, 5, 97, 0, - 0, 568, 555, 1, 0, 0, 0, 568, 563, 1, 0, 0, 0, 569, 84, 1, 0, 0, 0, 570, - 572, 3, 89, 44, 0, 571, 570, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 583, - 1, 0, 0, 0, 573, 575, 5, 34, 0, 0, 574, 576, 3, 91, 45, 0, 575, 574, 1, - 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 577, 1, 0, 0, 0, 577, 584, 5, 34, 0, - 0, 578, 580, 5, 39, 0, 0, 579, 581, 3, 93, 46, 0, 580, 579, 1, 0, 0, 0, - 580, 581, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 584, 5, 39, 0, 0, 583, - 573, 1, 0, 0, 0, 583, 578, 1, 0, 0, 0, 584, 86, 1, 0, 0, 0, 585, 593, 3, - 83, 41, 0, 586, 589, 5, 91, 0, 0, 587, 590, 3, 85, 42, 0, 588, 590, 3, - 105, 52, 0, 589, 587, 1, 0, 0, 0, 589, 588, 1, 0, 0, 0, 590, 591, 1, 0, - 0, 0, 591, 592, 5, 93, 0, 0, 592, 594, 1, 0, 0, 0, 593, 586, 1, 0, 0, 0, - 594, 595, 1, 0, 0, 0, 595, 593, 1, 0, 0, 0, 595, 596, 1, 0, 0, 0, 596, - 88, 1, 0, 0, 0, 597, 598, 5, 117, 0, 0, 598, 601, 5, 56, 0, 0, 599, 601, - 7, 0, 0, 0, 600, 597, 1, 0, 0, 0, 600, 599, 1, 0, 0, 0, 601, 90, 1, 0, - 0, 0, 602, 604, 3, 95, 47, 0, 603, 602, 1, 0, 0, 0, 604, 605, 1, 0, 0, - 0, 605, 603, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 92, 1, 0, 0, 0, 607, - 609, 3, 97, 48, 0, 608, 607, 1, 0, 0, 0, 609, 610, 1, 0, 0, 0, 610, 608, - 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 94, 1, 0, 0, 0, 612, 620, 8, 1, - 0, 0, 613, 620, 3, 137, 68, 0, 614, 615, 5, 92, 0, 0, 615, 620, 5, 10, - 0, 0, 616, 617, 5, 92, 0, 0, 617, 618, 5, 13, 0, 0, 618, 620, 5, 10, 0, - 0, 619, 612, 1, 0, 0, 0, 619, 613, 1, 0, 0, 0, 619, 614, 1, 0, 0, 0, 619, - 616, 1, 0, 0, 0, 620, 96, 1, 0, 0, 0, 621, 629, 8, 2, 0, 0, 622, 629, 3, - 137, 68, 0, 623, 624, 5, 92, 0, 0, 624, 629, 5, 10, 0, 0, 625, 626, 5, - 92, 0, 0, 626, 627, 5, 13, 0, 0, 627, 629, 5, 10, 0, 0, 628, 621, 1, 0, - 0, 0, 628, 622, 1, 0, 0, 0, 628, 623, 1, 0, 0, 0, 628, 625, 1, 0, 0, 0, - 629, 98, 1, 0, 0, 0, 630, 631, 7, 3, 0, 0, 631, 100, 1, 0, 0, 0, 632, 633, - 7, 4, 0, 0, 633, 102, 1, 0, 0, 0, 634, 635, 5, 48, 0, 0, 635, 637, 7, 5, - 0, 0, 636, 638, 7, 6, 0, 0, 637, 636, 1, 0, 0, 0, 638, 639, 1, 0, 0, 0, - 639, 637, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 104, 1, 0, 0, 0, 641, - 645, 3, 111, 55, 0, 642, 644, 3, 101, 50, 0, 643, 642, 1, 0, 0, 0, 644, - 647, 1, 0, 0, 0, 645, 643, 1, 0, 0, 0, 645, 646, 1, 0, 0, 0, 646, 650, - 1, 0, 0, 0, 647, 645, 1, 0, 0, 0, 648, 650, 5, 48, 0, 0, 649, 641, 1, 0, - 0, 0, 649, 648, 1, 0, 0, 0, 650, 106, 1, 0, 0, 0, 651, 655, 5, 48, 0, 0, - 652, 654, 3, 113, 56, 0, 653, 652, 1, 0, 0, 0, 654, 657, 1, 0, 0, 0, 655, - 653, 1, 0, 0, 0, 655, 656, 1, 0, 0, 0, 656, 108, 1, 0, 0, 0, 657, 655, - 1, 0, 0, 0, 658, 659, 5, 48, 0, 0, 659, 660, 7, 7, 0, 0, 660, 661, 3, 133, - 66, 0, 661, 110, 1, 0, 0, 0, 662, 663, 7, 8, 0, 0, 663, 112, 1, 0, 0, 0, - 664, 665, 7, 9, 0, 0, 665, 114, 1, 0, 0, 0, 666, 667, 7, 10, 0, 0, 667, - 116, 1, 0, 0, 0, 668, 669, 3, 115, 57, 0, 669, 670, 3, 115, 57, 0, 670, - 671, 3, 115, 57, 0, 671, 672, 3, 115, 57, 0, 672, 118, 1, 0, 0, 0, 673, - 674, 5, 92, 0, 0, 674, 675, 5, 117, 0, 0, 675, 676, 1, 0, 0, 0, 676, 684, - 3, 117, 58, 0, 677, 678, 5, 92, 0, 0, 678, 679, 5, 85, 0, 0, 679, 680, - 1, 0, 0, 0, 680, 681, 3, 117, 58, 0, 681, 682, 3, 117, 58, 0, 682, 684, - 1, 0, 0, 0, 683, 673, 1, 0, 0, 0, 683, 677, 1, 0, 0, 0, 684, 120, 1, 0, - 0, 0, 685, 687, 3, 125, 62, 0, 686, 688, 3, 127, 63, 0, 687, 686, 1, 0, - 0, 0, 687, 688, 1, 0, 0, 0, 688, 693, 1, 0, 0, 0, 689, 690, 3, 129, 64, - 0, 690, 691, 3, 127, 63, 0, 691, 693, 1, 0, 0, 0, 692, 685, 1, 0, 0, 0, - 692, 689, 1, 0, 0, 0, 693, 122, 1, 0, 0, 0, 694, 695, 5, 48, 0, 0, 695, - 698, 7, 7, 0, 0, 696, 699, 3, 131, 65, 0, 697, 699, 3, 133, 66, 0, 698, - 696, 1, 0, 0, 0, 698, 697, 1, 0, 0, 0, 699, 700, 1, 0, 0, 0, 700, 701, - 3, 135, 67, 0, 701, 124, 1, 0, 0, 0, 702, 704, 3, 129, 64, 0, 703, 702, - 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 705, 1, 0, 0, 0, 705, 706, 5, 46, - 0, 0, 706, 711, 3, 129, 64, 0, 707, 708, 3, 129, 64, 0, 708, 709, 5, 46, - 0, 0, 709, 711, 1, 0, 0, 0, 710, 703, 1, 0, 0, 0, 710, 707, 1, 0, 0, 0, - 711, 126, 1, 0, 0, 0, 712, 714, 7, 11, 0, 0, 713, 715, 7, 12, 0, 0, 714, - 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 717, - 3, 129, 64, 0, 717, 128, 1, 0, 0, 0, 718, 720, 3, 101, 50, 0, 719, 718, - 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 719, 1, 0, 0, 0, 721, 722, 1, 0, - 0, 0, 722, 130, 1, 0, 0, 0, 723, 725, 3, 133, 66, 0, 724, 723, 1, 0, 0, - 0, 724, 725, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, 726, 727, 5, 46, 0, 0, 727, - 732, 3, 133, 66, 0, 728, 729, 3, 133, 66, 0, 729, 730, 5, 46, 0, 0, 730, - 732, 1, 0, 0, 0, 731, 724, 1, 0, 0, 0, 731, 728, 1, 0, 0, 0, 732, 132, - 1, 0, 0, 0, 733, 735, 3, 115, 57, 0, 734, 733, 1, 0, 0, 0, 735, 736, 1, - 0, 0, 0, 736, 734, 1, 0, 0, 0, 736, 737, 1, 0, 0, 0, 737, 134, 1, 0, 0, - 0, 738, 740, 7, 13, 0, 0, 739, 741, 7, 12, 0, 0, 740, 739, 1, 0, 0, 0, - 740, 741, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 742, 743, 3, 129, 64, 0, 743, - 136, 1, 0, 0, 0, 744, 745, 5, 92, 0, 0, 745, 760, 7, 14, 0, 0, 746, 747, - 5, 92, 0, 0, 747, 749, 3, 113, 56, 0, 748, 750, 3, 113, 56, 0, 749, 748, - 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 750, 752, 1, 0, 0, 0, 751, 753, 3, 113, - 56, 0, 752, 751, 1, 0, 0, 0, 752, 753, 1, 0, 0, 0, 753, 760, 1, 0, 0, 0, - 754, 755, 5, 92, 0, 0, 755, 756, 5, 120, 0, 0, 756, 757, 1, 0, 0, 0, 757, - 760, 3, 133, 66, 0, 758, 760, 3, 119, 59, 0, 759, 744, 1, 0, 0, 0, 759, - 746, 1, 0, 0, 0, 759, 754, 1, 0, 0, 0, 759, 758, 1, 0, 0, 0, 760, 138, - 1, 0, 0, 0, 761, 763, 7, 15, 0, 0, 762, 761, 1, 0, 0, 0, 763, 764, 1, 0, - 0, 0, 764, 762, 1, 0, 0, 0, 764, 765, 1, 0, 0, 0, 765, 766, 1, 0, 0, 0, - 766, 767, 6, 69, 0, 0, 767, 140, 1, 0, 0, 0, 768, 770, 5, 13, 0, 0, 769, - 771, 5, 10, 0, 0, 770, 769, 1, 0, 0, 0, 770, 771, 1, 0, 0, 0, 771, 774, - 1, 0, 0, 0, 772, 774, 5, 10, 0, 0, 773, 768, 1, 0, 0, 0, 773, 772, 1, 0, - 0, 0, 774, 775, 1, 0, 0, 0, 775, 776, 6, 70, 0, 0, 776, 142, 1, 0, 0, 0, - 56, 0, 177, 191, 220, 252, 258, 266, 272, 277, 279, 310, 346, 382, 412, - 450, 488, 514, 543, 549, 553, 558, 560, 568, 571, 575, 580, 583, 589, 595, - 600, 605, 610, 619, 628, 639, 645, 649, 655, 683, 687, 692, 698, 703, 710, - 714, 721, 724, 731, 736, 740, 749, 752, 759, 764, 770, 773, 1, 6, 0, 0, + 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, + 1, 38, 1, 38, 3, 38, 497, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, + 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, + 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 523, 8, + 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, + 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, + 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 552, 8, 40, 1, 41, + 1, 41, 1, 41, 1, 41, 3, 41, 558, 8, 41, 1, 42, 1, 42, 3, 42, 562, 8, 42, + 1, 43, 1, 43, 1, 43, 5, 43, 567, 8, 43, 10, 43, 12, 43, 570, 9, 43, 1, + 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 577, 8, 43, 1, 44, 3, 44, 580, 8, + 44, 1, 44, 1, 44, 3, 44, 584, 8, 44, 1, 44, 1, 44, 1, 44, 3, 44, 589, 8, + 44, 1, 44, 3, 44, 592, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 598, 8, + 45, 1, 45, 1, 45, 4, 45, 602, 8, 45, 11, 45, 12, 45, 603, 1, 46, 1, 46, + 1, 46, 3, 46, 609, 8, 46, 1, 47, 4, 47, 612, 8, 47, 11, 47, 12, 47, 613, + 1, 48, 4, 48, 617, 8, 48, 11, 48, 12, 48, 618, 1, 49, 1, 49, 1, 49, 1, + 49, 1, 49, 1, 49, 1, 49, 3, 49, 628, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, + 1, 50, 1, 50, 1, 50, 3, 50, 637, 8, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, + 53, 1, 53, 1, 53, 4, 53, 646, 8, 53, 11, 53, 12, 53, 647, 1, 54, 1, 54, + 5, 54, 652, 8, 54, 10, 54, 12, 54, 655, 9, 54, 1, 54, 3, 54, 658, 8, 54, + 1, 55, 1, 55, 5, 55, 662, 8, 55, 10, 55, 12, 55, 665, 9, 55, 1, 56, 1, + 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, + 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, + 61, 1, 61, 1, 61, 3, 61, 692, 8, 61, 1, 62, 1, 62, 3, 62, 696, 8, 62, 1, + 62, 1, 62, 1, 62, 3, 62, 701, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, + 707, 8, 63, 1, 63, 1, 63, 1, 64, 3, 64, 712, 8, 64, 1, 64, 1, 64, 1, 64, + 1, 64, 1, 64, 3, 64, 719, 8, 64, 1, 65, 1, 65, 3, 65, 723, 8, 65, 1, 65, + 1, 65, 1, 66, 4, 66, 728, 8, 66, 11, 66, 12, 66, 729, 1, 67, 3, 67, 733, + 8, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 740, 8, 67, 1, 68, 4, + 68, 743, 8, 68, 11, 68, 12, 68, 744, 1, 69, 1, 69, 3, 69, 749, 8, 69, 1, + 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 758, 8, 70, 1, 70, + 3, 70, 761, 8, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 768, 8, 70, + 1, 71, 4, 71, 771, 8, 71, 11, 71, 12, 71, 772, 1, 71, 1, 71, 1, 72, 1, + 72, 3, 72, 779, 8, 72, 1, 72, 3, 72, 782, 8, 72, 1, 72, 1, 72, 0, 0, 73, + 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, + 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, + 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, + 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, + 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 0, + 95, 0, 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, 107, 0, 109, 0, 111, 0, 113, + 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, 129, 0, 131, + 0, 133, 0, 135, 0, 137, 0, 139, 0, 141, 0, 143, 47, 145, 48, 1, 0, 16, + 3, 0, 76, 76, 85, 85, 117, 117, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 4, + 0, 10, 10, 13, 13, 39, 39, 92, 92, 3, 0, 65, 90, 95, 95, 97, 122, 1, 0, + 48, 57, 2, 0, 66, 66, 98, 98, 1, 0, 48, 49, 2, 0, 88, 88, 120, 120, 1, + 0, 49, 57, 1, 0, 48, 55, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 69, 69, 101, + 101, 2, 0, 43, 43, 45, 45, 2, 0, 80, 80, 112, 112, 10, 0, 34, 34, 39, 39, + 63, 63, 92, 92, 97, 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, + 2, 0, 9, 9, 32, 32, 827, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, + 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, + 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, + 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, + 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, + 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, + 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, + 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, + 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, + 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, + 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, + 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, + 0, 0, 91, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 1, 147, 1, + 0, 0, 0, 3, 149, 1, 0, 0, 0, 5, 151, 1, 0, 0, 0, 7, 153, 1, 0, 0, 0, 9, + 155, 1, 0, 0, 0, 11, 157, 1, 0, 0, 0, 13, 159, 1, 0, 0, 0, 15, 161, 1, + 0, 0, 0, 17, 163, 1, 0, 0, 0, 19, 166, 1, 0, 0, 0, 21, 168, 1, 0, 0, 0, + 23, 171, 1, 0, 0, 0, 25, 174, 1, 0, 0, 0, 27, 185, 1, 0, 0, 0, 29, 199, + 1, 0, 0, 0, 31, 228, 1, 0, 0, 0, 33, 230, 1, 0, 0, 0, 35, 232, 1, 0, 0, + 0, 37, 234, 1, 0, 0, 0, 39, 236, 1, 0, 0, 0, 41, 238, 1, 0, 0, 0, 43, 240, + 1, 0, 0, 0, 45, 243, 1, 0, 0, 0, 47, 246, 1, 0, 0, 0, 49, 249, 1, 0, 0, + 0, 51, 251, 1, 0, 0, 0, 53, 253, 1, 0, 0, 0, 55, 260, 1, 0, 0, 0, 57, 266, + 1, 0, 0, 0, 59, 268, 1, 0, 0, 0, 61, 274, 1, 0, 0, 0, 63, 280, 1, 0, 0, + 0, 65, 282, 1, 0, 0, 0, 67, 318, 1, 0, 0, 0, 69, 354, 1, 0, 0, 0, 71, 390, + 1, 0, 0, 0, 73, 420, 1, 0, 0, 0, 75, 458, 1, 0, 0, 0, 77, 496, 1, 0, 0, + 0, 79, 522, 1, 0, 0, 0, 81, 551, 1, 0, 0, 0, 83, 557, 1, 0, 0, 0, 85, 561, + 1, 0, 0, 0, 87, 576, 1, 0, 0, 0, 89, 579, 1, 0, 0, 0, 91, 593, 1, 0, 0, + 0, 93, 608, 1, 0, 0, 0, 95, 611, 1, 0, 0, 0, 97, 616, 1, 0, 0, 0, 99, 627, + 1, 0, 0, 0, 101, 636, 1, 0, 0, 0, 103, 638, 1, 0, 0, 0, 105, 640, 1, 0, + 0, 0, 107, 642, 1, 0, 0, 0, 109, 657, 1, 0, 0, 0, 111, 659, 1, 0, 0, 0, + 113, 666, 1, 0, 0, 0, 115, 670, 1, 0, 0, 0, 117, 672, 1, 0, 0, 0, 119, + 674, 1, 0, 0, 0, 121, 676, 1, 0, 0, 0, 123, 691, 1, 0, 0, 0, 125, 700, + 1, 0, 0, 0, 127, 702, 1, 0, 0, 0, 129, 718, 1, 0, 0, 0, 131, 720, 1, 0, + 0, 0, 133, 727, 1, 0, 0, 0, 135, 739, 1, 0, 0, 0, 137, 742, 1, 0, 0, 0, + 139, 746, 1, 0, 0, 0, 141, 767, 1, 0, 0, 0, 143, 770, 1, 0, 0, 0, 145, + 781, 1, 0, 0, 0, 147, 148, 5, 40, 0, 0, 148, 2, 1, 0, 0, 0, 149, 150, 5, + 41, 0, 0, 150, 4, 1, 0, 0, 0, 151, 152, 5, 91, 0, 0, 152, 6, 1, 0, 0, 0, + 153, 154, 5, 44, 0, 0, 154, 8, 1, 0, 0, 0, 155, 156, 5, 93, 0, 0, 156, + 10, 1, 0, 0, 0, 157, 158, 5, 123, 0, 0, 158, 12, 1, 0, 0, 0, 159, 160, + 5, 125, 0, 0, 160, 14, 1, 0, 0, 0, 161, 162, 5, 60, 0, 0, 162, 16, 1, 0, + 0, 0, 163, 164, 5, 60, 0, 0, 164, 165, 5, 61, 0, 0, 165, 18, 1, 0, 0, 0, + 166, 167, 5, 62, 0, 0, 167, 20, 1, 0, 0, 0, 168, 169, 5, 62, 0, 0, 169, + 170, 5, 61, 0, 0, 170, 22, 1, 0, 0, 0, 171, 172, 5, 61, 0, 0, 172, 173, + 5, 61, 0, 0, 173, 24, 1, 0, 0, 0, 174, 175, 5, 33, 0, 0, 175, 176, 5, 61, + 0, 0, 176, 26, 1, 0, 0, 0, 177, 178, 5, 108, 0, 0, 178, 179, 5, 105, 0, + 0, 179, 180, 5, 107, 0, 0, 180, 186, 5, 101, 0, 0, 181, 182, 5, 76, 0, + 0, 182, 183, 5, 73, 0, 0, 183, 184, 5, 75, 0, 0, 184, 186, 5, 69, 0, 0, + 185, 177, 1, 0, 0, 0, 185, 181, 1, 0, 0, 0, 186, 28, 1, 0, 0, 0, 187, 188, + 5, 101, 0, 0, 188, 189, 5, 120, 0, 0, 189, 190, 5, 105, 0, 0, 190, 191, + 5, 115, 0, 0, 191, 192, 5, 116, 0, 0, 192, 200, 5, 115, 0, 0, 193, 194, + 5, 69, 0, 0, 194, 195, 5, 88, 0, 0, 195, 196, 5, 73, 0, 0, 196, 197, 5, + 83, 0, 0, 197, 198, 5, 84, 0, 0, 198, 200, 5, 83, 0, 0, 199, 187, 1, 0, + 0, 0, 199, 193, 1, 0, 0, 0, 200, 30, 1, 0, 0, 0, 201, 202, 5, 84, 0, 0, + 202, 203, 5, 101, 0, 0, 203, 204, 5, 120, 0, 0, 204, 205, 5, 116, 0, 0, + 205, 206, 5, 77, 0, 0, 206, 207, 5, 97, 0, 0, 207, 208, 5, 116, 0, 0, 208, + 209, 5, 99, 0, 0, 209, 229, 5, 104, 0, 0, 210, 211, 5, 116, 0, 0, 211, + 212, 5, 101, 0, 0, 212, 213, 5, 120, 0, 0, 213, 214, 5, 116, 0, 0, 214, + 215, 5, 109, 0, 0, 215, 216, 5, 97, 0, 0, 216, 217, 5, 116, 0, 0, 217, + 218, 5, 99, 0, 0, 218, 229, 5, 104, 0, 0, 219, 220, 5, 84, 0, 0, 220, 221, + 5, 69, 0, 0, 221, 222, 5, 88, 0, 0, 222, 223, 5, 84, 0, 0, 223, 224, 5, + 77, 0, 0, 224, 225, 5, 65, 0, 0, 225, 226, 5, 84, 0, 0, 226, 227, 5, 67, + 0, 0, 227, 229, 5, 72, 0, 0, 228, 201, 1, 0, 0, 0, 228, 210, 1, 0, 0, 0, + 228, 219, 1, 0, 0, 0, 229, 32, 1, 0, 0, 0, 230, 231, 5, 43, 0, 0, 231, + 34, 1, 0, 0, 0, 232, 233, 5, 45, 0, 0, 233, 36, 1, 0, 0, 0, 234, 235, 5, + 42, 0, 0, 235, 38, 1, 0, 0, 0, 236, 237, 5, 47, 0, 0, 237, 40, 1, 0, 0, + 0, 238, 239, 5, 37, 0, 0, 239, 42, 1, 0, 0, 0, 240, 241, 5, 42, 0, 0, 241, + 242, 5, 42, 0, 0, 242, 44, 1, 0, 0, 0, 243, 244, 5, 60, 0, 0, 244, 245, + 5, 60, 0, 0, 245, 46, 1, 0, 0, 0, 246, 247, 5, 62, 0, 0, 247, 248, 5, 62, + 0, 0, 248, 48, 1, 0, 0, 0, 249, 250, 5, 38, 0, 0, 250, 50, 1, 0, 0, 0, + 251, 252, 5, 124, 0, 0, 252, 52, 1, 0, 0, 0, 253, 254, 5, 94, 0, 0, 254, + 54, 1, 0, 0, 0, 255, 256, 5, 38, 0, 0, 256, 261, 5, 38, 0, 0, 257, 258, + 5, 97, 0, 0, 258, 259, 5, 110, 0, 0, 259, 261, 5, 100, 0, 0, 260, 255, + 1, 0, 0, 0, 260, 257, 1, 0, 0, 0, 261, 56, 1, 0, 0, 0, 262, 263, 5, 124, + 0, 0, 263, 267, 5, 124, 0, 0, 264, 265, 5, 111, 0, 0, 265, 267, 5, 114, + 0, 0, 266, 262, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 267, 58, 1, 0, 0, 0, + 268, 269, 5, 126, 0, 0, 269, 60, 1, 0, 0, 0, 270, 275, 5, 33, 0, 0, 271, + 272, 5, 110, 0, 0, 272, 273, 5, 111, 0, 0, 273, 275, 5, 116, 0, 0, 274, + 270, 1, 0, 0, 0, 274, 271, 1, 0, 0, 0, 275, 62, 1, 0, 0, 0, 276, 277, 5, + 105, 0, 0, 277, 281, 5, 110, 0, 0, 278, 279, 5, 73, 0, 0, 279, 281, 5, + 78, 0, 0, 280, 276, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 281, 64, 1, 0, 0, + 0, 282, 287, 5, 91, 0, 0, 283, 286, 3, 143, 71, 0, 284, 286, 3, 145, 72, + 0, 285, 283, 1, 0, 0, 0, 285, 284, 1, 0, 0, 0, 286, 289, 1, 0, 0, 0, 287, + 285, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 290, 1, 0, 0, 0, 289, 287, + 1, 0, 0, 0, 290, 291, 5, 93, 0, 0, 291, 66, 1, 0, 0, 0, 292, 293, 5, 106, + 0, 0, 293, 294, 5, 115, 0, 0, 294, 295, 5, 111, 0, 0, 295, 296, 5, 110, + 0, 0, 296, 297, 5, 95, 0, 0, 297, 298, 5, 99, 0, 0, 298, 299, 5, 111, 0, + 0, 299, 300, 5, 110, 0, 0, 300, 301, 5, 116, 0, 0, 301, 302, 5, 97, 0, + 0, 302, 303, 5, 105, 0, 0, 303, 304, 5, 110, 0, 0, 304, 319, 5, 115, 0, + 0, 305, 306, 5, 74, 0, 0, 306, 307, 5, 83, 0, 0, 307, 308, 5, 79, 0, 0, + 308, 309, 5, 78, 0, 0, 309, 310, 5, 95, 0, 0, 310, 311, 5, 67, 0, 0, 311, + 312, 5, 79, 0, 0, 312, 313, 5, 78, 0, 0, 313, 314, 5, 84, 0, 0, 314, 315, + 5, 65, 0, 0, 315, 316, 5, 73, 0, 0, 316, 317, 5, 78, 0, 0, 317, 319, 5, + 83, 0, 0, 318, 292, 1, 0, 0, 0, 318, 305, 1, 0, 0, 0, 319, 68, 1, 0, 0, + 0, 320, 321, 5, 106, 0, 0, 321, 322, 5, 115, 0, 0, 322, 323, 5, 111, 0, + 0, 323, 324, 5, 110, 0, 0, 324, 325, 5, 95, 0, 0, 325, 326, 5, 99, 0, 0, + 326, 327, 5, 111, 0, 0, 327, 328, 5, 110, 0, 0, 328, 329, 5, 116, 0, 0, + 329, 330, 5, 97, 0, 0, 330, 331, 5, 105, 0, 0, 331, 332, 5, 110, 0, 0, + 332, 333, 5, 115, 0, 0, 333, 334, 5, 95, 0, 0, 334, 335, 5, 97, 0, 0, 335, + 336, 5, 108, 0, 0, 336, 355, 5, 108, 0, 0, 337, 338, 5, 74, 0, 0, 338, + 339, 5, 83, 0, 0, 339, 340, 5, 79, 0, 0, 340, 341, 5, 78, 0, 0, 341, 342, + 5, 95, 0, 0, 342, 343, 5, 67, 0, 0, 343, 344, 5, 79, 0, 0, 344, 345, 5, + 78, 0, 0, 345, 346, 5, 84, 0, 0, 346, 347, 5, 65, 0, 0, 347, 348, 5, 73, + 0, 0, 348, 349, 5, 78, 0, 0, 349, 350, 5, 83, 0, 0, 350, 351, 5, 95, 0, + 0, 351, 352, 5, 65, 0, 0, 352, 353, 5, 76, 0, 0, 353, 355, 5, 76, 0, 0, + 354, 320, 1, 0, 0, 0, 354, 337, 1, 0, 0, 0, 355, 70, 1, 0, 0, 0, 356, 357, + 5, 106, 0, 0, 357, 358, 5, 115, 0, 0, 358, 359, 5, 111, 0, 0, 359, 360, + 5, 110, 0, 0, 360, 361, 5, 95, 0, 0, 361, 362, 5, 99, 0, 0, 362, 363, 5, + 111, 0, 0, 363, 364, 5, 110, 0, 0, 364, 365, 5, 116, 0, 0, 365, 366, 5, + 97, 0, 0, 366, 367, 5, 105, 0, 0, 367, 368, 5, 110, 0, 0, 368, 369, 5, + 115, 0, 0, 369, 370, 5, 95, 0, 0, 370, 371, 5, 97, 0, 0, 371, 372, 5, 110, + 0, 0, 372, 391, 5, 121, 0, 0, 373, 374, 5, 74, 0, 0, 374, 375, 5, 83, 0, + 0, 375, 376, 5, 79, 0, 0, 376, 377, 5, 78, 0, 0, 377, 378, 5, 95, 0, 0, + 378, 379, 5, 67, 0, 0, 379, 380, 5, 79, 0, 0, 380, 381, 5, 78, 0, 0, 381, + 382, 5, 84, 0, 0, 382, 383, 5, 65, 0, 0, 383, 384, 5, 73, 0, 0, 384, 385, + 5, 78, 0, 0, 385, 386, 5, 83, 0, 0, 386, 387, 5, 95, 0, 0, 387, 388, 5, + 65, 0, 0, 388, 389, 5, 78, 0, 0, 389, 391, 5, 89, 0, 0, 390, 356, 1, 0, + 0, 0, 390, 373, 1, 0, 0, 0, 391, 72, 1, 0, 0, 0, 392, 393, 5, 97, 0, 0, + 393, 394, 5, 114, 0, 0, 394, 395, 5, 114, 0, 0, 395, 396, 5, 97, 0, 0, + 396, 397, 5, 121, 0, 0, 397, 398, 5, 95, 0, 0, 398, 399, 5, 99, 0, 0, 399, + 400, 5, 111, 0, 0, 400, 401, 5, 110, 0, 0, 401, 402, 5, 116, 0, 0, 402, + 403, 5, 97, 0, 0, 403, 404, 5, 105, 0, 0, 404, 405, 5, 110, 0, 0, 405, + 421, 5, 115, 0, 0, 406, 407, 5, 65, 0, 0, 407, 408, 5, 82, 0, 0, 408, 409, + 5, 82, 0, 0, 409, 410, 5, 65, 0, 0, 410, 411, 5, 89, 0, 0, 411, 412, 5, + 95, 0, 0, 412, 413, 5, 67, 0, 0, 413, 414, 5, 79, 0, 0, 414, 415, 5, 78, + 0, 0, 415, 416, 5, 84, 0, 0, 416, 417, 5, 65, 0, 0, 417, 418, 5, 73, 0, + 0, 418, 419, 5, 78, 0, 0, 419, 421, 5, 83, 0, 0, 420, 392, 1, 0, 0, 0, + 420, 406, 1, 0, 0, 0, 421, 74, 1, 0, 0, 0, 422, 423, 5, 97, 0, 0, 423, + 424, 5, 114, 0, 0, 424, 425, 5, 114, 0, 0, 425, 426, 5, 97, 0, 0, 426, + 427, 5, 121, 0, 0, 427, 428, 5, 95, 0, 0, 428, 429, 5, 99, 0, 0, 429, 430, + 5, 111, 0, 0, 430, 431, 5, 110, 0, 0, 431, 432, 5, 116, 0, 0, 432, 433, + 5, 97, 0, 0, 433, 434, 5, 105, 0, 0, 434, 435, 5, 110, 0, 0, 435, 436, + 5, 115, 0, 0, 436, 437, 5, 95, 0, 0, 437, 438, 5, 97, 0, 0, 438, 439, 5, + 108, 0, 0, 439, 459, 5, 108, 0, 0, 440, 441, 5, 65, 0, 0, 441, 442, 5, + 82, 0, 0, 442, 443, 5, 82, 0, 0, 443, 444, 5, 65, 0, 0, 444, 445, 5, 89, + 0, 0, 445, 446, 5, 95, 0, 0, 446, 447, 5, 67, 0, 0, 447, 448, 5, 79, 0, + 0, 448, 449, 5, 78, 0, 0, 449, 450, 5, 84, 0, 0, 450, 451, 5, 65, 0, 0, + 451, 452, 5, 73, 0, 0, 452, 453, 5, 78, 0, 0, 453, 454, 5, 83, 0, 0, 454, + 455, 5, 95, 0, 0, 455, 456, 5, 65, 0, 0, 456, 457, 5, 76, 0, 0, 457, 459, + 5, 76, 0, 0, 458, 422, 1, 0, 0, 0, 458, 440, 1, 0, 0, 0, 459, 76, 1, 0, + 0, 0, 460, 461, 5, 97, 0, 0, 461, 462, 5, 114, 0, 0, 462, 463, 5, 114, + 0, 0, 463, 464, 5, 97, 0, 0, 464, 465, 5, 121, 0, 0, 465, 466, 5, 95, 0, + 0, 466, 467, 5, 99, 0, 0, 467, 468, 5, 111, 0, 0, 468, 469, 5, 110, 0, + 0, 469, 470, 5, 116, 0, 0, 470, 471, 5, 97, 0, 0, 471, 472, 5, 105, 0, + 0, 472, 473, 5, 110, 0, 0, 473, 474, 5, 115, 0, 0, 474, 475, 5, 95, 0, + 0, 475, 476, 5, 97, 0, 0, 476, 477, 5, 110, 0, 0, 477, 497, 5, 121, 0, + 0, 478, 479, 5, 65, 0, 0, 479, 480, 5, 82, 0, 0, 480, 481, 5, 82, 0, 0, + 481, 482, 5, 65, 0, 0, 482, 483, 5, 89, 0, 0, 483, 484, 5, 95, 0, 0, 484, + 485, 5, 67, 0, 0, 485, 486, 5, 79, 0, 0, 486, 487, 5, 78, 0, 0, 487, 488, + 5, 84, 0, 0, 488, 489, 5, 65, 0, 0, 489, 490, 5, 73, 0, 0, 490, 491, 5, + 78, 0, 0, 491, 492, 5, 83, 0, 0, 492, 493, 5, 95, 0, 0, 493, 494, 5, 65, + 0, 0, 494, 495, 5, 78, 0, 0, 495, 497, 5, 89, 0, 0, 496, 460, 1, 0, 0, + 0, 496, 478, 1, 0, 0, 0, 497, 78, 1, 0, 0, 0, 498, 499, 5, 97, 0, 0, 499, + 500, 5, 114, 0, 0, 500, 501, 5, 114, 0, 0, 501, 502, 5, 97, 0, 0, 502, + 503, 5, 121, 0, 0, 503, 504, 5, 95, 0, 0, 504, 505, 5, 108, 0, 0, 505, + 506, 5, 101, 0, 0, 506, 507, 5, 110, 0, 0, 507, 508, 5, 103, 0, 0, 508, + 509, 5, 116, 0, 0, 509, 523, 5, 104, 0, 0, 510, 511, 5, 65, 0, 0, 511, + 512, 5, 82, 0, 0, 512, 513, 5, 82, 0, 0, 513, 514, 5, 65, 0, 0, 514, 515, + 5, 89, 0, 0, 515, 516, 5, 95, 0, 0, 516, 517, 5, 76, 0, 0, 517, 518, 5, + 69, 0, 0, 518, 519, 5, 78, 0, 0, 519, 520, 5, 71, 0, 0, 520, 521, 5, 84, + 0, 0, 521, 523, 5, 72, 0, 0, 522, 498, 1, 0, 0, 0, 522, 510, 1, 0, 0, 0, + 523, 80, 1, 0, 0, 0, 524, 525, 5, 116, 0, 0, 525, 526, 5, 114, 0, 0, 526, + 527, 5, 117, 0, 0, 527, 552, 5, 101, 0, 0, 528, 529, 5, 84, 0, 0, 529, + 530, 5, 114, 0, 0, 530, 531, 5, 117, 0, 0, 531, 552, 5, 101, 0, 0, 532, + 533, 5, 84, 0, 0, 533, 534, 5, 82, 0, 0, 534, 535, 5, 85, 0, 0, 535, 552, + 5, 69, 0, 0, 536, 537, 5, 102, 0, 0, 537, 538, 5, 97, 0, 0, 538, 539, 5, + 108, 0, 0, 539, 540, 5, 115, 0, 0, 540, 552, 5, 101, 0, 0, 541, 542, 5, + 70, 0, 0, 542, 543, 5, 97, 0, 0, 543, 544, 5, 108, 0, 0, 544, 545, 5, 115, + 0, 0, 545, 552, 5, 101, 0, 0, 546, 547, 5, 70, 0, 0, 547, 548, 5, 65, 0, + 0, 548, 549, 5, 76, 0, 0, 549, 550, 5, 83, 0, 0, 550, 552, 5, 69, 0, 0, + 551, 524, 1, 0, 0, 0, 551, 528, 1, 0, 0, 0, 551, 532, 1, 0, 0, 0, 551, + 536, 1, 0, 0, 0, 551, 541, 1, 0, 0, 0, 551, 546, 1, 0, 0, 0, 552, 82, 1, + 0, 0, 0, 553, 558, 3, 109, 54, 0, 554, 558, 3, 111, 55, 0, 555, 558, 3, + 113, 56, 0, 556, 558, 3, 107, 53, 0, 557, 553, 1, 0, 0, 0, 557, 554, 1, + 0, 0, 0, 557, 555, 1, 0, 0, 0, 557, 556, 1, 0, 0, 0, 558, 84, 1, 0, 0, + 0, 559, 562, 3, 125, 62, 0, 560, 562, 3, 127, 63, 0, 561, 559, 1, 0, 0, + 0, 561, 560, 1, 0, 0, 0, 562, 86, 1, 0, 0, 0, 563, 568, 3, 103, 51, 0, + 564, 567, 3, 103, 51, 0, 565, 567, 3, 105, 52, 0, 566, 564, 1, 0, 0, 0, + 566, 565, 1, 0, 0, 0, 567, 570, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 568, + 569, 1, 0, 0, 0, 569, 577, 1, 0, 0, 0, 570, 568, 1, 0, 0, 0, 571, 572, + 5, 36, 0, 0, 572, 573, 5, 109, 0, 0, 573, 574, 5, 101, 0, 0, 574, 575, + 5, 116, 0, 0, 575, 577, 5, 97, 0, 0, 576, 563, 1, 0, 0, 0, 576, 571, 1, + 0, 0, 0, 577, 88, 1, 0, 0, 0, 578, 580, 3, 93, 46, 0, 579, 578, 1, 0, 0, + 0, 579, 580, 1, 0, 0, 0, 580, 591, 1, 0, 0, 0, 581, 583, 5, 34, 0, 0, 582, + 584, 3, 95, 47, 0, 583, 582, 1, 0, 0, 0, 583, 584, 1, 0, 0, 0, 584, 585, + 1, 0, 0, 0, 585, 592, 5, 34, 0, 0, 586, 588, 5, 39, 0, 0, 587, 589, 3, + 97, 48, 0, 588, 587, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 590, 1, 0, + 0, 0, 590, 592, 5, 39, 0, 0, 591, 581, 1, 0, 0, 0, 591, 586, 1, 0, 0, 0, + 592, 90, 1, 0, 0, 0, 593, 601, 3, 87, 43, 0, 594, 597, 5, 91, 0, 0, 595, + 598, 3, 89, 44, 0, 596, 598, 3, 109, 54, 0, 597, 595, 1, 0, 0, 0, 597, + 596, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, 600, 5, 93, 0, 0, 600, 602, + 1, 0, 0, 0, 601, 594, 1, 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 601, 1, 0, + 0, 0, 603, 604, 1, 0, 0, 0, 604, 92, 1, 0, 0, 0, 605, 606, 5, 117, 0, 0, + 606, 609, 5, 56, 0, 0, 607, 609, 7, 0, 0, 0, 608, 605, 1, 0, 0, 0, 608, + 607, 1, 0, 0, 0, 609, 94, 1, 0, 0, 0, 610, 612, 3, 99, 49, 0, 611, 610, + 1, 0, 0, 0, 612, 613, 1, 0, 0, 0, 613, 611, 1, 0, 0, 0, 613, 614, 1, 0, + 0, 0, 614, 96, 1, 0, 0, 0, 615, 617, 3, 101, 50, 0, 616, 615, 1, 0, 0, + 0, 617, 618, 1, 0, 0, 0, 618, 616, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, + 98, 1, 0, 0, 0, 620, 628, 8, 1, 0, 0, 621, 628, 3, 141, 70, 0, 622, 623, + 5, 92, 0, 0, 623, 628, 5, 10, 0, 0, 624, 625, 5, 92, 0, 0, 625, 626, 5, + 13, 0, 0, 626, 628, 5, 10, 0, 0, 627, 620, 1, 0, 0, 0, 627, 621, 1, 0, + 0, 0, 627, 622, 1, 0, 0, 0, 627, 624, 1, 0, 0, 0, 628, 100, 1, 0, 0, 0, + 629, 637, 8, 2, 0, 0, 630, 637, 3, 141, 70, 0, 631, 632, 5, 92, 0, 0, 632, + 637, 5, 10, 0, 0, 633, 634, 5, 92, 0, 0, 634, 635, 5, 13, 0, 0, 635, 637, + 5, 10, 0, 0, 636, 629, 1, 0, 0, 0, 636, 630, 1, 0, 0, 0, 636, 631, 1, 0, + 0, 0, 636, 633, 1, 0, 0, 0, 637, 102, 1, 0, 0, 0, 638, 639, 7, 3, 0, 0, + 639, 104, 1, 0, 0, 0, 640, 641, 7, 4, 0, 0, 641, 106, 1, 0, 0, 0, 642, + 643, 5, 48, 0, 0, 643, 645, 7, 5, 0, 0, 644, 646, 7, 6, 0, 0, 645, 644, + 1, 0, 0, 0, 646, 647, 1, 0, 0, 0, 647, 645, 1, 0, 0, 0, 647, 648, 1, 0, + 0, 0, 648, 108, 1, 0, 0, 0, 649, 653, 3, 115, 57, 0, 650, 652, 3, 105, + 52, 0, 651, 650, 1, 0, 0, 0, 652, 655, 1, 0, 0, 0, 653, 651, 1, 0, 0, 0, + 653, 654, 1, 0, 0, 0, 654, 658, 1, 0, 0, 0, 655, 653, 1, 0, 0, 0, 656, + 658, 5, 48, 0, 0, 657, 649, 1, 0, 0, 0, 657, 656, 1, 0, 0, 0, 658, 110, + 1, 0, 0, 0, 659, 663, 5, 48, 0, 0, 660, 662, 3, 117, 58, 0, 661, 660, 1, + 0, 0, 0, 662, 665, 1, 0, 0, 0, 663, 661, 1, 0, 0, 0, 663, 664, 1, 0, 0, + 0, 664, 112, 1, 0, 0, 0, 665, 663, 1, 0, 0, 0, 666, 667, 5, 48, 0, 0, 667, + 668, 7, 7, 0, 0, 668, 669, 3, 137, 68, 0, 669, 114, 1, 0, 0, 0, 670, 671, + 7, 8, 0, 0, 671, 116, 1, 0, 0, 0, 672, 673, 7, 9, 0, 0, 673, 118, 1, 0, + 0, 0, 674, 675, 7, 10, 0, 0, 675, 120, 1, 0, 0, 0, 676, 677, 3, 119, 59, + 0, 677, 678, 3, 119, 59, 0, 678, 679, 3, 119, 59, 0, 679, 680, 3, 119, + 59, 0, 680, 122, 1, 0, 0, 0, 681, 682, 5, 92, 0, 0, 682, 683, 5, 117, 0, + 0, 683, 684, 1, 0, 0, 0, 684, 692, 3, 121, 60, 0, 685, 686, 5, 92, 0, 0, + 686, 687, 5, 85, 0, 0, 687, 688, 1, 0, 0, 0, 688, 689, 3, 121, 60, 0, 689, + 690, 3, 121, 60, 0, 690, 692, 1, 0, 0, 0, 691, 681, 1, 0, 0, 0, 691, 685, + 1, 0, 0, 0, 692, 124, 1, 0, 0, 0, 693, 695, 3, 129, 64, 0, 694, 696, 3, + 131, 65, 0, 695, 694, 1, 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 701, 1, 0, + 0, 0, 697, 698, 3, 133, 66, 0, 698, 699, 3, 131, 65, 0, 699, 701, 1, 0, + 0, 0, 700, 693, 1, 0, 0, 0, 700, 697, 1, 0, 0, 0, 701, 126, 1, 0, 0, 0, + 702, 703, 5, 48, 0, 0, 703, 706, 7, 7, 0, 0, 704, 707, 3, 135, 67, 0, 705, + 707, 3, 137, 68, 0, 706, 704, 1, 0, 0, 0, 706, 705, 1, 0, 0, 0, 707, 708, + 1, 0, 0, 0, 708, 709, 3, 139, 69, 0, 709, 128, 1, 0, 0, 0, 710, 712, 3, + 133, 66, 0, 711, 710, 1, 0, 0, 0, 711, 712, 1, 0, 0, 0, 712, 713, 1, 0, + 0, 0, 713, 714, 5, 46, 0, 0, 714, 719, 3, 133, 66, 0, 715, 716, 3, 133, + 66, 0, 716, 717, 5, 46, 0, 0, 717, 719, 1, 0, 0, 0, 718, 711, 1, 0, 0, + 0, 718, 715, 1, 0, 0, 0, 719, 130, 1, 0, 0, 0, 720, 722, 7, 11, 0, 0, 721, + 723, 7, 12, 0, 0, 722, 721, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 724, + 1, 0, 0, 0, 724, 725, 3, 133, 66, 0, 725, 132, 1, 0, 0, 0, 726, 728, 3, + 105, 52, 0, 727, 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 727, 1, 0, + 0, 0, 729, 730, 1, 0, 0, 0, 730, 134, 1, 0, 0, 0, 731, 733, 3, 137, 68, + 0, 732, 731, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 733, 734, 1, 0, 0, 0, 734, + 735, 5, 46, 0, 0, 735, 740, 3, 137, 68, 0, 736, 737, 3, 137, 68, 0, 737, + 738, 5, 46, 0, 0, 738, 740, 1, 0, 0, 0, 739, 732, 1, 0, 0, 0, 739, 736, + 1, 0, 0, 0, 740, 136, 1, 0, 0, 0, 741, 743, 3, 119, 59, 0, 742, 741, 1, + 0, 0, 0, 743, 744, 1, 0, 0, 0, 744, 742, 1, 0, 0, 0, 744, 745, 1, 0, 0, + 0, 745, 138, 1, 0, 0, 0, 746, 748, 7, 13, 0, 0, 747, 749, 7, 12, 0, 0, + 748, 747, 1, 0, 0, 0, 748, 749, 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 750, + 751, 3, 133, 66, 0, 751, 140, 1, 0, 0, 0, 752, 753, 5, 92, 0, 0, 753, 768, + 7, 14, 0, 0, 754, 755, 5, 92, 0, 0, 755, 757, 3, 117, 58, 0, 756, 758, + 3, 117, 58, 0, 757, 756, 1, 0, 0, 0, 757, 758, 1, 0, 0, 0, 758, 760, 1, + 0, 0, 0, 759, 761, 3, 117, 58, 0, 760, 759, 1, 0, 0, 0, 760, 761, 1, 0, + 0, 0, 761, 768, 1, 0, 0, 0, 762, 763, 5, 92, 0, 0, 763, 764, 5, 120, 0, + 0, 764, 765, 1, 0, 0, 0, 765, 768, 3, 137, 68, 0, 766, 768, 3, 123, 61, + 0, 767, 752, 1, 0, 0, 0, 767, 754, 1, 0, 0, 0, 767, 762, 1, 0, 0, 0, 767, + 766, 1, 0, 0, 0, 768, 142, 1, 0, 0, 0, 769, 771, 7, 15, 0, 0, 770, 769, + 1, 0, 0, 0, 771, 772, 1, 0, 0, 0, 772, 770, 1, 0, 0, 0, 772, 773, 1, 0, + 0, 0, 773, 774, 1, 0, 0, 0, 774, 775, 6, 71, 0, 0, 775, 144, 1, 0, 0, 0, + 776, 778, 5, 13, 0, 0, 777, 779, 5, 10, 0, 0, 778, 777, 1, 0, 0, 0, 778, + 779, 1, 0, 0, 0, 779, 782, 1, 0, 0, 0, 780, 782, 5, 10, 0, 0, 781, 776, + 1, 0, 0, 0, 781, 780, 1, 0, 0, 0, 782, 783, 1, 0, 0, 0, 783, 784, 6, 72, + 0, 0, 784, 146, 1, 0, 0, 0, 56, 0, 185, 199, 228, 260, 266, 274, 280, 285, + 287, 318, 354, 390, 420, 458, 496, 522, 551, 557, 561, 566, 568, 576, 579, + 583, 588, 591, 597, 603, 608, 613, 618, 627, 636, 647, 653, 657, 663, 691, + 695, 700, 706, 711, 718, 722, 729, 732, 739, 744, 748, 757, 760, 767, 772, + 778, 781, 1, 6, 0, 0, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -470,45 +474,47 @@ const ( PlanLexerT__2 = 3 PlanLexerT__3 = 4 PlanLexerT__4 = 5 - PlanLexerLT = 6 - PlanLexerLE = 7 - PlanLexerGT = 8 - PlanLexerGE = 9 - PlanLexerEQ = 10 - PlanLexerNE = 11 - PlanLexerLIKE = 12 - PlanLexerEXISTS = 13 - PlanLexerTEXTMATCH = 14 - PlanLexerADD = 15 - PlanLexerSUB = 16 - PlanLexerMUL = 17 - PlanLexerDIV = 18 - PlanLexerMOD = 19 - PlanLexerPOW = 20 - PlanLexerSHL = 21 - PlanLexerSHR = 22 - PlanLexerBAND = 23 - PlanLexerBOR = 24 - PlanLexerBXOR = 25 - PlanLexerAND = 26 - PlanLexerOR = 27 - PlanLexerBNOT = 28 - PlanLexerNOT = 29 - PlanLexerIN = 30 - PlanLexerEmptyArray = 31 - PlanLexerJSONContains = 32 - PlanLexerJSONContainsAll = 33 - PlanLexerJSONContainsAny = 34 - PlanLexerArrayContains = 35 - PlanLexerArrayContainsAll = 36 - PlanLexerArrayContainsAny = 37 - PlanLexerArrayLength = 38 - PlanLexerBooleanConstant = 39 - PlanLexerIntegerConstant = 40 - PlanLexerFloatingConstant = 41 - PlanLexerIdentifier = 42 - PlanLexerStringLiteral = 43 - PlanLexerJSONIdentifier = 44 - PlanLexerWhitespace = 45 - PlanLexerNewline = 46 + PlanLexerLBRACE = 6 + PlanLexerRBRACE = 7 + PlanLexerLT = 8 + PlanLexerLE = 9 + PlanLexerGT = 10 + PlanLexerGE = 11 + PlanLexerEQ = 12 + PlanLexerNE = 13 + PlanLexerLIKE = 14 + PlanLexerEXISTS = 15 + PlanLexerTEXTMATCH = 16 + PlanLexerADD = 17 + PlanLexerSUB = 18 + PlanLexerMUL = 19 + PlanLexerDIV = 20 + PlanLexerMOD = 21 + PlanLexerPOW = 22 + PlanLexerSHL = 23 + PlanLexerSHR = 24 + PlanLexerBAND = 25 + PlanLexerBOR = 26 + PlanLexerBXOR = 27 + PlanLexerAND = 28 + PlanLexerOR = 29 + PlanLexerBNOT = 30 + PlanLexerNOT = 31 + PlanLexerIN = 32 + PlanLexerEmptyArray = 33 + PlanLexerJSONContains = 34 + PlanLexerJSONContainsAll = 35 + PlanLexerJSONContainsAny = 36 + PlanLexerArrayContains = 37 + PlanLexerArrayContainsAll = 38 + PlanLexerArrayContainsAny = 39 + PlanLexerArrayLength = 40 + PlanLexerBooleanConstant = 41 + PlanLexerIntegerConstant = 42 + PlanLexerFloatingConstant = 43 + PlanLexerIdentifier = 44 + PlanLexerStringLiteral = 45 + PlanLexerJSONIdentifier = 46 + PlanLexerWhitespace = 47 + PlanLexerNewline = 48 ) diff --git a/internal/parser/planparserv2/generated/plan_parser.go b/internal/parser/planparserv2/generated/plan_parser.go index e5dc91fda218a..e5371eca66574 100644 --- a/internal/parser/planparserv2/generated/plan_parser.go +++ b/internal/parser/planparserv2/generated/plan_parser.go @@ -32,83 +32,85 @@ var PlanParserStaticData struct { func planParserInit() { staticData := &PlanParserStaticData staticData.LiteralNames = []string{ - "", "'('", "')'", "'['", "','", "']'", "'<'", "'<='", "'>'", "'>='", - "'=='", "'!='", "", "", "", "'+'", "'-'", "'*'", "'/'", "'%'", "'**'", - "'<<'", "'>>'", "'&'", "'|'", "'^'", "", "", "'~'", + "", "'('", "')'", "'['", "','", "']'", "'{'", "'}'", "'<'", "'<='", + "'>'", "'>='", "'=='", "'!='", "", "", "", "'+'", "'-'", "'*'", "'/'", + "'%'", "'**'", "'<<'", "'>>'", "'&'", "'|'", "'^'", "", "", "'~'", } staticData.SymbolicNames = []string{ - "", "", "", "", "", "", "LT", "LE", "GT", "GE", "EQ", "NE", "LIKE", - "EXISTS", "TEXTMATCH", "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "SHL", - "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", "NOT", "IN", "EmptyArray", - "JSONContains", "JSONContainsAll", "JSONContainsAny", "ArrayContains", - "ArrayContainsAll", "ArrayContainsAny", "ArrayLength", "BooleanConstant", - "IntegerConstant", "FloatingConstant", "Identifier", "StringLiteral", - "JSONIdentifier", "Whitespace", "Newline", + "", "", "", "", "", "", "LBRACE", "RBRACE", "LT", "LE", "GT", "GE", + "EQ", "NE", "LIKE", "EXISTS", "TEXTMATCH", "ADD", "SUB", "MUL", "DIV", + "MOD", "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "BNOT", + "NOT", "IN", "EmptyArray", "JSONContains", "JSONContainsAll", "JSONContainsAny", + "ArrayContains", "ArrayContainsAll", "ArrayContainsAny", "ArrayLength", + "BooleanConstant", "IntegerConstant", "FloatingConstant", "Identifier", + "StringLiteral", "JSONIdentifier", "Whitespace", "Newline", } staticData.RuleNames = []string{ "expr", } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ - 4, 1, 46, 123, 2, 0, 7, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 18, 8, 0, 10, 0, 12, - 0, 21, 9, 0, 1, 0, 3, 0, 24, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 64, 8, 0, 1, 0, 1, + 4, 1, 48, 126, 2, 0, 7, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 21, + 8, 0, 10, 0, 12, 0, 24, 9, 0, 1, 0, 3, 0, 27, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, - 0, 3, 0, 80, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, - 1, 0, 1, 0, 1, 0, 5, 0, 118, 8, 0, 10, 0, 12, 0, 121, 9, 0, 1, 0, 0, 1, - 0, 1, 0, 0, 12, 2, 0, 15, 16, 28, 29, 2, 0, 32, 32, 35, 35, 2, 0, 33, 33, - 36, 36, 2, 0, 34, 34, 37, 37, 2, 0, 42, 42, 44, 44, 1, 0, 17, 19, 1, 0, - 15, 16, 1, 0, 21, 22, 1, 0, 6, 7, 1, 0, 8, 9, 1, 0, 6, 9, 1, 0, 10, 11, - 154, 0, 63, 1, 0, 0, 0, 2, 3, 6, 0, -1, 0, 3, 64, 5, 40, 0, 0, 4, 64, 5, - 41, 0, 0, 5, 64, 5, 39, 0, 0, 6, 64, 5, 43, 0, 0, 7, 64, 5, 42, 0, 0, 8, - 64, 5, 44, 0, 0, 9, 10, 5, 1, 0, 0, 10, 11, 3, 0, 0, 0, 11, 12, 5, 2, 0, - 0, 12, 64, 1, 0, 0, 0, 13, 14, 5, 3, 0, 0, 14, 19, 3, 0, 0, 0, 15, 16, - 5, 4, 0, 0, 16, 18, 3, 0, 0, 0, 17, 15, 1, 0, 0, 0, 18, 21, 1, 0, 0, 0, - 19, 17, 1, 0, 0, 0, 19, 20, 1, 0, 0, 0, 20, 23, 1, 0, 0, 0, 21, 19, 1, - 0, 0, 0, 22, 24, 5, 4, 0, 0, 23, 22, 1, 0, 0, 0, 23, 24, 1, 0, 0, 0, 24, - 25, 1, 0, 0, 0, 25, 26, 5, 5, 0, 0, 26, 64, 1, 0, 0, 0, 27, 64, 5, 31, - 0, 0, 28, 29, 5, 14, 0, 0, 29, 30, 5, 1, 0, 0, 30, 31, 5, 42, 0, 0, 31, - 32, 5, 4, 0, 0, 32, 33, 5, 43, 0, 0, 33, 64, 5, 2, 0, 0, 34, 35, 7, 0, - 0, 0, 35, 64, 3, 0, 0, 19, 36, 37, 7, 1, 0, 0, 37, 38, 5, 1, 0, 0, 38, - 39, 3, 0, 0, 0, 39, 40, 5, 4, 0, 0, 40, 41, 3, 0, 0, 0, 41, 42, 5, 2, 0, - 0, 42, 64, 1, 0, 0, 0, 43, 44, 7, 2, 0, 0, 44, 45, 5, 1, 0, 0, 45, 46, - 3, 0, 0, 0, 46, 47, 5, 4, 0, 0, 47, 48, 3, 0, 0, 0, 48, 49, 5, 2, 0, 0, - 49, 64, 1, 0, 0, 0, 50, 51, 7, 3, 0, 0, 51, 52, 5, 1, 0, 0, 52, 53, 3, - 0, 0, 0, 53, 54, 5, 4, 0, 0, 54, 55, 3, 0, 0, 0, 55, 56, 5, 2, 0, 0, 56, - 64, 1, 0, 0, 0, 57, 58, 5, 38, 0, 0, 58, 59, 5, 1, 0, 0, 59, 60, 7, 4, - 0, 0, 60, 64, 5, 2, 0, 0, 61, 62, 5, 13, 0, 0, 62, 64, 3, 0, 0, 1, 63, - 2, 1, 0, 0, 0, 63, 4, 1, 0, 0, 0, 63, 5, 1, 0, 0, 0, 63, 6, 1, 0, 0, 0, - 63, 7, 1, 0, 0, 0, 63, 8, 1, 0, 0, 0, 63, 9, 1, 0, 0, 0, 63, 13, 1, 0, - 0, 0, 63, 27, 1, 0, 0, 0, 63, 28, 1, 0, 0, 0, 63, 34, 1, 0, 0, 0, 63, 36, - 1, 0, 0, 0, 63, 43, 1, 0, 0, 0, 63, 50, 1, 0, 0, 0, 63, 57, 1, 0, 0, 0, - 63, 61, 1, 0, 0, 0, 64, 119, 1, 0, 0, 0, 65, 66, 10, 20, 0, 0, 66, 67, - 5, 20, 0, 0, 67, 118, 3, 0, 0, 21, 68, 69, 10, 18, 0, 0, 69, 70, 7, 5, - 0, 0, 70, 118, 3, 0, 0, 19, 71, 72, 10, 17, 0, 0, 72, 73, 7, 6, 0, 0, 73, - 118, 3, 0, 0, 18, 74, 75, 10, 16, 0, 0, 75, 76, 7, 7, 0, 0, 76, 118, 3, - 0, 0, 17, 77, 79, 10, 15, 0, 0, 78, 80, 5, 29, 0, 0, 79, 78, 1, 0, 0, 0, - 79, 80, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 82, 5, 30, 0, 0, 82, 118, 3, - 0, 0, 16, 83, 84, 10, 10, 0, 0, 84, 85, 7, 8, 0, 0, 85, 86, 7, 4, 0, 0, - 86, 87, 7, 8, 0, 0, 87, 118, 3, 0, 0, 11, 88, 89, 10, 9, 0, 0, 89, 90, - 7, 9, 0, 0, 90, 91, 7, 4, 0, 0, 91, 92, 7, 9, 0, 0, 92, 118, 3, 0, 0, 10, - 93, 94, 10, 8, 0, 0, 94, 95, 7, 10, 0, 0, 95, 118, 3, 0, 0, 9, 96, 97, - 10, 7, 0, 0, 97, 98, 7, 11, 0, 0, 98, 118, 3, 0, 0, 8, 99, 100, 10, 6, - 0, 0, 100, 101, 5, 23, 0, 0, 101, 118, 3, 0, 0, 7, 102, 103, 10, 5, 0, - 0, 103, 104, 5, 25, 0, 0, 104, 118, 3, 0, 0, 6, 105, 106, 10, 4, 0, 0, - 106, 107, 5, 24, 0, 0, 107, 118, 3, 0, 0, 5, 108, 109, 10, 3, 0, 0, 109, - 110, 5, 26, 0, 0, 110, 118, 3, 0, 0, 4, 111, 112, 10, 2, 0, 0, 112, 113, - 5, 27, 0, 0, 113, 118, 3, 0, 0, 3, 114, 115, 10, 22, 0, 0, 115, 116, 5, - 12, 0, 0, 116, 118, 5, 43, 0, 0, 117, 65, 1, 0, 0, 0, 117, 68, 1, 0, 0, - 0, 117, 71, 1, 0, 0, 0, 117, 74, 1, 0, 0, 0, 117, 77, 1, 0, 0, 0, 117, - 83, 1, 0, 0, 0, 117, 88, 1, 0, 0, 0, 117, 93, 1, 0, 0, 0, 117, 96, 1, 0, - 0, 0, 117, 99, 1, 0, 0, 0, 117, 102, 1, 0, 0, 0, 117, 105, 1, 0, 0, 0, - 117, 108, 1, 0, 0, 0, 117, 111, 1, 0, 0, 0, 117, 114, 1, 0, 0, 0, 118, - 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 1, 1, - 0, 0, 0, 121, 119, 1, 0, 0, 0, 6, 19, 23, 63, 79, 117, 119, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 67, + 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 3, 0, 83, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 121, 8, 0, 10, 0, 12, 0, 124, 9, + 0, 1, 0, 0, 1, 0, 1, 0, 0, 12, 2, 0, 17, 18, 30, 31, 2, 0, 34, 34, 37, + 37, 2, 0, 35, 35, 38, 38, 2, 0, 36, 36, 39, 39, 2, 0, 44, 44, 46, 46, 1, + 0, 19, 21, 1, 0, 17, 18, 1, 0, 23, 24, 1, 0, 8, 9, 1, 0, 10, 11, 1, 0, + 8, 11, 1, 0, 12, 13, 158, 0, 66, 1, 0, 0, 0, 2, 3, 6, 0, -1, 0, 3, 67, + 5, 42, 0, 0, 4, 67, 5, 43, 0, 0, 5, 67, 5, 41, 0, 0, 6, 67, 5, 45, 0, 0, + 7, 67, 5, 44, 0, 0, 8, 67, 5, 46, 0, 0, 9, 10, 5, 6, 0, 0, 10, 11, 5, 44, + 0, 0, 11, 67, 5, 7, 0, 0, 12, 13, 5, 1, 0, 0, 13, 14, 3, 0, 0, 0, 14, 15, + 5, 2, 0, 0, 15, 67, 1, 0, 0, 0, 16, 17, 5, 3, 0, 0, 17, 22, 3, 0, 0, 0, + 18, 19, 5, 4, 0, 0, 19, 21, 3, 0, 0, 0, 20, 18, 1, 0, 0, 0, 21, 24, 1, + 0, 0, 0, 22, 20, 1, 0, 0, 0, 22, 23, 1, 0, 0, 0, 23, 26, 1, 0, 0, 0, 24, + 22, 1, 0, 0, 0, 25, 27, 5, 4, 0, 0, 26, 25, 1, 0, 0, 0, 26, 27, 1, 0, 0, + 0, 27, 28, 1, 0, 0, 0, 28, 29, 5, 5, 0, 0, 29, 67, 1, 0, 0, 0, 30, 67, + 5, 33, 0, 0, 31, 32, 5, 16, 0, 0, 32, 33, 5, 1, 0, 0, 33, 34, 5, 44, 0, + 0, 34, 35, 5, 4, 0, 0, 35, 36, 5, 45, 0, 0, 36, 67, 5, 2, 0, 0, 37, 38, + 7, 0, 0, 0, 38, 67, 3, 0, 0, 19, 39, 40, 7, 1, 0, 0, 40, 41, 5, 1, 0, 0, + 41, 42, 3, 0, 0, 0, 42, 43, 5, 4, 0, 0, 43, 44, 3, 0, 0, 0, 44, 45, 5, + 2, 0, 0, 45, 67, 1, 0, 0, 0, 46, 47, 7, 2, 0, 0, 47, 48, 5, 1, 0, 0, 48, + 49, 3, 0, 0, 0, 49, 50, 5, 4, 0, 0, 50, 51, 3, 0, 0, 0, 51, 52, 5, 2, 0, + 0, 52, 67, 1, 0, 0, 0, 53, 54, 7, 3, 0, 0, 54, 55, 5, 1, 0, 0, 55, 56, + 3, 0, 0, 0, 56, 57, 5, 4, 0, 0, 57, 58, 3, 0, 0, 0, 58, 59, 5, 2, 0, 0, + 59, 67, 1, 0, 0, 0, 60, 61, 5, 40, 0, 0, 61, 62, 5, 1, 0, 0, 62, 63, 7, + 4, 0, 0, 63, 67, 5, 2, 0, 0, 64, 65, 5, 15, 0, 0, 65, 67, 3, 0, 0, 1, 66, + 2, 1, 0, 0, 0, 66, 4, 1, 0, 0, 0, 66, 5, 1, 0, 0, 0, 66, 6, 1, 0, 0, 0, + 66, 7, 1, 0, 0, 0, 66, 8, 1, 0, 0, 0, 66, 9, 1, 0, 0, 0, 66, 12, 1, 0, + 0, 0, 66, 16, 1, 0, 0, 0, 66, 30, 1, 0, 0, 0, 66, 31, 1, 0, 0, 0, 66, 37, + 1, 0, 0, 0, 66, 39, 1, 0, 0, 0, 66, 46, 1, 0, 0, 0, 66, 53, 1, 0, 0, 0, + 66, 60, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 67, 122, 1, 0, 0, 0, 68, 69, 10, + 20, 0, 0, 69, 70, 5, 22, 0, 0, 70, 121, 3, 0, 0, 21, 71, 72, 10, 18, 0, + 0, 72, 73, 7, 5, 0, 0, 73, 121, 3, 0, 0, 19, 74, 75, 10, 17, 0, 0, 75, + 76, 7, 6, 0, 0, 76, 121, 3, 0, 0, 18, 77, 78, 10, 16, 0, 0, 78, 79, 7, + 7, 0, 0, 79, 121, 3, 0, 0, 17, 80, 82, 10, 15, 0, 0, 81, 83, 5, 31, 0, + 0, 82, 81, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 85, + 5, 32, 0, 0, 85, 121, 3, 0, 0, 16, 86, 87, 10, 10, 0, 0, 87, 88, 7, 8, + 0, 0, 88, 89, 7, 4, 0, 0, 89, 90, 7, 8, 0, 0, 90, 121, 3, 0, 0, 11, 91, + 92, 10, 9, 0, 0, 92, 93, 7, 9, 0, 0, 93, 94, 7, 4, 0, 0, 94, 95, 7, 9, + 0, 0, 95, 121, 3, 0, 0, 10, 96, 97, 10, 8, 0, 0, 97, 98, 7, 10, 0, 0, 98, + 121, 3, 0, 0, 9, 99, 100, 10, 7, 0, 0, 100, 101, 7, 11, 0, 0, 101, 121, + 3, 0, 0, 8, 102, 103, 10, 6, 0, 0, 103, 104, 5, 25, 0, 0, 104, 121, 3, + 0, 0, 7, 105, 106, 10, 5, 0, 0, 106, 107, 5, 27, 0, 0, 107, 121, 3, 0, + 0, 6, 108, 109, 10, 4, 0, 0, 109, 110, 5, 26, 0, 0, 110, 121, 3, 0, 0, + 5, 111, 112, 10, 3, 0, 0, 112, 113, 5, 28, 0, 0, 113, 121, 3, 0, 0, 4, + 114, 115, 10, 2, 0, 0, 115, 116, 5, 29, 0, 0, 116, 121, 3, 0, 0, 3, 117, + 118, 10, 22, 0, 0, 118, 119, 5, 14, 0, 0, 119, 121, 5, 45, 0, 0, 120, 68, + 1, 0, 0, 0, 120, 71, 1, 0, 0, 0, 120, 74, 1, 0, 0, 0, 120, 77, 1, 0, 0, + 0, 120, 80, 1, 0, 0, 0, 120, 86, 1, 0, 0, 0, 120, 91, 1, 0, 0, 0, 120, + 96, 1, 0, 0, 0, 120, 99, 1, 0, 0, 0, 120, 102, 1, 0, 0, 0, 120, 105, 1, + 0, 0, 0, 120, 108, 1, 0, 0, 0, 120, 111, 1, 0, 0, 0, 120, 114, 1, 0, 0, + 0, 120, 117, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, + 123, 1, 0, 0, 0, 123, 1, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 6, 22, 26, 66, + 82, 120, 122, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) @@ -152,47 +154,49 @@ const ( PlanParserT__2 = 3 PlanParserT__3 = 4 PlanParserT__4 = 5 - PlanParserLT = 6 - PlanParserLE = 7 - PlanParserGT = 8 - PlanParserGE = 9 - PlanParserEQ = 10 - PlanParserNE = 11 - PlanParserLIKE = 12 - PlanParserEXISTS = 13 - PlanParserTEXTMATCH = 14 - PlanParserADD = 15 - PlanParserSUB = 16 - PlanParserMUL = 17 - PlanParserDIV = 18 - PlanParserMOD = 19 - PlanParserPOW = 20 - PlanParserSHL = 21 - PlanParserSHR = 22 - PlanParserBAND = 23 - PlanParserBOR = 24 - PlanParserBXOR = 25 - PlanParserAND = 26 - PlanParserOR = 27 - PlanParserBNOT = 28 - PlanParserNOT = 29 - PlanParserIN = 30 - PlanParserEmptyArray = 31 - PlanParserJSONContains = 32 - PlanParserJSONContainsAll = 33 - PlanParserJSONContainsAny = 34 - PlanParserArrayContains = 35 - PlanParserArrayContainsAll = 36 - PlanParserArrayContainsAny = 37 - PlanParserArrayLength = 38 - PlanParserBooleanConstant = 39 - PlanParserIntegerConstant = 40 - PlanParserFloatingConstant = 41 - PlanParserIdentifier = 42 - PlanParserStringLiteral = 43 - PlanParserJSONIdentifier = 44 - PlanParserWhitespace = 45 - PlanParserNewline = 46 + PlanParserLBRACE = 6 + PlanParserRBRACE = 7 + PlanParserLT = 8 + PlanParserLE = 9 + PlanParserGT = 10 + PlanParserGE = 11 + PlanParserEQ = 12 + PlanParserNE = 13 + PlanParserLIKE = 14 + PlanParserEXISTS = 15 + PlanParserTEXTMATCH = 16 + PlanParserADD = 17 + PlanParserSUB = 18 + PlanParserMUL = 19 + PlanParserDIV = 20 + PlanParserMOD = 21 + PlanParserPOW = 22 + PlanParserSHL = 23 + PlanParserSHR = 24 + PlanParserBAND = 25 + PlanParserBOR = 26 + PlanParserBXOR = 27 + PlanParserAND = 28 + PlanParserOR = 29 + PlanParserBNOT = 30 + PlanParserNOT = 31 + PlanParserIN = 32 + PlanParserEmptyArray = 33 + PlanParserJSONContains = 34 + PlanParserJSONContainsAll = 35 + PlanParserJSONContainsAny = 36 + PlanParserArrayContains = 37 + PlanParserArrayContainsAll = 38 + PlanParserArrayContainsAny = 39 + PlanParserArrayLength = 40 + PlanParserBooleanConstant = 41 + PlanParserIntegerConstant = 42 + PlanParserFloatingConstant = 43 + PlanParserIdentifier = 44 + PlanParserStringLiteral = 45 + PlanParserJSONIdentifier = 46 + PlanParserWhitespace = 47 + PlanParserNewline = 48 ) // PlanParserRULE_expr is the PlanParser rule. @@ -252,6 +256,46 @@ func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s return antlr.TreesStringTree(s, ruleNames, recog) } +type PlaceholderContext struct { + ExprContext +} + +func NewPlaceholderContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PlaceholderContext { + var p = new(PlaceholderContext) + + InitEmptyExprContext(&p.ExprContext) + p.parser = parser + p.CopyAll(ctx.(*ExprContext)) + + return p +} + +func (s *PlaceholderContext) GetRuleContext() antlr.RuleContext { + return s +} + +func (s *PlaceholderContext) LBRACE() antlr.TerminalNode { + return s.GetToken(PlanParserLBRACE, 0) +} + +func (s *PlaceholderContext) Identifier() antlr.TerminalNode { + return s.GetToken(PlanParserIdentifier, 0) +} + +func (s *PlaceholderContext) RBRACE() antlr.TerminalNode { + return s.GetToken(PlanParserRBRACE, 0) +} + +func (s *PlaceholderContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { + switch t := visitor.(type) { + case PlanVisitor: + return t.VisitPlaceholder(s) + + default: + return t.VisitChildren(s) + } +} + type JSONIdentifierContext struct { ExprContext } @@ -2231,7 +2275,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { var _alt int p.EnterOuterAlt(localctx, 1) - p.SetState(63) + p.SetState(66) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2317,12 +2361,41 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } + case PlanParserLBRACE: + localctx = NewPlaceholderContext(p, localctx) + p.SetParserRuleContext(localctx) + _prevctx = localctx + { + p.SetState(9) + p.Match(PlanParserLBRACE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(10) + p.Match(PlanParserIdentifier) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + { + p.SetState(11) + p.Match(PlanParserRBRACE) + if p.HasError() { + // Recognition error - abort rule + goto errorExit + } + } + case PlanParserT__0: localctx = NewParensContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(9) + p.SetState(12) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2330,11 +2403,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(10) + p.SetState(13) p.expr(0) } { - p.SetState(11) + p.SetState(14) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2347,7 +2420,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(13) + p.SetState(16) p.Match(PlanParserT__2) if p.HasError() { // Recognition error - abort rule @@ -2355,10 +2428,10 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(14) + p.SetState(17) p.expr(0) } - p.SetState(19) + p.SetState(22) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2370,7 +2443,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { if _alt == 1 { { - p.SetState(15) + p.SetState(18) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2378,12 +2451,12 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(16) + p.SetState(19) p.expr(0) } } - p.SetState(21) + p.SetState(24) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2393,7 +2466,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { goto errorExit } } - p.SetState(23) + p.SetState(26) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2402,7 +2475,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { if _la == PlanParserT__3 { { - p.SetState(22) + p.SetState(25) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2412,7 +2485,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } { - p.SetState(25) + p.SetState(28) p.Match(PlanParserT__4) if p.HasError() { // Recognition error - abort rule @@ -2425,7 +2498,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(27) + p.SetState(30) p.Match(PlanParserEmptyArray) if p.HasError() { // Recognition error - abort rule @@ -2438,7 +2511,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(28) + p.SetState(31) p.Match(PlanParserTEXTMATCH) if p.HasError() { // Recognition error - abort rule @@ -2446,7 +2519,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(29) + p.SetState(32) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2454,7 +2527,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(30) + p.SetState(33) p.Match(PlanParserIdentifier) if p.HasError() { // Recognition error - abort rule @@ -2462,7 +2535,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(31) + p.SetState(34) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2470,7 +2543,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(32) + p.SetState(35) p.Match(PlanParserStringLiteral) if p.HasError() { // Recognition error - abort rule @@ -2478,7 +2551,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(33) + p.SetState(36) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2491,7 +2564,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(34) + p.SetState(37) var _lt = p.GetTokenStream().LT(1) @@ -2499,7 +2572,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&805404672) != 0) { + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&3221618688) != 0) { var _ri = p.GetErrorHandler().RecoverInline(p) localctx.(*UnaryContext).op = _ri @@ -2509,7 +2582,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(35) + p.SetState(38) p.expr(19) } @@ -2518,7 +2591,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(36) + p.SetState(39) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserJSONContains || _la == PlanParserArrayContains) { @@ -2529,7 +2602,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(37) + p.SetState(40) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2537,11 +2610,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(38) + p.SetState(41) p.expr(0) } { - p.SetState(39) + p.SetState(42) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2549,11 +2622,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(40) + p.SetState(43) p.expr(0) } { - p.SetState(41) + p.SetState(44) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2566,7 +2639,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(43) + p.SetState(46) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserJSONContainsAll || _la == PlanParserArrayContainsAll) { @@ -2577,7 +2650,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(44) + p.SetState(47) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2585,11 +2658,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(45) + p.SetState(48) p.expr(0) } { - p.SetState(46) + p.SetState(49) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2597,11 +2670,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(47) + p.SetState(50) p.expr(0) } { - p.SetState(48) + p.SetState(51) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2614,7 +2687,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(50) + p.SetState(53) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserJSONContainsAny || _la == PlanParserArrayContainsAny) { @@ -2625,7 +2698,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(51) + p.SetState(54) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2633,11 +2706,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(52) + p.SetState(55) p.expr(0) } { - p.SetState(53) + p.SetState(56) p.Match(PlanParserT__3) if p.HasError() { // Recognition error - abort rule @@ -2645,11 +2718,11 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(54) + p.SetState(57) p.expr(0) } { - p.SetState(55) + p.SetState(58) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2662,7 +2735,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(57) + p.SetState(60) p.Match(PlanParserArrayLength) if p.HasError() { // Recognition error - abort rule @@ -2670,7 +2743,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(58) + p.SetState(61) p.Match(PlanParserT__0) if p.HasError() { // Recognition error - abort rule @@ -2678,7 +2751,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(59) + p.SetState(62) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -2689,7 +2762,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(60) + p.SetState(63) p.Match(PlanParserT__1) if p.HasError() { // Recognition error - abort rule @@ -2702,7 +2775,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.SetParserRuleContext(localctx) _prevctx = localctx { - p.SetState(61) + p.SetState(64) p.Match(PlanParserEXISTS) if p.HasError() { // Recognition error - abort rule @@ -2710,7 +2783,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(62) + p.SetState(65) p.expr(1) } @@ -2719,7 +2792,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) - p.SetState(119) + p.SetState(122) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2734,7 +2807,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { p.TriggerExitRuleEvent() } _prevctx = localctx - p.SetState(117) + p.SetState(120) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2744,14 +2817,14 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { case 1: localctx = NewPowerContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(65) + p.SetState(68) if !(p.Precpred(p.GetParserRuleContext(), 20)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", "")) goto errorExit } { - p.SetState(66) + p.SetState(69) p.Match(PlanParserPOW) if p.HasError() { // Recognition error - abort rule @@ -2759,21 +2832,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(67) + p.SetState(70) p.expr(21) } case 2: localctx = NewMulDivModContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(68) + p.SetState(71) if !(p.Precpred(p.GetParserRuleContext(), 18)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", "")) goto errorExit } { - p.SetState(69) + p.SetState(72) var _lt = p.GetTokenStream().LT(1) @@ -2781,7 +2854,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&917504) != 0) { + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&3670016) != 0) { var _ri = p.GetErrorHandler().RecoverInline(p) localctx.(*MulDivModContext).op = _ri @@ -2791,21 +2864,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(70) + p.SetState(73) p.expr(19) } case 3: localctx = NewAddSubContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(71) + p.SetState(74) if !(p.Precpred(p.GetParserRuleContext(), 17)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", "")) goto errorExit } { - p.SetState(72) + p.SetState(75) var _lt = p.GetTokenStream().LT(1) @@ -2823,21 +2896,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(73) + p.SetState(76) p.expr(18) } case 4: localctx = NewShiftContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(74) + p.SetState(77) if !(p.Precpred(p.GetParserRuleContext(), 16)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", "")) goto errorExit } { - p.SetState(75) + p.SetState(78) var _lt = p.GetTokenStream().LT(1) @@ -2855,20 +2928,20 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(76) + p.SetState(79) p.expr(17) } case 5: localctx = NewTermContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(77) + p.SetState(80) if !(p.Precpred(p.GetParserRuleContext(), 15)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", "")) goto errorExit } - p.SetState(79) + p.SetState(82) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit @@ -2877,7 +2950,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { if _la == PlanParserNOT { { - p.SetState(78) + p.SetState(81) var _m = p.Match(PlanParserNOT) @@ -2890,7 +2963,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } { - p.SetState(81) + p.SetState(84) p.Match(PlanParserIN) if p.HasError() { // Recognition error - abort rule @@ -2898,21 +2971,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(82) + p.SetState(85) p.expr(16) } case 6: localctx = NewRangeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(83) + p.SetState(86) if !(p.Precpred(p.GetParserRuleContext(), 10)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", "")) goto errorExit } { - p.SetState(84) + p.SetState(87) var _lt = p.GetTokenStream().LT(1) @@ -2930,7 +3003,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(85) + p.SetState(88) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -2941,7 +3014,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(86) + p.SetState(89) var _lt = p.GetTokenStream().LT(1) @@ -2959,21 +3032,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(87) + p.SetState(90) p.expr(11) } case 7: localctx = NewReverseRangeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(88) + p.SetState(91) if !(p.Precpred(p.GetParserRuleContext(), 9)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", "")) goto errorExit } { - p.SetState(89) + p.SetState(92) var _lt = p.GetTokenStream().LT(1) @@ -2991,7 +3064,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(90) + p.SetState(93) _la = p.GetTokenStream().LA(1) if !(_la == PlanParserIdentifier || _la == PlanParserJSONIdentifier) { @@ -3002,7 +3075,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(91) + p.SetState(94) var _lt = p.GetTokenStream().LT(1) @@ -3020,21 +3093,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(92) + p.SetState(95) p.expr(10) } case 8: localctx = NewRelationalContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(93) + p.SetState(96) if !(p.Precpred(p.GetParserRuleContext(), 8)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", "")) goto errorExit } { - p.SetState(94) + p.SetState(97) var _lt = p.GetTokenStream().LT(1) @@ -3042,7 +3115,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { _la = p.GetTokenStream().LA(1) - if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&960) != 0) { + if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&3840) != 0) { var _ri = p.GetErrorHandler().RecoverInline(p) localctx.(*RelationalContext).op = _ri @@ -3052,21 +3125,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(95) + p.SetState(98) p.expr(9) } case 9: localctx = NewEqualityContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(96) + p.SetState(99) if !(p.Precpred(p.GetParserRuleContext(), 7)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) goto errorExit } { - p.SetState(97) + p.SetState(100) var _lt = p.GetTokenStream().LT(1) @@ -3084,21 +3157,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(98) + p.SetState(101) p.expr(8) } case 10: localctx = NewBitAndContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(99) + p.SetState(102) if !(p.Precpred(p.GetParserRuleContext(), 6)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) goto errorExit } { - p.SetState(100) + p.SetState(103) p.Match(PlanParserBAND) if p.HasError() { // Recognition error - abort rule @@ -3106,21 +3179,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(101) + p.SetState(104) p.expr(7) } case 11: localctx = NewBitXorContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(102) + p.SetState(105) if !(p.Precpred(p.GetParserRuleContext(), 5)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) goto errorExit } { - p.SetState(103) + p.SetState(106) p.Match(PlanParserBXOR) if p.HasError() { // Recognition error - abort rule @@ -3128,21 +3201,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(104) + p.SetState(107) p.expr(6) } case 12: localctx = NewBitOrContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(105) + p.SetState(108) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } { - p.SetState(106) + p.SetState(109) p.Match(PlanParserBOR) if p.HasError() { // Recognition error - abort rule @@ -3150,21 +3223,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(107) + p.SetState(110) p.expr(5) } case 13: localctx = NewLogicalAndContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(108) + p.SetState(111) if !(p.Precpred(p.GetParserRuleContext(), 3)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", "")) goto errorExit } { - p.SetState(109) + p.SetState(112) p.Match(PlanParserAND) if p.HasError() { // Recognition error - abort rule @@ -3172,21 +3245,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(110) + p.SetState(113) p.expr(4) } case 14: localctx = NewLogicalOrContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(111) + p.SetState(114) if !(p.Precpred(p.GetParserRuleContext(), 2)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) goto errorExit } { - p.SetState(112) + p.SetState(115) p.Match(PlanParserOR) if p.HasError() { // Recognition error - abort rule @@ -3194,21 +3267,21 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(113) + p.SetState(116) p.expr(3) } case 15: localctx = NewLikeContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr) - p.SetState(114) + p.SetState(117) if !(p.Precpred(p.GetParserRuleContext(), 22)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 22)", "")) goto errorExit } { - p.SetState(115) + p.SetState(118) p.Match(PlanParserLIKE) if p.HasError() { // Recognition error - abort rule @@ -3216,7 +3289,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } { - p.SetState(116) + p.SetState(119) p.Match(PlanParserStringLiteral) if p.HasError() { // Recognition error - abort rule @@ -3229,7 +3302,7 @@ func (p *PlanParser) expr(_p int) (localctx IExprContext) { } } - p.SetState(121) + p.SetState(124) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit diff --git a/internal/parser/planparserv2/generated/plan_visitor.go b/internal/parser/planparserv2/generated/plan_visitor.go index acaa0a833b233..43eb9b14381d9 100644 --- a/internal/parser/planparserv2/generated/plan_visitor.go +++ b/internal/parser/planparserv2/generated/plan_visitor.go @@ -7,6 +7,9 @@ import "github.com/antlr4-go/antlr/v4" type PlanVisitor interface { antlr.ParseTreeVisitor + // Visit a parse tree produced by PlanParser#Placeholder. + VisitPlaceholder(ctx *PlaceholderContext) interface{} + // Visit a parse tree produced by PlanParser#JSONIdentifier. VisitJSONIdentifier(ctx *JSONIdentifierContext) interface{} diff --git a/internal/parser/planparserv2/node_ret.go b/internal/parser/planparserv2/node_ret.go index a8d32b40e262c..1fc4eb126f60d 100644 --- a/internal/parser/planparserv2/node_ret.go +++ b/internal/parser/planparserv2/node_ret.go @@ -39,3 +39,15 @@ func getGenericValue(obj interface{}) *planpb.GenericValue { } return expr.expr.GetValueExpr().GetValue() } + +func getValueExpr(obj interface{}) *planpb.ValueExpr { + expr := getExpr(obj) + if expr == nil { + return nil + } + return expr.expr.GetValueExpr() +} + +func needFillPlaceholder(expr *planpb.ValueExpr) bool { + return expr != nil && expr.GetPlaceholderName() != "" +} diff --git a/internal/parser/planparserv2/parser_visitor.go b/internal/parser/planparserv2/parser_visitor.go index 92af0da0c44a8..7bc15f0b6acf9 100644 --- a/internal/parser/planparserv2/parser_visitor.go +++ b/internal/parser/planparserv2/parser_visitor.go @@ -157,18 +157,23 @@ func checkDirectComparisonBinaryField(columnInfo *planpb.ColumnInfo) error { // VisitAddSub translates expr to arithmetic plan. func (v *ParserVisitor) VisitAddSub(ctx *parser.AddSubContext) interface{} { + var err error left := ctx.Expr(0).Accept(v) - if err := getError(left); err != nil { + if err = getError(left); err != nil { return err } right := ctx.Expr(1).Accept(v) - if err := getError(right); err != nil { + if err = getError(right); err != nil { return err } - leftValue, rightValue := getGenericValue(left), getGenericValue(right) - if leftValue != nil && rightValue != nil { + leftValueExpr, rightValueExpr := getValueExpr(left), getValueExpr(right) + if leftValueExpr != nil && rightValueExpr != nil { + if needFillPlaceholder(leftValueExpr) || needFillPlaceholder(rightValueExpr) { + return fmt.Errorf("placeholder was not supported between two constants with operator: %s", ctx.GetOp().GetText()) + } + leftValue, rightValue := leftValueExpr.GetValue(), rightValueExpr.GetValue() switch ctx.GetOp().GetTokenType() { case parser.PlanParserADD: return Add(leftValue, rightValue) @@ -179,34 +184,37 @@ func (v *ParserVisitor) VisitAddSub(ctx *parser.AddSubContext) interface{} { } } - var leftExpr *ExprWithType - var rightExpr *ExprWithType + leftExpr, rightExpr := getExpr(left), getExpr(right) reverse := true - if leftValue != nil { - leftExpr = toValueExpr(leftValue) - } else { + if leftValueExpr == nil { reverse = false - leftExpr = getExpr(left) - } - if rightValue != nil { - rightExpr = toValueExpr(rightValue) - } else { - rightExpr = getExpr(right) } if leftExpr == nil || rightExpr == nil { return fmt.Errorf("invalid arithmetic expression, left: %s, op: %s, right: %s", ctx.Expr(0).GetText(), ctx.GetOp(), ctx.Expr(1).GetText()) } - if err := checkDirectComparisonBinaryField(toColumnInfo(leftExpr)); err != nil { + if err = checkDirectComparisonBinaryField(toColumnInfo(leftExpr)); err != nil { return err } - if err := checkDirectComparisonBinaryField(toColumnInfo(rightExpr)); err != nil { + if err = checkDirectComparisonBinaryField(toColumnInfo(rightExpr)); err != nil { return err } - if !canArithmetic(leftExpr, rightExpr) { - return fmt.Errorf("'%s' can only be used between integer or floating or json field expressions", arithNameMap[ctx.GetOp().GetTokenType()]) + dataType := schemapb.DataType_None + if leftExpr.expr.GetNeedFillPlaceholder() { + dataType = rightExpr.dataType + } else if rightExpr.expr.GetNeedFillPlaceholder() { + dataType = leftExpr.dataType + } else { + if !canArithmetic(leftExpr.dataType, getArrayElementType(leftExpr), rightExpr.dataType, getArrayElementType(rightExpr)) { + return fmt.Errorf("'%s' can only be used between integer or floating or json field expressions", arithNameMap[ctx.GetOp().GetTokenType()]) + } + + dataType, err = calcDataType(leftExpr, rightExpr, reverse) + if err != nil { + return err + } } expr := &planpb.Expr{ @@ -217,10 +225,7 @@ func (v *ParserVisitor) VisitAddSub(ctx *parser.AddSubContext) interface{} { Op: arithExprMap[ctx.GetOp().GetTokenType()], }, }, - } - dataType, err := calcDataType(leftExpr, rightExpr, reverse) - if err != nil { - return err + NeedFillPlaceholder: leftExpr.expr.GetNeedFillPlaceholder() || rightExpr.expr.GetNeedFillPlaceholder(), } return &ExprWithType{ expr: expr, @@ -231,6 +236,7 @@ func (v *ParserVisitor) VisitAddSub(ctx *parser.AddSubContext) interface{} { // VisitMulDivMod translates expr to arithmetic plan. func (v *ParserVisitor) VisitMulDivMod(ctx *parser.MulDivModContext) interface{} { + var err error left := ctx.Expr(0).Accept(v) if err := getError(left); err != nil { return err @@ -241,8 +247,12 @@ func (v *ParserVisitor) VisitMulDivMod(ctx *parser.MulDivModContext) interface{} return err } - leftValue, rightValue := getGenericValue(left), getGenericValue(right) - if leftValue != nil && rightValue != nil { + leftValueExpr, rightValueExpr := getValueExpr(left), getValueExpr(right) + if leftValueExpr != nil && rightValueExpr != nil { + if needFillPlaceholder(leftValueExpr) || needFillPlaceholder(rightValueExpr) { + return fmt.Errorf("placeholder was not supported between two constants with operator: %s", ctx.GetOp().GetText()) + } + leftValue, rightValue := getGenericValue(left), getGenericValue(right) switch ctx.GetOp().GetTokenType() { case parser.PlanParserMUL: return Multiply(leftValue, rightValue) @@ -263,21 +273,12 @@ func (v *ParserVisitor) VisitMulDivMod(ctx *parser.MulDivModContext) interface{} } } - var leftExpr *ExprWithType - var rightExpr *ExprWithType + leftExpr, rightExpr := getExpr(left), getExpr(right) reverse := true - if leftValue != nil { - leftExpr = toValueExpr(leftValue) - } else { - leftExpr = getExpr(left) + if leftValueExpr == nil { reverse = false } - if rightValue != nil { - rightExpr = toValueExpr(rightValue) - } else { - rightExpr = getExpr(right) - } if leftExpr == nil || rightExpr == nil { return fmt.Errorf("invalid arithmetic expression, left: %s, op: %s, right: %s", ctx.Expr(0).GetText(), ctx.GetOp(), ctx.Expr(1).GetText()) @@ -289,17 +290,27 @@ func (v *ParserVisitor) VisitMulDivMod(ctx *parser.MulDivModContext) interface{} if err := checkDirectComparisonBinaryField(toColumnInfo(rightExpr)); err != nil { return err } - if !canArithmetic(leftExpr, rightExpr) { - return fmt.Errorf("'%s' can only be used between integer or floating or json field expressions", arithNameMap[ctx.GetOp().GetTokenType()]) - } - switch ctx.GetOp().GetTokenType() { - case parser.PlanParserMOD: - if !isIntegerColumn(toColumnInfo(leftExpr)) && !isIntegerColumn(toColumnInfo(rightExpr)) { - return fmt.Errorf("modulo can only apply on integer types") + dataType := schemapb.DataType_None + if leftExpr.expr.GetNeedFillPlaceholder() { + dataType = rightExpr.dataType + } else if rightExpr.expr.GetNeedFillPlaceholder() { + dataType = leftExpr.dataType + } else { + if !canArithmetic(leftExpr.dataType, getArrayElementType(leftExpr), rightExpr.dataType, getArrayElementType(rightExpr)) { + return fmt.Errorf("'%s' can only be used between integer or floating or json field expressions", arithNameMap[ctx.GetOp().GetTokenType()]) + } + + if err = checkValidModArith(arithExprMap[ctx.GetOp().GetTokenType()], leftExpr.dataType, getArrayElementType(leftExpr), rightExpr.dataType, getArrayElementType(rightExpr)); err != nil { + return err + } + + dataType, err = calcDataType(leftExpr, rightExpr, reverse) + if err != nil { + return err } - default: } + expr := &planpb.Expr{ Expr: &planpb.Expr_BinaryArithExpr{ BinaryArithExpr: &planpb.BinaryArithExpr{ @@ -308,11 +319,9 @@ func (v *ParserVisitor) VisitMulDivMod(ctx *parser.MulDivModContext) interface{} Op: arithExprMap[ctx.GetOp().GetTokenType()], }, }, + NeedFillPlaceholder: leftExpr.expr.GetNeedFillPlaceholder() || rightExpr.expr.GetNeedFillPlaceholder(), } - dataType, err := calcDataType(leftExpr, rightExpr, reverse) - if err != nil { - return err - } + return &ExprWithType{ expr: expr, dataType: dataType, @@ -332,8 +341,12 @@ func (v *ParserVisitor) VisitEquality(ctx *parser.EqualityContext) interface{} { return err } - leftValue, rightValue := getGenericValue(left), getGenericValue(right) - if leftValue != nil && rightValue != nil { + leftValueExpr, rightValueExpr := getValueExpr(left), getValueExpr(right) + if leftValueExpr != nil && rightValueExpr != nil { + if needFillPlaceholder(leftValueExpr) || needFillPlaceholder(rightValueExpr) { + return fmt.Errorf("placeholder was not supported between two constants with operator: %s", ctx.GetOp().GetText()) + } + leftValue, rightValue := leftValueExpr.GetValue(), rightValueExpr.GetValue() var ret *ExprWithType switch ctx.GetOp().GetTokenType() { case parser.PlanParserEQ: @@ -349,18 +362,7 @@ func (v *ParserVisitor) VisitEquality(ctx *parser.EqualityContext) interface{} { return ret } - var leftExpr *ExprWithType - var rightExpr *ExprWithType - if leftValue != nil { - leftExpr = toValueExpr(leftValue) - } else { - leftExpr = getExpr(left) - } - if rightValue != nil { - rightExpr = toValueExpr(rightValue) - } else { - rightExpr = getExpr(right) - } + leftExpr, rightExpr := getExpr(left), getExpr(right) expr, err := HandleCompare(ctx.GetOp().GetTokenType(), leftExpr, rightExpr) if err != nil { @@ -384,10 +386,12 @@ func (v *ParserVisitor) VisitRelational(ctx *parser.RelationalContext) interface if err := getError(right); err != nil { return err } - - leftValue, rightValue := getGenericValue(left), getGenericValue(right) - - if leftValue != nil && rightValue != nil { + leftValueExpr, rightValueExpr := getValueExpr(left), getValueExpr(right) + if leftValueExpr != nil && rightValueExpr != nil { + if needFillPlaceholder(leftValueExpr) || needFillPlaceholder(rightValueExpr) { + return fmt.Errorf("placeholder was not supported between two constants with operator: %s", ctx.GetOp().GetText()) + } + leftValue, rightValue := getGenericValue(left), getGenericValue(right) var ret *ExprWithType switch ctx.GetOp().GetTokenType() { case parser.PlanParserLT: @@ -407,18 +411,7 @@ func (v *ParserVisitor) VisitRelational(ctx *parser.RelationalContext) interface return ret } - var leftExpr *ExprWithType - var rightExpr *ExprWithType - if leftValue != nil { - leftExpr = toValueExpr(leftValue) - } else { - leftExpr = getExpr(left) - } - if rightValue != nil { - rightExpr = toValueExpr(rightValue) - } else { - rightExpr = getExpr(right) - } + leftExpr, rightExpr := getExpr(left), getExpr(right) if err := checkDirectComparisonBinaryField(toColumnInfo(leftExpr)); err != nil { return err } @@ -540,31 +533,45 @@ func (v *ParserVisitor) VisitTerm(ctx *parser.TermContext) interface{} { if getError(term) != nil { return term } - value := getGenericValue(term) - if value == nil { - return fmt.Errorf("value '%s' in list cannot be a non-const expression", ctx.Expr(1).GetText()) - } + valueExpr := getValueExpr(term) + var placeholder string + var neddFillPlaceholder bool + values := make([]*planpb.GenericValue, 0) - if !IsArray(value) { - return fmt.Errorf("the right-hand side of 'in' must be a list, but got: %s", ctx.Expr(1).GetText()) - } + if valueExpr.GetValue() == nil && valueExpr.GetPlaceholderName() != "" { + placeholder = valueExpr.GetPlaceholderName() + values = nil + neddFillPlaceholder = true + } else { + elementValue := valueExpr.GetValue() + if elementValue == nil { + return fmt.Errorf( + "contains_any operation are only supported explicitly specified element, got: %s", ctx.Expr(1).GetText()) + } - values := value.GetArrayVal().GetArray() - for i, e := range values { - castedValue, err := castValue(dataType, e) - if err != nil { - return fmt.Errorf("value '%s' in list cannot be casted to %s", e.String(), dataType.String()) + if !IsArray(elementValue) { + return fmt.Errorf("the right-hand side of 'in' must be a list, but got: %s", ctx.Expr(1).GetText()) + } + array := elementValue.GetArrayVal().GetArray() + values = make([]*planpb.GenericValue, len(array)) + for i, e := range array { + castedValue, err := castValue(dataType, e) + if err != nil { + return fmt.Errorf("value '%s' in list cannot be casted to %s", e.String(), dataType.String()) + } + values[i] = castedValue } - values[i] = castedValue } expr := &planpb.Expr{ Expr: &planpb.Expr_TermExpr{ TermExpr: &planpb.TermExpr{ - ColumnInfo: columnInfo, - Values: values, + ColumnInfo: columnInfo, + Values: values, + PlaceholderName: placeholder, }, }, + NeedFillPlaceholder: neddFillPlaceholder, } if ctx.GetOp() != nil { expr = &planpb.Expr{ @@ -574,6 +581,7 @@ func (v *ParserVisitor) VisitTerm(ctx *parser.TermContext) interface{} { Child: expr, }, }, + NeedFillPlaceholder: neddFillPlaceholder, } } return &ExprWithType{ @@ -616,12 +624,11 @@ func (v *ParserVisitor) VisitRange(ctx *parser.RangeContext) interface{} { return err } - lowerValue := getGenericValue(lower) - upperValue := getGenericValue(upper) - if lowerValue == nil { + lowerValueExpr, upperValueExpr := getValueExpr(lower), getValueExpr(upper) + if lowerValueExpr == nil { return fmt.Errorf("lowerbound cannot be a non-const expression: %s", ctx.Expr(0).GetText()) } - if upperValue == nil { + if upperValueExpr == nil { return fmt.Errorf("upperbound cannot be a non-const expression: %s", ctx.Expr(1).GetText()) } @@ -630,52 +637,45 @@ func (v *ParserVisitor) VisitRange(ctx *parser.RangeContext) interface{} { fieldDataType = columnInfo.GetElementType() } - switch fieldDataType { - case schemapb.DataType_String, schemapb.DataType_VarChar: - if !IsString(lowerValue) || !IsString(upperValue) { - return fmt.Errorf("invalid range operations") - } - case schemapb.DataType_Bool: - return fmt.Errorf("invalid range operations on boolean expr") - case schemapb.DataType_Int8, schemapb.DataType_Int16, schemapb.DataType_Int32, schemapb.DataType_Int64: - if !IsInteger(lowerValue) || !IsInteger(upperValue) { - return fmt.Errorf("invalid range operations") - } - case schemapb.DataType_Float, schemapb.DataType_Double: - if !IsNumber(lowerValue) || !IsNumber(upperValue) { - return fmt.Errorf("invalid range operations") - } - if IsInteger(lowerValue) { - lowerValue = NewFloat(float64(lowerValue.GetInt64Val())) + lowerValue := lowerValueExpr.GetValue() + upperValue := upperValueExpr.GetValue() + if !needFillPlaceholder(lowerValueExpr) { + if err = checkRangeCompared(fieldDataType, lowerValue); err != nil { + return err } - if IsInteger(upperValue) { - upperValue = NewFloat(float64(upperValue.GetInt64Val())) + } + if !needFillPlaceholder(upperValueExpr) { + if err = checkRangeCompared(fieldDataType, upperValue); err != nil { + return err } } - lowerInclusive := ctx.GetOp1().GetTokenType() == parser.PlanParserLE upperInclusive := ctx.GetOp2().GetTokenType() == parser.PlanParserLE - - // if !(lowerInclusive && upperInclusive) { - // if getGenericValue(GreaterEqual(lowerValue, upperValue)).GetBoolVal() { - // return fmt.Errorf("invalid range: lowerbound is greater than upperbound") - // } - // } else { - // if getGenericValue(Greater(lowerValue, upperValue)).GetBoolVal() { - // return fmt.Errorf("invalid range: lowerbound is greater than upperbound") - // } - // } + if !needFillPlaceholder(lowerValueExpr) && !needFillPlaceholder(upperValueExpr) { + if !(lowerInclusive && upperInclusive) { + if getGenericValue(GreaterEqual(lowerValue, upperValue)).GetBoolVal() { + return fmt.Errorf("invalid range: lowerbound is greater than upperbound") + } + } else { + if getGenericValue(Greater(lowerValue, upperValue)).GetBoolVal() { + return fmt.Errorf("invalid range: lowerbound is greater than upperbound") + } + } + } expr := &planpb.Expr{ Expr: &planpb.Expr_BinaryRangeExpr{ BinaryRangeExpr: &planpb.BinaryRangeExpr{ - ColumnInfo: columnInfo, - LowerInclusive: lowerInclusive, - UpperInclusive: upperInclusive, - LowerValue: lowerValue, - UpperValue: upperValue, + ColumnInfo: columnInfo, + LowerInclusive: lowerInclusive, + UpperInclusive: upperInclusive, + LowerValue: lowerValue, + UpperValue: upperValue, + LowerPlaceholderName: lowerValueExpr.GetPlaceholderName(), + UpperPlaceholderName: upperValueExpr.GetPlaceholderName(), }, }, + NeedFillPlaceholder: needFillPlaceholder(lowerValueExpr) || needFillPlaceholder(upperValueExpr), } return &ExprWithType{ expr: expr, @@ -706,61 +706,58 @@ func (v *ParserVisitor) VisitReverseRange(ctx *parser.ReverseRangeContext) inter return err } - lowerValue := getGenericValue(lower) - upperValue := getGenericValue(upper) - if lowerValue == nil { + lowerValueExpr, upperValueExpr := getValueExpr(lower), getValueExpr(upper) + if lowerValueExpr == nil { return fmt.Errorf("lowerbound cannot be a non-const expression: %s", ctx.Expr(0).GetText()) } - if upperValue == nil { + if upperValueExpr == nil { return fmt.Errorf("upperbound cannot be a non-const expression: %s", ctx.Expr(1).GetText()) } - switch columnInfo.GetDataType() { - case schemapb.DataType_String, schemapb.DataType_VarChar: - if !IsString(lowerValue) || !IsString(upperValue) { - return fmt.Errorf("invalid range operations") - } - case schemapb.DataType_Bool: - return fmt.Errorf("invalid range operations on boolean expr") - case schemapb.DataType_Int8, schemapb.DataType_Int16, schemapb.DataType_Int32, schemapb.DataType_Int64: - if !IsInteger(lowerValue) || !IsInteger(upperValue) { - return fmt.Errorf("invalid range operations") - } - case schemapb.DataType_Float, schemapb.DataType_Double: - if !IsNumber(lowerValue) || !IsNumber(upperValue) { - return fmt.Errorf("invalid range operations") - } - if IsInteger(lowerValue) { - lowerValue = NewFloat(float64(lowerValue.GetInt64Val())) + fieldDataType := columnInfo.GetDataType() + if typeutil.IsArrayType(columnInfo.GetDataType()) { + fieldDataType = columnInfo.GetElementType() + } + + lowerValue := lowerValueExpr.GetValue() + upperValue := upperValueExpr.GetValue() + if !needFillPlaceholder(lowerValueExpr) { + if err = checkRangeCompared(fieldDataType, lowerValue); err != nil { + return err } - if IsInteger(upperValue) { - upperValue = NewFloat(float64(upperValue.GetInt64Val())) + } + if !needFillPlaceholder(upperValueExpr) { + if err = checkRangeCompared(fieldDataType, upperValue); err != nil { + return err } } - lowerInclusive := ctx.GetOp2().GetTokenType() == parser.PlanParserGE upperInclusive := ctx.GetOp1().GetTokenType() == parser.PlanParserGE - - // if !(lowerInclusive && upperInclusive) { - // if getGenericValue(GreaterEqual(lowerValue, upperValue)).GetBoolVal() { - // return fmt.Errorf("invalid range: lowerbound is greater than upperbound") - // } - // } else { - // if getGenericValue(Greater(lowerValue, upperValue)).GetBoolVal() { - // return fmt.Errorf("invalid range: lowerbound is greater than upperbound") - // } - // } + if !needFillPlaceholder(lowerValueExpr) && !needFillPlaceholder(upperValueExpr) { + if !(lowerInclusive && upperInclusive) { + if getGenericValue(GreaterEqual(lowerValue, upperValue)).GetBoolVal() { + return fmt.Errorf("invalid range: lowerbound is greater than upperbound") + } + } else { + if getGenericValue(Greater(lowerValue, upperValue)).GetBoolVal() { + return fmt.Errorf("invalid range: lowerbound is greater than upperbound") + } + } + } expr := &planpb.Expr{ Expr: &planpb.Expr_BinaryRangeExpr{ BinaryRangeExpr: &planpb.BinaryRangeExpr{ - ColumnInfo: columnInfo, - LowerInclusive: lowerInclusive, - UpperInclusive: upperInclusive, - LowerValue: lowerValue, - UpperValue: upperValue, + ColumnInfo: columnInfo, + LowerInclusive: lowerInclusive, + UpperInclusive: upperInclusive, + LowerValue: lowerValue, + UpperValue: upperValue, + LowerPlaceholderName: lowerValueExpr.GetPlaceholderName(), + UpperPlaceholderName: upperValueExpr.GetPlaceholderName(), }, }, + NeedFillPlaceholder: needFillPlaceholder(lowerValueExpr) || needFillPlaceholder(upperValueExpr), } return &ExprWithType{ expr: expr, @@ -1175,23 +1172,22 @@ func (v *ParserVisitor) VisitJSONContains(ctx *parser.JSONContainsContext) inter if err := getError(element); err != nil { return err } - elementValue := getGenericValue(element) - if elementValue == nil { + elementExpr := getValueExpr(element) + if elementExpr == nil { return fmt.Errorf( "contains operation are only supported explicitly specified element, got: %s", ctx.Expr(1).GetText()) } - if typeutil.IsArrayType(columnInfo.GetDataType()) { - valExpr := toValueExpr(elementValue) - if !canBeCompared(field.(*ExprWithType), valExpr) { - return fmt.Errorf("contains operation can't compare between array element type: %s and %s", - columnInfo.GetElementType(), - valExpr.dataType) + var elements []*planpb.GenericValue + + if !needFillPlaceholder(elementExpr) { + elements = make([]*planpb.GenericValue, 1) + elementValue := elementExpr.GetValue() + if err := checkContainsElement(field.(*ExprWithType), planpb.JSONContainsExpr_Contains, elementValue); err != nil { + return err } + elements[0] = elementValue } - elements := make([]*planpb.GenericValue, 1) - elements[0] = elementValue - expr := &planpb.Expr{ Expr: &planpb.Expr_JsonContainsExpr{ JsonContainsExpr: &planpb.JSONContainsExpr{ @@ -1199,8 +1195,10 @@ func (v *ParserVisitor) VisitJSONContains(ctx *parser.JSONContainsContext) inter Elements: elements, Op: planpb.JSONContainsExpr_Contains, ElementsSameType: true, + PlaceholderName: elementExpr.GetPlaceholderName(), }, }, + NeedFillPlaceholder: needFillPlaceholder(elementExpr), } return &ExprWithType{ expr: expr, @@ -1225,36 +1223,35 @@ func (v *ParserVisitor) VisitJSONContainsAll(ctx *parser.JSONContainsAllContext) if err := getError(element); err != nil { return err } - elementValue := getGenericValue(element) - if elementValue == nil { + + elementExpr := getValueExpr(element) + if elementExpr == nil { return fmt.Errorf( "contains_all operation are only supported explicitly specified element, got: %s", ctx.Expr(1).GetText()) } - if elementValue.GetArrayVal() == nil { - return fmt.Errorf("contains_all operation element must be an array") - } - - if typeutil.IsArrayType(columnInfo.GetDataType()) { - for _, value := range elementValue.GetArrayVal().GetArray() { - valExpr := toValueExpr(value) - if !canBeCompared(field.(*ExprWithType), valExpr) { - return fmt.Errorf("contains_all operation can't compare between array element type: %s and %s", - columnInfo.GetElementType(), - valExpr.dataType) - } + var elements []*planpb.GenericValue + var sameType bool + if !needFillPlaceholder(elementExpr) { + elementValue := elementExpr.GetValue() + if err := checkContainsElement(field.(*ExprWithType), planpb.JSONContainsExpr_ContainsAll, elementValue); err != nil { + return err } + elements = elementValue.GetArrayVal().GetArray() + sameType = elementValue.GetArrayVal().GetSameType() } expr := &planpb.Expr{ Expr: &planpb.Expr_JsonContainsExpr{ JsonContainsExpr: &planpb.JSONContainsExpr{ ColumnInfo: columnInfo, - Elements: elementValue.GetArrayVal().GetArray(), + Elements: elements, Op: planpb.JSONContainsExpr_ContainsAll, - ElementsSameType: elementValue.GetArrayVal().GetSameType(), + ElementsSameType: sameType, + PlaceholderName: elementExpr.GetPlaceholderName(), }, }, + NeedFillPlaceholder: needFillPlaceholder(elementExpr), } return &ExprWithType{ expr: expr, @@ -1279,36 +1276,36 @@ func (v *ParserVisitor) VisitJSONContainsAny(ctx *parser.JSONContainsAnyContext) if err := getError(element); err != nil { return err } - elementValue := getGenericValue(element) - if elementValue == nil { + valueExpr := getValueExpr(element) + + if valueExpr == nil { return fmt.Errorf( "contains_any operation are only supported explicitly specified element, got: %s", ctx.Expr(1).GetText()) } - if elementValue.GetArrayVal() == nil { - return fmt.Errorf("contains_any operation element must be an array") - } + var elements []*planpb.GenericValue + var sameType = true - if typeutil.IsArrayType(columnInfo.GetDataType()) { - for _, value := range elementValue.GetArrayVal().GetArray() { - valExpr := toValueExpr(value) - if !canBeCompared(field.(*ExprWithType), valExpr) { - return fmt.Errorf("contains_any operation can't compare between array element type: %s and %s", - columnInfo.GetElementType(), - valExpr.dataType) - } + if !needFillPlaceholder(valueExpr) { + elementValue := valueExpr.GetValue() + if err := checkContainsElement(field.(*ExprWithType), planpb.JSONContainsExpr_ContainsAny, elementValue); err != nil { + return err } + elements = elementValue.GetArrayVal().GetArray() + sameType = elementValue.GetArrayVal().GetSameType() } expr := &planpb.Expr{ Expr: &planpb.Expr_JsonContainsExpr{ JsonContainsExpr: &planpb.JSONContainsExpr{ ColumnInfo: columnInfo, - Elements: elementValue.GetArrayVal().GetArray(), + Elements: elements, Op: planpb.JSONContainsExpr_ContainsAny, - ElementsSameType: elementValue.GetArrayVal().GetSameType(), + ElementsSameType: sameType, + PlaceholderName: valueExpr.GetPlaceholderName(), }, }, + NeedFillPlaceholder: needFillPlaceholder(valueExpr), } return &ExprWithType{ expr: expr, @@ -1348,3 +1345,17 @@ func (v *ParserVisitor) VisitArrayLength(ctx *parser.ArrayLengthContext) interfa nodeDependent: true, } } + +func (v *ParserVisitor) VisitPlaceholder(ctx *parser.PlaceholderContext) interface{} { + return &ExprWithType{ + expr: &planpb.Expr{ + Expr: &planpb.Expr_ValueExpr{ + ValueExpr: &planpb.ValueExpr{ + Value: nil, + PlaceholderName: ctx.Identifier().GetText(), + }, + }, + NeedFillPlaceholder: true, + }, + } +} diff --git a/internal/parser/planparserv2/plan_parser_v2.go b/internal/parser/planparserv2/plan_parser_v2.go index 7f4c7bf807554..7af1377c92499 100644 --- a/internal/parser/planparserv2/plan_parser_v2.go +++ b/internal/parser/planparserv2/plan_parser_v2.go @@ -29,14 +29,17 @@ type exprParseKey struct { var exprCache = expirable.NewLRU[exprParseKey, any](256, nil, time.Minute*10) func handleExpr(schema *typeutil.SchemaHelper, exprStr string) interface{} { - parseKey := exprParseKey{collectionName: schema.GetCollectionName(), expr: exprStr} - val, ok := exprCache.Get(parseKey) - if !ok { - exprStr = convertHanToASCII(exprStr) - val = handleExprWithErrorListener(schema, exprStr, &errorListenerImpl{}) - // Note that the errors will be cached, too. - exprCache.Add(parseKey, val) - } + //parseKey := exprParseKey{collectionName: schema.GetCollectionName(), expr: exprStr} + //val, ok := exprCache.Get(parseKey) + //if !ok { + // exprStr = convertHanToASCII(exprStr) + // val = handleExprWithErrorListener(schema, exprStr, &errorListenerImpl{}) + // // Note that the errors will be cached, too. + // exprCache.Add(parseKey, val) + //} + + exprStr = convertHanToASCII(exprStr) + val := handleExprWithErrorListener(schema, exprStr, &errorListenerImpl{}) return val } @@ -78,7 +81,7 @@ func handleExprWithErrorListener(schema *typeutil.SchemaHelper, exprStr string, return ast.Accept(visitor) } -func ParseExpr(schema *typeutil.SchemaHelper, exprStr string) (*planpb.Expr, error) { +func ParseExpr(schema *typeutil.SchemaHelper, exprStr string, data ...*schemapb.FieldData) (*planpb.Expr, error) { ret := handleExpr(schema, exprStr) if err := getError(ret); err != nil { @@ -93,6 +96,15 @@ func ParseExpr(schema *typeutil.SchemaHelper, exprStr string) (*planpb.Expr, err return nil, fmt.Errorf("predicate is not a boolean expression: %s, data type: %s", exprStr, predicate.dataType) } + valueMap, err := UnmarshalExpressionValues(data...) + if err != nil { + return nil, err + } + + if err := FillExpressionValue(predicate.expr, valueMap); err != nil { + return nil, err + } + return predicate.expr, nil } @@ -114,8 +126,8 @@ func ParseIdentifier(schema *typeutil.SchemaHelper, identifier string, checkFunc return checkFunc(predicate.expr) } -func CreateRetrievePlan(schema *typeutil.SchemaHelper, exprStr string) (*planpb.PlanNode, error) { - expr, err := ParseExpr(schema, exprStr) +func CreateRetrievePlan(schema *typeutil.SchemaHelper, exprStr string, data ...*schemapb.FieldData) (*planpb.PlanNode, error) { + expr, err := ParseExpr(schema, exprStr, data...) if err != nil { return nil, err } @@ -160,12 +172,12 @@ func convertHanToASCII(s string) string { return builder.String() } -func CreateSearchPlan(schema *typeutil.SchemaHelper, exprStr string, vectorFieldName string, queryInfo *planpb.QueryInfo) (*planpb.PlanNode, error) { +func CreateSearchPlan(schema *typeutil.SchemaHelper, exprStr string, vectorFieldName string, queryInfo *planpb.QueryInfo, data ...*schemapb.FieldData) (*planpb.PlanNode, error) { parse := func() (*planpb.Expr, error) { if len(exprStr) <= 0 { return nil, nil } - return ParseExpr(schema, exprStr) + return ParseExpr(schema, exprStr, data...) } expr, err := parse() diff --git a/internal/parser/planparserv2/plan_parser_v2_test.go b/internal/parser/planparserv2/plan_parser_v2_test.go index 5c74535cec8b1..63ea010d123d2 100644 --- a/internal/parser/planparserv2/plan_parser_v2_test.go +++ b/internal/parser/planparserv2/plan_parser_v2_test.go @@ -1391,3 +1391,30 @@ func Test_convertHanToASCII(t *testing.T) { assert.Equal(t, c.target, convertHanToASCII(c.source)) } } + +func BenchmarkTemplateWithString(b *testing.B) { + schema := newTestSchema() + schemaHelper, err := typeutil.CreateSchemaHelper(schema) + require.NoError(b, err) + + elements := make([]interface{}, 0, 100) + for i := 0; i < 100; i++ { + elements = append(elements, fmt.Sprintf(`"%s",`, randomChineseString(rand.Intn(100)))) + } + expr := "StringField in {list}" + + mv := generateExpressionFieldData("list", schemapb.DataType_Array, []interface{}{ + generateExpressionFieldData("", schemapb.DataType_VarChar, elements), + }) + + for i := 0; i < b.N; i++ { + plan, err := CreateSearchPlan(schemaHelper, expr, "FloatVectorField", &planpb.QueryInfo{ + Topk: 0, + MetricType: "", + SearchParams: "", + RoundDecimal: 0, + }, mv) + assert.NoError(b, err) + assert.NotNil(b, plan) + } +} diff --git a/internal/parser/planparserv2/utils.go b/internal/parser/planparserv2/utils.go index db87dcfa2b9fe..5275535cd551b 100644 --- a/internal/parser/planparserv2/utils.go +++ b/internal/parser/planparserv2/utils.go @@ -1,6 +1,7 @@ package planparserv2 import ( + "encoding/json" "fmt" "strconv" "strings" @@ -86,6 +87,19 @@ func NewString(value string) *planpb.GenericValue { } } +func toColumnExpr(info *planpb.ColumnInfo) *ExprWithType { + return &ExprWithType{ + expr: &planpb.Expr{ + Expr: &planpb.Expr_ColumnExpr{ + ColumnExpr: &planpb.ColumnExpr{ + Info: info, + }, + }, + }, + dataType: info.GetDataType(), + } +} + func toValueExpr(n *planpb.GenericValue) *ExprWithType { expr := &planpb.Expr{ Expr: &planpb.Expr_ValueExpr{ @@ -126,14 +140,7 @@ func toValueExpr(n *planpb.GenericValue) *ExprWithType { } } -func getSameType(left, right *ExprWithType) (schemapb.DataType, error) { - lDataType, rDataType := left.dataType, right.dataType - if typeutil.IsArrayType(lDataType) { - lDataType = toColumnInfo(left).GetElementType() - } - if typeutil.IsArrayType(rDataType) { - rDataType = toColumnInfo(right).GetElementType() - } +func getTargetType(lDataType, rDataType schemapb.DataType) (schemapb.DataType, error) { if typeutil.IsJSONType(lDataType) { if typeutil.IsJSONType(rDataType) { return schemapb.DataType_JSON, nil @@ -162,6 +169,17 @@ func getSameType(left, right *ExprWithType) (schemapb.DataType, error) { return schemapb.DataType_None, fmt.Errorf("incompatible data type, %s, %s", lDataType.String(), rDataType.String()) } +func getSameType(left, right *ExprWithType) (schemapb.DataType, error) { + lDataType, rDataType := left.dataType, right.dataType + if typeutil.IsArrayType(lDataType) { + lDataType = toColumnInfo(left).GetElementType() + } + if typeutil.IsArrayType(rDataType) { + rDataType = toColumnInfo(right).GetElementType() + } + return getTargetType(lDataType, rDataType) +} + func calcDataType(left, right *ExprWithType, reverse bool) (schemapb.DataType, error) { if reverse { return getSameType(right, left) @@ -223,47 +241,43 @@ func castValue(dataType schemapb.DataType, value *planpb.GenericValue) (*planpb. return nil, fmt.Errorf("cannot cast value to %s, value: %s", dataType.String(), value) } -func combineBinaryArithExpr(op planpb.OpType, arithOp planpb.ArithOpType, columnInfo *planpb.ColumnInfo, operand *planpb.GenericValue, value *planpb.GenericValue) *planpb.Expr { - dataType := columnInfo.GetDataType() - if typeutil.IsArrayType(dataType) && len(columnInfo.GetNestedPath()) != 0 { - dataType = columnInfo.GetElementType() - } - castedValue, err := castValue(dataType, operand) - if err != nil { - return nil - } +func combineBinaryArithExpr(op planpb.OpType, arithOp planpb.ArithOpType, columnInfo *planpb.ColumnInfo, arithExprDataType schemapb.DataType, operandExpr, valueExpr *planpb.ValueExpr) *planpb.Expr { return &planpb.Expr{ Expr: &planpb.Expr_BinaryArithOpEvalRangeExpr{ BinaryArithOpEvalRangeExpr: &planpb.BinaryArithOpEvalRangeExpr{ - ColumnInfo: columnInfo, - ArithOp: arithOp, - RightOperand: castedValue, - Op: op, - Value: value, + ColumnInfo: columnInfo, + ArithOp: arithOp, + RightOperand: operandExpr.GetValue(), + Op: op, + Value: valueExpr.GetValue(), + OperandPlaceholderName: operandExpr.GetPlaceholderName(), + ValuePlaceholderName: valueExpr.GetPlaceholderName(), }, }, + NeedFillPlaceholder: needFillPlaceholder(operandExpr) || needFillPlaceholder(valueExpr), } } -func combineArrayLengthExpr(op planpb.OpType, arithOp planpb.ArithOpType, columnInfo *planpb.ColumnInfo, value *planpb.GenericValue) (*planpb.Expr, error) { +func combineArrayLengthExpr(op planpb.OpType, arithOp planpb.ArithOpType, columnInfo *planpb.ColumnInfo, valueExpr *planpb.ValueExpr) (*planpb.Expr, error) { return &planpb.Expr{ Expr: &planpb.Expr_BinaryArithOpEvalRangeExpr{ BinaryArithOpEvalRangeExpr: &planpb.BinaryArithOpEvalRangeExpr{ - ColumnInfo: columnInfo, - ArithOp: arithOp, - Op: op, - Value: value, + ColumnInfo: columnInfo, + ArithOp: arithOp, + Op: op, + Value: valueExpr.GetValue(), + ValuePlaceholderName: valueExpr.GetPlaceholderName(), }, }, }, nil } -func handleBinaryArithExpr(op planpb.OpType, arithExpr *planpb.BinaryArithExpr, valueExpr *planpb.ValueExpr) (*planpb.Expr, error) { +func handleBinaryArithExpr(op planpb.OpType, arithExpr *planpb.BinaryArithExpr, arithExprDataType schemapb.DataType, valueExpr *planpb.ValueExpr) (*planpb.Expr, error) { leftExpr, leftValue := arithExpr.Left.GetColumnExpr(), arithExpr.Left.GetValueExpr() rightExpr, rightValue := arithExpr.Right.GetColumnExpr(), arithExpr.Right.GetValueExpr() arithOp := arithExpr.GetOp() if arithOp == planpb.ArithOpType_ArrayLength { - return combineArrayLengthExpr(op, arithOp, leftExpr.GetInfo(), valueExpr.GetValue()) + return combineArrayLengthExpr(op, arithOp, leftExpr.GetInfo(), valueExpr) } if leftExpr != nil && rightExpr != nil { @@ -282,7 +296,7 @@ func handleBinaryArithExpr(op planpb.OpType, arithExpr *planpb.BinaryArithExpr, // a * 2 == 3 // a / 2 == 3 // a % 2 == 3 - return combineBinaryArithExpr(op, arithOp, leftExpr.GetInfo(), rightValue.GetValue(), valueExpr.GetValue()), nil + return combineBinaryArithExpr(op, arithOp, leftExpr.GetInfo(), arithExprDataType, rightValue, valueExpr), nil } else if rightExpr != nil && leftValue != nil { // 2 + a == 3 // 2 - a == 3 @@ -292,7 +306,7 @@ func handleBinaryArithExpr(op planpb.OpType, arithExpr *planpb.BinaryArithExpr, switch arithExpr.GetOp() { case planpb.ArithOpType_Add, planpb.ArithOpType_Mul: - return combineBinaryArithExpr(op, arithOp, rightExpr.GetInfo(), leftValue.GetValue(), valueExpr.GetValue()), nil + return combineBinaryArithExpr(op, arithOp, rightExpr.GetInfo(), arithExprDataType, leftValue, valueExpr), nil default: return nil, fmt.Errorf("module field is not yet supported") } @@ -307,13 +321,17 @@ func handleCompareRightValue(op planpb.OpType, left *ExprWithType, right *planpb if typeutil.IsArrayType(dataType) && len(toColumnInfo(left).GetNestedPath()) != 0 { dataType = toColumnInfo(left).GetElementType() } - castedValue, err := castValue(dataType, right.GetValue()) - if err != nil { - return nil, err + + if !left.expr.GetNeedFillPlaceholder() && !needFillPlaceholder(right) { + castedValue, err := castValue(dataType, right.GetValue()) + if err != nil { + return nil, err + } + right = &planpb.ValueExpr{Value: castedValue} } if leftArithExpr := left.expr.GetBinaryArithExpr(); leftArithExpr != nil { - return handleBinaryArithExpr(op, leftArithExpr, &planpb.ValueExpr{Value: castedValue}) + return handleBinaryArithExpr(op, leftArithExpr, left.dataType, right) } columnInfo := toColumnInfo(left) @@ -323,11 +341,13 @@ func handleCompareRightValue(op planpb.OpType, left *ExprWithType, right *planpb expr := &planpb.Expr{ Expr: &planpb.Expr_UnaryRangeExpr{ UnaryRangeExpr: &planpb.UnaryRangeExpr{ - ColumnInfo: columnInfo, - Op: op, - Value: castedValue, + ColumnInfo: columnInfo, + Op: op, + Value: right.GetValue(), + PlaceholderName: right.GetPlaceholderName(), }, }, + NeedFillPlaceholder: needFillPlaceholder(right), } switch op { @@ -342,6 +362,19 @@ func handleCompare(op planpb.OpType, left *ExprWithType, right *ExprWithType) (* leftColumnInfo := toColumnInfo(left) rightColumnInfo := toColumnInfo(right) + if left.expr.GetNeedFillPlaceholder() { + return &planpb.Expr{ + Expr: &planpb.Expr_UnaryRangeExpr{ + UnaryRangeExpr: &planpb.UnaryRangeExpr{ + ColumnInfo: rightColumnInfo, + Op: op, + Value: left.expr.GetValueExpr().GetValue(), + PlaceholderName: left.expr.GetValueExpr().GetPlaceholderName(), + }, + }, + }, nil + } + if leftColumnInfo == nil || rightColumnInfo == nil { return nil, fmt.Errorf("only comparison between two fields is supported") } @@ -417,9 +450,11 @@ func getDataType(expr *ExprWithType) string { } func HandleCompare(op int, left, right *ExprWithType) (*planpb.Expr, error) { - if !canBeCompared(left, right) { - return nil, fmt.Errorf("comparisons between %s and %s are not supported", - getDataType(left), getDataType(right)) + if !left.expr.GetNeedFillPlaceholder() && !right.expr.GetNeedFillPlaceholder() { + if !canBeCompared(left, right) { + return nil, fmt.Errorf("comparisons between %s and %s are not supported", + getDataType(left), getDataType(right)) + } } cmpOp := cmpOpMap[op] @@ -521,23 +556,39 @@ func canArithmeticDataType(left, right schemapb.DataType) bool { } } -func canArithmetic(left *ExprWithType, right *ExprWithType) bool { - if !typeutil.IsArrayType(left.dataType) && !typeutil.IsArrayType(right.dataType) { - return canArithmeticDataType(left.dataType, right.dataType) +//func canArithmetic(left *ExprWithType, right *ExprWithType) bool { +// if !typeutil.IsArrayType(left.dataType) && !typeutil.IsArrayType(right.dataType) { +// return canArithmeticDataType(left.dataType, right.dataType) +// } +// if typeutil.IsArrayType(left.dataType) && typeutil.IsArrayType(right.dataType) { +// return canArithmeticDataType(getArrayElementType(left), getArrayElementType(right)) +// } +// if typeutil.IsArrayType(left.dataType) { +// return canArithmeticDataType(getArrayElementType(left), right.dataType) +// } +// return canArithmeticDataType(left.dataType, getArrayElementType(right)) +//} + +func canArithmetic(left, leftElement, right, rightElement schemapb.DataType) bool { + if !typeutil.IsArrayType(left) && !typeutil.IsArrayType(right) { + return canArithmeticDataType(left, right) } - if typeutil.IsArrayType(left.dataType) && typeutil.IsArrayType(right.dataType) { - return canArithmeticDataType(getArrayElementType(left), getArrayElementType(right)) + if typeutil.IsArrayType(left) && typeutil.IsArrayType(right) { + return canArithmeticDataType(leftElement, rightElement) } - if typeutil.IsArrayType(left.dataType) { - return canArithmeticDataType(getArrayElementType(left), right.dataType) + if typeutil.IsArrayType(left) { + return canArithmeticDataType(leftElement, right) } - return canArithmeticDataType(left.dataType, getArrayElementType(right)) + return canArithmeticDataType(left, rightElement) +} + +func canConvertToIntegerType(dataType, elementType schemapb.DataType) bool { + return typeutil.IsIntegerType(dataType) || typeutil.IsJSONType(dataType) || + (typeutil.IsArrayType(dataType) && typeutil.IsIntegerType(elementType)) } func isIntegerColumn(col *planpb.ColumnInfo) bool { - return typeutil.IsIntegerType(col.GetDataType()) || - (typeutil.IsArrayType(col.GetDataType()) && typeutil.IsIntegerType(col.GetElementType())) || - typeutil.IsJSONType(col.GetDataType()) + return canConvertToIntegerType(col.GetDataType(), col.GetElementType()) } func isEscapeCh(ch uint8) bool { @@ -561,3 +612,106 @@ func hexDigit(n uint32) byte { } return byte(n-10) + 'a' } + +func checkValidModArith(tokenType planpb.ArithOpType, leftType, leftElementType, rightType, rightElementType schemapb.DataType) error { + switch tokenType { + case planpb.ArithOpType_Mod: + if !canConvertToIntegerType(leftType, leftElementType) || !canConvertToIntegerType(rightType, rightElementType) { + return fmt.Errorf("modulo can only apply on integer types") + } + default: + } + return nil +} + +func checkRangeCompared(dataType schemapb.DataType, value *planpb.GenericValue) error { + switch dataType { + case schemapb.DataType_String, schemapb.DataType_VarChar: + if !IsString(value) { + return fmt.Errorf("invalid range operations") + } + case schemapb.DataType_Bool: + return fmt.Errorf("invalid range operations on boolean expr") + case schemapb.DataType_Int8, schemapb.DataType_Int16, schemapb.DataType_Int32, schemapb.DataType_Int64: + if !IsInteger(value) { + return fmt.Errorf("invalid range operations") + } + case schemapb.DataType_Float, schemapb.DataType_Double: + if !IsNumber(value) { + return fmt.Errorf("invalid range operations") + } + if IsInteger(value) { + value = NewFloat(float64(value.GetInt64Val())) + } + } + return nil +} + +func checkContainsElement(columnExpr *ExprWithType, op planpb.JSONContainsExpr_JSONOp, elementValue *planpb.GenericValue) error { + if op != planpb.JSONContainsExpr_Contains && elementValue.GetArrayVal() == nil { + return fmt.Errorf("%s operation element must be an array", op.String()) + } + + if typeutil.IsArrayType(columnExpr.expr.GetColumnExpr().GetInfo().GetDataType()) { + var elements []*planpb.GenericValue + if op == planpb.JSONContainsExpr_Contains { + elements = []*planpb.GenericValue{elementValue} + } else { + elements = elementValue.GetArrayVal().GetArray() + } + for _, value := range elements { + valExpr := toValueExpr(value) + if !canBeCompared(columnExpr, valExpr) { + return fmt.Errorf("%s operation can't compare between array element type: %s and %s", + op.String(), + columnExpr.expr.GetColumnExpr().GetInfo().GetElementType(), + valExpr.dataType) + } + } + } + return nil +} + +func parseJSONValue(value interface{}) (*planpb.GenericValue, schemapb.DataType, error) { + switch v := value.(type) { + case json.Number: + if intValue, err := v.Int64(); err == nil { + return NewInt(intValue), schemapb.DataType_Int64, nil + } else if floatValue, err := v.Float64(); err == nil { + return NewFloat(floatValue), schemapb.DataType_Double, nil + } else { + return nil, schemapb.DataType_None, fmt.Errorf("%v is a number, but couldn't convert it", value) + } + case string: + return NewString(v), schemapb.DataType_String, nil + case bool: + return NewBool(v), schemapb.DataType_Bool, nil + case []interface{}: + arrayElements := make([]*planpb.GenericValue, len(v)) + dataType := schemapb.DataType_None + sameType := true + for i, elem := range v { + ev, dt, err := parseJSONValue(elem) + if err != nil { + return nil, schemapb.DataType_None, err + } + if dataType == schemapb.DataType_None { + dataType = dt + } else if dataType != dt { + sameType = false + } + arrayElements[i] = ev + } + return &planpb.GenericValue{ + Val: &planpb.GenericValue_ArrayVal{ + ArrayVal: &planpb.Array{ + Array: arrayElements, + SameType: sameType, + ElementType: dataType, + }, + }, + }, schemapb.DataType_Array, nil + default: + return nil, schemapb.DataType_None, fmt.Errorf("%v is of unknown type: %T\n", value, v) + } +} diff --git a/internal/proto/plan.proto b/internal/proto/plan.proto index 16ed9aee2b184..d5c71f85c0b4b 100644 --- a/internal/proto/plan.proto +++ b/internal/proto/plan.proto @@ -89,12 +89,14 @@ message ExistsExpr { message ValueExpr { GenericValue value = 1; + string placeholder_name = 2; } message UnaryRangeExpr { ColumnInfo column_info = 1; OpType op = 2; GenericValue value = 3; + string placeholder_name = 4; } message BinaryRangeExpr { @@ -103,6 +105,8 @@ message BinaryRangeExpr { bool upper_inclusive = 3; GenericValue lower_value = 4; GenericValue upper_value = 5; + string lower_placeholder_name = 6; + string upper_placeholder_name = 7; } message CompareExpr { @@ -115,6 +119,7 @@ message TermExpr { ColumnInfo column_info = 1; repeated GenericValue values = 2; bool is_in_field = 3; + string placeholder_name = 4; } message JSONContainsExpr { @@ -132,6 +137,7 @@ message JSONContainsExpr { } JSONOp op = 3; bool elements_same_type = 4; + string placeholder_name = 5; } message UnaryExpr { @@ -172,6 +178,8 @@ message BinaryArithOpEvalRangeExpr { GenericValue right_operand = 3; OpType op = 4; GenericValue value = 5; + string operand_placeholder_name = 6; + string value_placeholder_name = 7; } message AlwaysTrueExpr {} @@ -192,6 +200,7 @@ message Expr { AlwaysTrueExpr always_true_expr = 12; JSONContainsExpr json_contains_expr = 13; }; + bool need_fill_placeholder = 20; } message VectorANNS { diff --git a/internal/proxy/task.go b/internal/proxy/task.go index 850bbd25fdfd5..4bc1695fd663e 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -62,6 +62,7 @@ const ( NQKey = "nq" MetricTypeKey = common.MetricTypeKey SearchParamsKey = "params" + ExprParamsKey = "expr_params" RoundDecimalKey = "round_decimal" OffsetKey = "offset" LimitKey = "limit" diff --git a/internal/proxy/task_delete.go b/internal/proxy/task_delete.go index 494fcf4256d6b..efa5ac3eb872b 100644 --- a/internal/proxy/task_delete.go +++ b/internal/proxy/task_delete.go @@ -372,7 +372,7 @@ func (dr *deleteRunner) Init(ctx context.Context) error { } func (dr *deleteRunner) Run(ctx context.Context) error { - plan, err := planparserv2.CreateRetrievePlan(dr.schema.schemaHelper, dr.req.GetExpr()) + plan, err := planparserv2.CreateRetrievePlan(dr.schema.schemaHelper, dr.req.GetExpr(), dr.req.GetExpressionValues()...) if err != nil { return merr.WrapErrAsInputError(merr.WrapErrParameterInvalidMsg("failed to create delete plan: %v", err)) } diff --git a/internal/proxy/task_query.go b/internal/proxy/task_query.go index 8188274259de0..9dbb8d3518ef3 100644 --- a/internal/proxy/task_query.go +++ b/internal/proxy/task_query.go @@ -212,7 +212,7 @@ func matchCountRule(outputs []string) bool { return len(outputs) == 1 && strings.ToLower(strings.TrimSpace(outputs[0])) == "count(*)" } -func createCntPlan(expr string, schemaHelper *typeutil.SchemaHelper) (*planpb.PlanNode, error) { +func createCntPlan(expr string, schemaHelper *typeutil.SchemaHelper, expressionValues []*schemapb.FieldData) (*planpb.PlanNode, error) { if expr == "" { return &planpb.PlanNode{ Node: &planpb.PlanNode_Query{ @@ -223,8 +223,7 @@ func createCntPlan(expr string, schemaHelper *typeutil.SchemaHelper) (*planpb.Pl }, }, nil } - - plan, err := planparserv2.CreateRetrievePlan(schemaHelper, expr) + plan, err := planparserv2.CreateRetrievePlan(schemaHelper, expr, expressionValues...) if err != nil { return nil, merr.WrapErrAsInputError(merr.WrapErrParameterInvalidMsg("failed to create query plan: %v", err)) } @@ -240,7 +239,7 @@ func (t *queryTask) createPlan(ctx context.Context) error { cntMatch := matchCountRule(t.request.GetOutputFields()) if cntMatch { var err error - t.plan, err = createCntPlan(t.request.GetExpr(), schema.schemaHelper) + t.plan, err = createCntPlan(t.request.GetExpr(), schema.schemaHelper, t.request.GetExpressionValues()) t.userOutputFields = []string{"count(*)"} return err } diff --git a/internal/proxy/task_search.go b/internal/proxy/task_search.go index 4e14c7b938717..3755995cd33d1 100644 --- a/internal/proxy/task_search.go +++ b/internal/proxy/task_search.go @@ -522,7 +522,7 @@ func (t *searchTask) tryGeneratePlan(params []*commonpb.KeyValuePair, dsl string } searchInfo.planInfo.QueryFieldId = annField.GetFieldID() - plan, planErr := planparserv2.CreateSearchPlan(t.schema.schemaHelper, dsl, annsFieldName, searchInfo.planInfo) + plan, planErr := planparserv2.CreateSearchPlan(t.schema.schemaHelper, dsl, annsFieldName, searchInfo.planInfo, t.request.GetExpressionValues()...) if planErr != nil { log.Warn("failed to create query plan", zap.Error(planErr), zap.String("dsl", dsl), // may be very large if large term passed.