carnival-data / carnival

JVM property graph data unification framework
https://carnival-data.github.io/carnival/
GNU General Public License v3.0
7 stars 2 forks source link

DataTable case sensitive mode #38

Closed augustearth closed 3 years ago

augustearth commented 3 years ago

Currently, the methods that case bare strings as field name and identifier field values coerce the case of the bare string. Field names become upper case, identifier field values become lower case. This is probably the correct default behavior as it is safer in terms of detecting data collisions.

However, FeatureReport, which extends MappedDataTable, is restricted by this behavior. FeatureReport is useful as a class to create data exports that are intended to be imported into other systems. Case coercion is not desirable in this case.

Add a "case-sensitive" flag to DataTable with a default of false. When true, field names and identifier field values are not case-coerced. This would make the data set more dangerous of data integrity, but more flexible.

augustearth commented 3 years ago

There is a wrinkle here. The methods that do the above operations are currently static, which is a problem. They will have to be made instance methods, which of course is a breaking change for client code. Which is acceptable, I suppose, given that there are so many other breaking changes.

augustearth commented 3 years ago

Implemented instance level methods. Breaking changes in here for sure. Also cleaned up the MetaData thing a bit.