Skip to content

Commit

Permalink
Merge stage/v6.3.3 into main (#1055)
Browse files Browse the repository at this point in the history
* set  ff to true for 6.3.0 migration file (#999)

* CySQL Updates (#1005)

* feat: BED-5146 - support toString and toInt

* feat: BED-5130 - support instant type components epochseconds and epocmillis for datetimes

* fix: BED-5149, BED-5148 - implement cypher size function and rework type inference handling

* fix: BED-5138 - apply dangling constraints to projection select for all shortest path queries

* fix: BED-5130 - use numeric type casts to ensure that no loss of precision takes place

* fix: BED-5154 - switch entity references in translation to int8[] and index values to int (#1006)

* BED-5172: Update crypto version (#1013) (#1027)

Co-authored-by: Wesley Miller <[email protected]>

* chore: integration testing portability enhancement and schema cleanup (#1024)

* chore: introduce harness initializer that uses the GraphTestHarness interface for harness setup

* chore: fix typo and some cleanup

* NewADContainer

* add logic to add tierzero property for test ADUsers

* add nil check

* add tenantID property when creating new azure tenant

* chore: remove unimplemented edges from schema for better testing alignment

---------

Co-authored-by: Brandon Shearin <[email protected]>

* CySQL Support and fixes (#1020)

* feat: BED-5159 - support coalesce function

* fix: BED-5173 - use correct pgsql regex operator

* chore: BED-5168 - enable schema manager to act independently to allow inline kind lookups and asserts in select parts of dawgs

* chore: BED-5168 - update schema manager calls to support looking up the latest information in the database if there is a kind lookup failure

* chore: BED-5168 - prepare for review

* BED-5236 - Break on Errors During Ingest Decoding (#1050)

* fix: BED-5236 - break on error during decoding, including unexpected EOF errors

* BED-5204: Resolve CVE-2024-45338 (#1031)

* fix: CVE fixed by bumping Cuelang to latest (CVE was an indirect import from cue)

* chore: add missing license headers

* fix: bump x/net the rest of the way to v0.33.0

---------

Co-authored-by: Alyx Holms <[email protected]>

* CySQL Fixes and Updates (#1049)

* chore: BED-5201 - PG cleanup and type checking tests

* fix: BED-5185

* fix: BED-5193, BED-5171

* fix: BED-5192

* chore: prepare for codereview

* chore: BED-5192 - fixup additional edge cases

* CySQL Fix Poor Type Negotiation for []graph.ID Parameters (#1054)

* fix: BED-5255 avoid panic prone caching logic

* fix: BED-5256 fix []uint64 negotiation for parameters

---------

Co-authored-by: Arianna Cooper <[email protected]>
Co-authored-by: Ulises Rangel <[email protected]>
Co-authored-by: Wesley Miller <[email protected]>
Co-authored-by: Brandon Shearin <[email protected]>
Co-authored-by: Alyx Holms <[email protected]>
  • Loading branch information
6 people authored Jan 7, 2025
1 parent 4d2bdd7 commit 19287fe
Show file tree
Hide file tree
Showing 15 changed files with 763 additions and 243 deletions.
3 changes: 3 additions & 0 deletions cmd/api/src/daemons/datapipe/decoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func decodeGroupData(batch graph.Batch, reader io.ReadSeeker) error {
if errors.Is(err, io.EOF) {
break
}
return err
} else {
count++
convertGroupData(group, &convertedData)
Expand Down Expand Up @@ -138,6 +139,7 @@ func decodeSessionData(batch graph.Batch, reader io.ReadSeeker) error {
if errors.Is(err, io.EOF) {
break
}
return err
} else {
count++
convertSessionData(session, &convertedData)
Expand Down Expand Up @@ -179,6 +181,7 @@ func decodeAzureData(batch graph.Batch, reader io.ReadSeeker) error {
if errors.Is(err, io.EOF) {
break
}
return err
} else {
convert := getKindConverter(data.Kind)
convert(data.Data, &convertedData)
Expand Down
12 changes: 11 additions & 1 deletion packages/go/cypher/models/pgsql/format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,17 @@ func formatNode(builder *OutputBuilder, rootExpr pgsql.SyntaxNode) error {
exprStack = append(exprStack, *typedNextExpr)

case pgsql.TypeCast:
switch typedNextExpr.Expression.(type) {
switch typedCastedExpr := typedNextExpr.Expression.(type) {
case *pgsql.BinaryExpression:
if typedCastedExpr.Operator == pgsql.OperatorJSONTextField && typedNextExpr.CastType == pgsql.Text {
// Avoid formatting property lookups wrapped in text type casts
exprStack = append(exprStack, typedNextExpr.Expression)
} else {
exprStack = append(exprStack, pgsql.FormattingLiteral(typedNextExpr.CastType), pgsql.FormattingLiteral(")::"))
exprStack = append(exprStack, typedNextExpr.Expression)
exprStack = append(exprStack, pgsql.FormattingLiteral("("))
}

case pgsql.Parenthetical:
// Avoid formatting type-casted parenthetical statements as (('test'))::text - this should instead look like ('test')::text
exprStack = append(exprStack, pgsql.FormattingLiteral(typedNextExpr.CastType), pgsql.FormattingLiteral("::"))
Expand Down
8 changes: 8 additions & 0 deletions packages/go/cypher/models/pgsql/operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ func OperatorIsPropertyLookup(operator Expression) bool {
)
}

func OperatorIsComparator(operator Expression) bool {
return OperatorIsIn(operator,
OperatorEquals, OperatorNotEquals, OperatorGreaterThan, OperatorGreaterThanOrEqualTo, OperatorLessThan,
OperatorLessThanOrEqualTo, OperatorArrayOverlap, OperatorLike, OperatorILike, OperatorPGArrayOverlap,
OperatorRegexMatch, OperatorSimilarTo)
}

const (
UnsetOperator Operator = ""
OperatorUnion Operator = "union"
Expand Down Expand Up @@ -107,6 +114,7 @@ const (
OperatorCypherStartsWith Operator = "starts with"
OperatorCypherContains Operator = "contains"
OperatorCypherEndsWith Operator = "ends with"
OperatorCypherAdd Operator = "+"

OperatorPropertyLookup Operator = "property_lookup"
OperatorKindAssignment Operator = "kind_assignment"
Expand Down
Loading

0 comments on commit 19287fe

Please sign in to comment.