-
Notifications
You must be signed in to change notification settings - Fork 692
Conversation
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.
Looks good overall!
Can you also update the sample where we use Double price
to use BigDecimal price
?
Looks like there is a compilation error in Firestore module now. Probably has to do with dep version changes.
@@ -91,6 +94,7 @@ | |||
.put(double[].class, AbstractStructReader::getDoubleArray) | |||
.put(long[].class, AbstractStructReader::getLongArray) | |||
.put(boolean[].class, AbstractStructReader::getBooleanArray) | |||
.put(BigDecimal.class, AbstractStructReader::getBigDecimal) |
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.
This looks like a duplicate of the above map, but there's probably some obscure reason for it. :)
+ "FROM trades WHERE ( LOWER(action)=LOWER(@tag0) " | ||
+ "AND ticker=@tag1 ) OR " | ||
+ "( trader_id=@tag2 AND price<@tag3 ) OR ( price>=@tag4 AND id<>NULL AND " | ||
+ "trader_id=NULL AND trader_id LIKE @tag7 AND price=TRUE AND price=FALSE AND " | ||
+ "price>@tag10 AND price<=@tag11 AND price IN UNNEST(@tag12) ) ORDER BY id DESC LIMIT 3"; | ||
+ "price>@tag10 AND price<=@tag11 AND price IN UNNEST(@tag12) " |
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.
price
is actually a perfect field to use BigDecimal
for.
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.
Couple of optional nits, LGTM.
@@ -91,6 +94,7 @@ | |||
.put(double[].class, AbstractStructReader::getDoubleArray) | |||
.put(long[].class, AbstractStructReader::getLongArray) | |||
.put(boolean[].class, AbstractStructReader::getBooleanArray) | |||
.put(BigDecimal.class, AbstractStructReader::getBigDecimal) |
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.
same nit -- should this go before the primitive arrays?
@@ -71,6 +73,7 @@ | |||
.put(double[].class, AbstractStructReader::getDoubleArray) | |||
.put(long[].class, AbstractStructReader::getLongArray) | |||
.put(boolean[].class, AbstractStructReader::getBooleanArray) | |||
.put(BigDecimal.class, AbstractStructReader::getBigDecimal) |
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.
nit: Should this go to before array types?
Codecov Report
@@ Coverage Diff @@
## master #2518 +/- ##
=============================================
+ Coverage 0.00% 74.25% +74.25%
- Complexity 0 2162 +2162
=============================================
Files 267 267
Lines 7755 7760 +5
Branches 0 803 +803
=============================================
+ Hits 0 5762 +5762
- Misses 0 1628 +1628
- Partials 0 370 +370
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
Looks good for Spanner, but can we do the Firestore fix in a separate PR please?
@@ -27,7 +25,20 @@ private Util() { | |||
} | |||
|
|||
public static String extractDatabasePath(String parent) { | |||
return parent.substring(0, StringUtils.ordinalIndexOf(parent, "/", 4)); | |||
//the parent looks like this: projects/{project_id}/databases/{database_id}/... |
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.
This is unrelated. Can we please put it in a separate PR?
…o spanner-numeric-type
Kudos, SonarCloud Quality Gate passed!
|
* Spanner - add NUMERIC type; fixes #2515
fixes #2515