问题
I've seen it being written in multiple sources that it is perfectly normal, with Cassandra, to store data in the column name, while leaving the column value empty. I'm not sure I completely understand how that's possible. Can anyone throw more light on this, preferably with an example schema?
回答1:
No, not any more. This used to be possible. It required the old (pre-3.x storage engine) and use of a Thrift-based API. But tables built with CQL (and the new storage engine) require all columns to be defined-up front, and do not allow it at runtime (at least, not in the same way that Thrift did).
The article referenced above is dated 2015, when this was still possible. Apache Cassandra is one of those techs that has changed a lot in a short time, quickly out-dating once accepted practices and recommendations.
来源:https://stackoverflow.com/questions/63380973/in-cassandra-how-is-it-possible-to-save-data-in-a-column-name-while-leaving-the