Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add divide, multiply, remainder and pow to the Math Operators. #3153

Merged

Conversation

MacondoExpress
Copy link
Contributor

Description

Add divide, multiply, remainder and pow to the Math Operators.

Complexity

Complexity: Low

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • TCK tests have been updated
  • Integration tests have been updated
  • Example applications have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed

@changeset-bot
Copy link

changeset-bot bot commented Apr 4, 2023

🦋 Changeset detected

Latest commit: 905758f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@neo4j/cypher-builder Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@MacondoExpress MacondoExpress changed the title Cypher builder/math operators Add divide, multiply, remainder and pow to the Math Operators. Apr 4, 2023
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration .github/workflows/pull-requests.yml:code-scanning. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@neo4j-team-graphql
Copy link
Collaborator

neo4j-team-graphql commented Apr 4, 2023

Performance Report

No Performance Changes

Show Full Table
name dbHits old dbHits time (ms) old time (ms) maxRows
aggregations.TopLevelAggregate 3403 3403 33 40 1134
aggregations.NestedAggregation 14551 14551 77 90 2174
aggregations.AggregationWithWhere 11979 11979 44 65 2174
aggregations.AggregationWhereWithinNestedRelationships 22116987 22116987 2828 2886 2008534
aggregations.AggregationWhereWithinNestedConnections 22116987 22116987 2838 2917 2008534
aggregations.NestedCountFromMovieToActors 9734 9734 37 52 2174
aggregations.NestedCountFromActorsToMovie 9937 9937 43 49 2174
aggregations.DeeplyNestedCount 13070331 13070331 4220 4225 2008534
batch-create.BatchCreate 4200 4200 237 220 600
connect.createAndConnect 14424 14424 299 216 3003
connections.Connection 14082 14082 50 59 2174
connections.NestedConnection 41462 41462 131 135 4516
connections.ConnectionWithSort 2282 2282 61 69 1040
connections.ConnectionWithSortAndCypher 2282 2282 184 308 1040
create.SimpleMutation 7 7 55 63 1
cypher-directive.TopLevelCypherDirective 116092 116092 573 637 12241
cypher-directive.TopLevelCypherDirectiveWithColumnName 147609 147609 163 184 12241
delete.SimpleDelete 19401 19401 221 393 1040
delete.NestedDeleteInUpdate 22544 22544 130 185 2040
2925.SingleRelationshipFilter 6468 6468 35 47 1040
2925.NestedSingleRelationshipFilter 22900 22900 66 140 2174
2925.SingleRelationshipRequiredFilter 3450 3450 57 31 1134
2925.NestedSingleRelationshipRequiredFilter 9383 9383 45 81 1040
query.SimpleQuery 15160 15160 42 66 2174
query.QueryWhere 9699 9704 32 54 2163
query.SimpleQueryWithNestedWhere 9877 9882 48 67 2163
query.Nested 10092037 10092037 9873 10409 2008534
query.NestedWithFilter 40401 40401 102 106 4511
query.OrFilterOnRelationships 42733 43731 163 235 1660
query.OrFilterOnRelationshipsAndNested 36433 37197 225 236 1660
query.QueryWithNestedIn 13499 14271 86 64 1250
query.NestedConnectionWhere 9834 9834 49 83 2174
query.DeeplyNestedConnectionWhere 10029 10005 74 177 2174
query.DeeplyNestedWithRelationshipFilters 19278 19224 122 184 1646
query.NestedWithRelationshipSingleFilters 3024400 3024400 590 648 1003942
query.Fulltext 96 96 26 28 16
query.FulltextWithNestedQuery 587 587 49 44 84
sorting.SortMultipleTypes 2513 2513 62 69 1040
sorting.SortMultipleTypesWithCypherWithCypher 1458 1494 170 264 1040
sorting.SortOnNestedFields 14082 14082 48 62 2174
sorting.SortDeeplyNestedFields 42196 42196 92 102 4516
sorting.SortWithTopLevelCypher 2119 2119 116 217 1040
unions.SimpleUnionQuery 321 321 61 66 35
unions.SimpleUnionQueryWithMissingFields 293 293 59 101 35
unions.NestedUnion 410637 410637 285 422 33033
unions.NestedUnionWithMissingFields 384611 384611 273 304 33033
update.NestedUpdate 2119 2119 69 75 1040

Old Schema Generation: 39.574s
Schema Generation: 39.303s
Old Subgraph Schema Generation: 55.373s
Subgraph Schema Generation: 54.320s

@angrykoala
Copy link
Member

Another thing that we should look is at having the unary minus Cypher.minus(Cypher.param(1))

@MacondoExpress
Copy link
Contributor Author

Another thing that we should look is at having the unary minus Cypher.minus(Cypher.param(1))

Absolutely, we have to address the unary operators and the grouping before 1.x IMO!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants