[JAVA-2296] Parts of the legacy BSON API do not handle documents containing Decimal128 values Created: 03/Sep/16 Updated: 19/Oct/16 Resolved: 08/Sep/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Chunming Li (Inactive) | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | rc | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
This is using 3.4.0-SNAPSHOT as of today, when decoding a mgo encoded object with decimal128 values.
On the encoding side, the following test case will complain about Can't serialize class org.bson.types.Decimal128.
|
| Comments |
| Comment by Githook User [ 08/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 08/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 08/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Note: this breaks binary compatibility for any implementors of BSONCallback |
| Comment by Jeffrey Yemin [ 06/Sep/16 ] |
|
I've been exploring ways to add support for Decimal128 in the existing BSONDecoder implementations. Two possibilities:
|
| Comment by Chunming Li (Inactive) [ 06/Sep/16 ] |
|
jeff.yemin Unfortunately we do use BasicDBDecoder in a few places. I'm not familiar enough with the 3.0+ driver. What are our alternatives here? |
| Comment by Githook User [ 06/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Note that Decimal128 is NOT supported by BasicBSONDecoder, as that would required the addition of a method to the public intervace BSONCallback. |
| Comment by Jeffrey Yemin [ 06/Sep/16 ] |
|
Hi chunming.li Do you also rely on DefaultDBDecoder to decode DBObject instances that may contain Decimal128 instances? If so, that's going to a problem: BSONCallback is a public API that was not designed for extensibility to new BSON types, so we can't add Decimal128 support there without breaking binary compatibility. |
| Comment by Jeffrey Yemin [ 06/Sep/16 ] |
|
Still need to look at the encoding side |
| Comment by Githook User [ 06/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 06/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 06/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 06/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 06/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |