Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zhoney
Copy link
Contributor

@zhoney zhoney commented Sep 20, 2019

implemented: #691

Change-Id: I861927cfa48407759785534b4045a55e73ef7a00

@JsonProperty("aggregate_type")
private AggregateType aggregateType;

public static final String TOP_N = "~topN";
Copy link
Contributor

Choose a reason for hiding this comment

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

KEY_TOP_N

@JsonProperty("cardinality")
private Cardinality cardinality;
@JsonProperty("aggregate_type")
private AggregateType aggregateType;
Copy link
Contributor

Choose a reason for hiding this comment

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

keep compatible with v0.9:

  1. read schema from v0.9
  2. write schema to v0.9 (optional)

implemented: #691

Change-Id: I861927cfa48407759785534b4045a55e73ef7a00

public PropertyKey create(PropertyKey propertyKey) {
RestResult result = this.client.post(this.path(), propertyKey);
Object pk;
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to pkey

OLD(4, "old");

private byte code = 0;
private String name = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

set final

zhoney added 2 commits October 9, 2019 11:01
Change-Id: I86b1722c8136ef3f974570c847eb3982b6c2dff3
Change-Id: I833b68469984624beac02de1943e71ce19c1c787
@codecov
Copy link

codecov bot commented Oct 12, 2019

Codecov Report

Merging #65 into master will increase coverage by 0.1%.
The diff coverage is 77.04%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master      #65     +/-   ##
===========================================
+ Coverage     75.57%   75.67%   +0.1%     
- Complexity      519      545     +26     
===========================================
  Files            94       95      +1     
  Lines          2321     2376     +55     
  Branches        145      147      +2     
===========================================
+ Hits           1754     1798     +44     
- Misses          464      469      +5     
- Partials        103      109      +6
Impacted Files Coverage Δ Complexity Δ
...in/java/com/baidu/hugegraph/driver/HugeClient.java 63.63% <100%> (ø) 11 <0> (ø) ⬇️
...com/baidu/hugegraph/api/schema/PropertyKeyAPI.java 86.95% <40%> (-13.05%) 8 <1> (ø)
...in/java/com/baidu/hugegraph/client/RestClient.java 71.87% <40%> (-4.8%) 10 <4> (+1)
...du/hugegraph/structure/constant/AggregateType.java 80% <80%> (ø) 21 <21> (?)
.../baidu/hugegraph/structure/schema/PropertyKey.java 78.31% <86.66%> (+7.94%) 7 <3> (+4) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 402276d...4b2ef39. Read the comment docs.

Change-Id: I18a9feafcd3500df17a8f1111b6abfda6a1c76f4
Change-Id: I403b493f8f5e474ddaa0817959ff7c3637cf048c
Change-Id: I47c289156de3dddd32426964ff544ed25c28706c
Change-Id: I6893f9825685a2d632316ff022d50aa0e956831b
Change-Id: I0db89db7362580e2c5e18f2b9cba4b378152db4c
Change-Id: I1c6593b6da87a6417d33a6555337ee6d09483b4d
Change-Id: Ieb0accde80be3ba8511d80f6bb818072121ed6ea
.asText().valueSingle()
.build();
PropertyKey.PropertyKeyV46 pk = propertyKey.switchV46();
Assert.assertEquals("nameV46", pk.name());
Copy link
Contributor

Choose a reason for hiding this comment

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

add more assert for other fields

Assert.assertTrue(propertyKey.aggregateType().isNumber());

propertyKey = schema().propertyKey("nameV46")
.asText().valueSingle()
Copy link
Contributor

Choose a reason for hiding this comment

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

align

String apiVersion = this.apiVersion == null ?
null : this.apiVersion.get();
if (apiVersion != null && !VersionUtil.gte(apiVersion, minVersion)) {
if (this.ltApiVersion(minVersion)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

apiVersionLt(minVersion)

Change-Id: I40eeb529c0897767eeed3246043657df3f0adab2
Change-Id: If7e219f2e59538cda90c9540843184bb84604b7c
@Linary Linary merged commit 3e2ff65 into master Oct 14, 2019
@Linary Linary deleted the aggregate branch October 14, 2019 03:00
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