Comments (4)
@nevillelyh came up an implementation for #1 https://github.com/spotify/magnolify/tree/shameera/case_mapping
Couldn't see a better way to bake this into trait Converter
. if we go this path, we have to update the all necessary *Type.
case class Track(trackId: Int, trackName: String)
val aft = AvroType[Track](toSnakeCase)
from magnolify.
New WIP branch: https://github.com/spotify/magnolify/tree/case-mapper
from magnolify.
Did some basic benchmark. Mostly Ok but AvroBench.avroTo
seems way off.
master:
[info] AvroBench.avroFrom avgt 10 1968.186 ± 99.247 ns/op
[info] AvroBench.avroSchmea avgt 10 6843.803 ± 115.318 ns/op
[info] AvroBench.avroTo avgt 10 72808.144 ± 881.913 ns/op
[info] TableRowBench.tableRowFrom avgt 10 9746.518 ± 174.121 ns/op
[info] TableRowBench.tableRowSchema avgt 10 23132.630 ± 276.478 ns/op
[info] TableRowBench.tableRowTo avgt 10 11080.110 ± 153.466 ns/op
identity
mapper:
[info] AvroBench.avroFrom avgt 10 1942.699 ± 47.263 ns/op
[info] AvroBench.avroSchmea avgt 10 6834.892 ± 155.658 ns/op
[info] AvroBench.avroTo avgt 10 273955.338 ± 25053.639 ns/op
[info] TableRowBench.tableRowFrom avgt 10 9822.360 ± 129.232 ns/op
[info] TableRowBench.tableRowSchema avgt 10 22818.333 ± 192.875 ns/op
[info] TableRowBench.tableRowTo avgt 10 11765.242 ± 83.626 ns/op
from magnolify.
After adding schema cache:
[info] Benchmark Mode Cnt Score Error Units
[info] AvroBench.avroFrom avgt 5 1736.875 ± 30.571 ns/op
[info] AvroBench.avroSchmea avgt 5 6780.416 ± 223.390 ns/op
[info] AvroBench.avroTo avgt 5 5370.960 ± 323.343 ns/op
[info] TableRowBench.tableRowFrom avgt 5 10015.674 ± 407.268 ns/op
[info] TableRowBench.tableRowSchema avgt 5 22828.502 ± 564.830 ns/op
[info] TableRowBench.tableRowTo avgt 5 11300.360 ± 308.394 ns/op
from magnolify.
Related Issues (20)
- outlook to a release with the magnolia 1.1.2 ? HOT 2
- Force users to explicitly enable auto typeclass derivation
- Scala3 support
- Set cats and scalacheck dependencies as provided
- Neo4j Record support
- Support schema annotations for magnolify-parquet HOT 1
- Build with java 17
- magnolify.bigtable.ByteStringComparator is built with Java 11 since 0.4.7 release
- Publish docs as a GH site
- Enum implicit taken instead of typeclass derivation HOT 2
- Set avro.java.String property in magnolify-avro schema derivation? HOT 1
- Add support of Joda-time types to all magnolify modules
- Support ByteBuffer derivations? HOT 1
- Neo4J documentation
- Rework AvroCompat for ParquetType HOT 1
- Replace deprecated usage of `FileDescriptor.Syntax` in ProtobufType
- Remove package object inheritance
- ParquetType throws error writing Optional empty list HOT 1
- Enable dictionary encoding by default for enum ParquetFields
- Support Map schema types in Parquet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magnolify.