-
Notifications
You must be signed in to change notification settings - Fork 525
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
Support graph read mode and set/list aggregate property #1332
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c2b590f
add GraphReadMode
zhoney 3848ae6
support OLAP property key
zhoney a953400
support aggregate type set and list
zhoney e5f417c
update tests for olap property key
zhoney 7bfc0a3
upgrade api version to 0.59
zhoney 64f0e04
add ReadFrequency
zhoney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,4 +190,4 @@ private SchemaElement schemaElement() { | |
"Invalid HugeType '%s' for rebuild", type)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,12 +45,14 @@ public class PropertyKey extends SchemaElement implements Propfiable { | |
private DataType dataType; | ||
private Cardinality cardinality; | ||
private AggregateType aggregateType; | ||
private boolean olap; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer define enum ReadFrequency include OLTP and OLAP, maybe we'll add OLTP_COLD in the future |
||
|
||
public PropertyKey(final HugeGraph graph, Id id, String name) { | ||
super(graph, id, name); | ||
this.dataType = DataType.TEXT; | ||
this.cardinality = Cardinality.SINGLE; | ||
this.aggregateType = AggregateType.NONE; | ||
this.olap = false; | ||
} | ||
|
||
@Override | ||
|
@@ -82,6 +84,14 @@ public void aggregateType(AggregateType aggregateType) { | |
this.aggregateType = aggregateType; | ||
} | ||
|
||
public void olap(boolean olap) { | ||
this.olap = olap; | ||
} | ||
|
||
public boolean olap() { | ||
return this.olap; | ||
} | ||
|
||
@Override | ||
public Set<Id> properties() { | ||
return Collections.emptySet(); | ||
|
@@ -108,7 +118,8 @@ public boolean hasSameContent(PropertyKey other) { | |
return super.hasSameContent(other) && | ||
this.dataType == other.dataType() && | ||
this.cardinality == other.cardinality() && | ||
this.aggregateType == other.aggregateType(); | ||
this.aggregateType == other.aggregateType() && | ||
this.olap == other.olap(); | ||
} | ||
|
||
public String clazz() { | ||
|
@@ -370,6 +381,12 @@ public interface Builder extends SchemaBuilder<PropertyKey> { | |
|
||
Builder calcOld(); | ||
|
||
Builder calcSet(); | ||
|
||
Builder calcList(); | ||
|
||
Builder olap(boolean olap); | ||
|
||
Builder cardinality(Cardinality cardinality); | ||
|
||
Builder dataType(DataType dataType); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readMode