Skip to content

Commit

Permalink
Merge branch '1573_1570_sql_subquery' into 'develop'
Browse files Browse the repository at this point in the history
Sql subquery - [#1570] [#1573]

See merge request itv-backend/reindexer!1479
  • Loading branch information
reindexer-bot committed Dec 12, 2023
1 parent 8fe18b8 commit cd8628d
Show file tree
Hide file tree
Showing 183 changed files with 9,453 additions and 5,021 deletions.
5 changes: 2 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
Expand All @@ -20,7 +20,7 @@ AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
Expand All @@ -45,7 +45,6 @@ ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
PointerAlignment: Left
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
Expand Down
4 changes: 4 additions & 0 deletions bindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,3 +542,7 @@ func WithPrometheusMetrics() interface{} {
func WithOpenTelemetry() interface{} {
return bindings.OptionOpenTelemetry{EnableTracing: true}
}

func WithStrictJoinHandlers() interface{} {
return bindings.OptionStrictJoinHandlers{EnableStrictJoinHandlers: true}
}
17 changes: 11 additions & 6 deletions bindings/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ const (
INFO = 3
TRACE = 4

AggSum = 0
AggAvg = 1
AggFacet = 2
AggMin = 3
AggMax = 4
AggDistinct = 5
AggSum = 0
AggAvg = 1
AggFacet = 2
AggMin = 3
AggMax = 4
AggDistinct = 5
AggCount = 6
AggCountCached = 7

CollateNone = 0
CollateASCII = 1
Expand Down Expand Up @@ -83,6 +85,9 @@ const (
QueryUpdateFieldV2 = 25
QueryBetweenFieldsCondition = 26
QueryAlwaysFalseCondition = 27
QueryAlwaysTrueCondition = 28
QuerySubQueryCondition = 29
QueryFieldSubQueryCondition = 30

LeftJoin = 0
InnerJoin = 1
Expand Down
5 changes: 3 additions & 2 deletions bindings/cproto/netbuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cproto

import (
"context"
"fmt"
"sync"
"time"

Expand Down Expand Up @@ -103,7 +102,9 @@ func (buf *NetBuffer) close() {
buf.reqID = -1
buf.uid = -1
if err != nil {
fmt.Printf("rx: query close error: %v\n", err)
if logger := buf.conn.owner.GetLogger(); logger != nil {
logger.Printf(bindings.ERROR, "rq: query close error: %v\n", err)
}
}
closeBuf.Free()
}
Expand Down
6 changes: 6 additions & 0 deletions bindings/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ type OptionOpenTelemetry struct {
EnableTracing bool
}

// OptionStrictJoinHandlers - enables join handlers check.
// If enabled, queries without required join handlers or Joinable interface will return error after execution.
type OptionStrictJoinHandlers struct {
EnableStrictJoinHandlers bool
}

type Status struct {
Err error
CProto StatusCProto
Expand Down
40 changes: 40 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# Version 3.21.0 (XX.12.2023)
## Core
- [fea] Added [subqueries](#subqueries-nested-queries) support (`explain` for subqueries will be implement in the next releases)
- [fea] Added backtraces support for Windows platform
- [fea] Added query crash tracker support for Windows platform
- [fix] Added explicit error for aggregations in joined queries
- [fix] Fixed UPDATE-queries for array-indexes with multiple JSON-paths
- [fix] Fixed UPSERT/UPDATE for sparse arrays with null-values
- [fix] Optimized tagsmatcher's updates in UPDATE-queries

## Replication
- [fea] Added some temporary replication fixes for v4-compatibility (one of the next v4 releases will contain v3-v4 compatibility mode for migration)

## Reindexer server
- [fea] Added HTTP DSL for subqueries

## Go connector
- [fea] Added Go API and DSL-convertor for subqueries
- [fea] Changed CJSON-to-object convetrion logic for slices: now the single JSON values and fields with multiple JSON-paths will be concatenated together in the target field
- [fea] Added `WithStrictJoinHandlers`. This option allows to validate JoinHandlers usage in runtime
- [fix] Fixed panic handling in the CJSON deserialization
- [fix] Fixed logging in `cproto`-binding. Error messages will no longer be redirected to stdout instead of user's logger

## Face
- [fea] Saved the scroll position on the sorting
- [fea] Changed the Server ID range
- [fea] Improved the notification about the supported browsers
- [fea] Added the default values to the config form when the default config is using
- [fix] Fixed the wrong redirect to a fake database
- [fix] Fixed the column order changing on the data sorting
- [fix] Fixed the horizontal scroll on the data sorting
- [fix] Fixed the wrong data filtering in the Statistics tables
- [fix] Fixed the modal window with the notification about the JSON-tags clearing
- [fix] Fixed the "+/-" buttons for the inputs
- [fix] Fixed the console issue appeared on the array data sorting
- [fix] Fixed the layout of the Performance page
- [fix] Fixed the pagination buttons
- [fix] Fixed the misprint in Config


# Version 3.20.0 (30.10.2023)
## Core
- [fea] Added crash query report for Update/Delete queries
Expand Down
Loading

0 comments on commit cd8628d

Please sign in to comment.