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

Document Data Model & Mongo Query Language #358

Merged
merged 278 commits into from
Oct 28, 2021
Merged

Document Data Model & Mongo Query Language #358

merged 278 commits into from
Oct 28, 2021

Conversation

datomo
Copy link
Member

@datomo datomo commented Aug 29, 2021

This PR introduces the document data model into Polypheny. It combines two main parts in the document data model itself and the MongoDB Query Language.

Document Model

Adds multiple new functions, which enable the document model for document-supported adapters in MongoDB but also non-document-supported adapters.

  • DDL: changes throughout Polypheny to enforce the more dynamic data document model, by adding 2 fixed columns for each dcoumet collection in _id(primary key) and _data (dynamic fields as BSON)

  • DML: LogicalDocuments, which enables different handling of values for document and non-document-supported adapters, as well as remove, replace and rename logic for documents

  • DQL: DOC_QUERY_VALUE and DOC_QUERY_EXCLUDE functions, which enable extracting of the _data field while quering if necessary

  • JSON type: wrapper type for large VARCHAR, which enforces JSON structure on data modification

MongoDB Query Language

Parsing of MongoQL strings to equivalent relational algebra, as well as additional MongoQL specific query functionality like elemMatch or unwind. The used language implemenation follows the MongoDB Query Language reference, a detailed reference can be found on the website

  • MqlParser: JavaCC implemenation of MongoQL input parser
  • MqlToRelConverter: Converting of parsed MongoQL objects to RelNode objects
  • MqlInterface: MongoQL Rest interface, which is used for integration testing and can query Polypheny with MongoQL

Minor Changes

  • MongoDB Adapter: fixed special filter and some array queries
  • Docker Support: Handling some edge-cases if port is already in-use

This PR is the logical counterpart to: Document Data Model & MongoDB Query Language UI

datomo and others added 30 commits June 12, 2021 16:20
Copy link
Member

@vogti vogti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, @datomo, for this PR!

@vogti vogti changed the title Document Data Model & MongoDB Query Language Document Data Model & Mongo Query Language Oct 28, 2021
@vogti vogti merged commit d9d3afa into master Oct 28, 2021
@vogti vogti deleted the document-schema branch October 28, 2021 15:05
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.

2 participants