Skip to content

Conversation

@DvirDukhan
Copy link
Contributor

DO NOT MERGE YET!!!!!

added support for array

@DvirDukhan DvirDukhan requested a review from gkorland August 12, 2019 07:17
Copy link
Contributor

@gkorland gkorland left a comment

Choose a reason for hiding this comment

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

@DvirDukhan so why did you mark me to review?

}

private List<Object> deserializeArray(Object rawScalarData) {
List<Object> res = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

List<Object> res = new ArrayList<>(array.length());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Deprecated
public ResultSet.ResultSetScalarTypes getType() {
if (type.ordinal() >= 6 && type.ordinal() < 12){
return ResultSet.ResultSetScalarTypes.values()[type.ordinal()-6];
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be like setType, adding 6 to the deprecated types rather than the other way around?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in setType, you add 6 to the deprecated types and get the valid type
in getType, which is a deprecated call, the caller expects deprecated type.

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be better

type.ordinal() > ResultSet.ResultSetScalarTypes.PROPERTY_DOUBLE.ordinal()

Copy link
Contributor

@jeffreylovitz jeffreylovitz left a comment

Choose a reason for hiding this comment

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

Are the enum values of ResultSetScalarTypes ever user-accessible? I think that this deprecation logic is likely overkill, as the enum names have changed but the values have merely been extended. Let's discuss this on Monday!

*/
public interface ResultSet extends Iterator<Record> {

@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

you should add JDoc @Deprecated use ... instead

@Deprecated
public Property(String name, ResultSet.ResultSetScalarTypes type, Object value) {
this.name = name;
this.type = type;
Copy link
Contributor

Choose a reason for hiding this comment

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

don't you just want to convert from ResultSetScalarTypes to ResultSetValueTypes and avoid this second valueType field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this still relevant?

@Deprecated
public ResultSet.ResultSetScalarTypes getType() {
if (type.ordinal() >= 6 && type.ordinal() < 12){
return ResultSet.ResultSetScalarTypes.values()[type.ordinal()-6];
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be better

type.ordinal() > ResultSet.ResultSetScalarTypes.PROPERTY_DOUBLE.ordinal()

@codecov
Copy link

codecov bot commented Sep 5, 2019

Codecov Report

Merging #46 into master will increase coverage by 0.24%.
The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage    75.9%   76.15%   +0.24%     
==========================================
  Files          20       20              
  Lines         469      478       +9     
  Branches       72       74       +2     
==========================================
+ Hits          356      364       +8     
  Misses         85       85              
- Partials       28       29       +1
Impacted Files Coverage Δ
...dislabs/redisgraph/graph_entities/GraphEntity.java 55% <0%> (ø) ⬆️
.../redislabs/redisgraph/graph_entities/Property.java 73.91% <50%> (-1.09%) ⬇️
...slabs/redisgraph/impl/resultset/ResultSetImpl.java 81.55% <90.9%> (+0.5%) ⬆️
...edisgraph/impl/resultset/ResultSetScalarTypes.java 92.3% <92.3%> (ø)

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 3f3167d...4b9ba50. Read the comment docs.

@DvirDukhan DvirDukhan merged commit 42f4766 into master Sep 5, 2019
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.

4 participants