Hi all,
I'm attempting to use the `-bigDecimal` codegen option on the following
toy schema so that the code-gen'd field uses `BigDecimal` instead of
`ByteBuffer`:
{
"namespace": "com.foo",
"type": "record",
"name": "Foo",
"fields": [
{
"name": "price",
"type": "bytes",
"logicalType": "decimal",
"precision": 10,
"scale": 2
}
]
}
When I generate code like so
rm -rf com \
&& java -jar avro-tools-1.10.0.jar \
compile -bigDecimal schema Foo.avsc . \
&& grep -E '(setUpdated|setPrice)' com/foo/Foo.java
I get the following:
Input files to compile:
Foo.avsc
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.
public void setPrice(java.nio.ByteBuffer value) {
public com.foo.Foo.Builder setPrice(java.nio.ByteBuffer value) {
(Might want to throw `slf4j-simple` in the runtime dependencies? Or is
avro-tools perhaps meant to be used as a dependency of other tools in
addition to standalone use?)
Anyway, we can see from those setters that it's still using ByteBuffer.
What am I doing wrong?
Thanks for any insight,
Marshall