Use a better and consistent naming conventions for source properties #4158
Replies: 3 comments
-
Personally, I am inclined toward pg's style. |
Beta Was this translation helpful? Give feedback.
-
Either LGTM. I guess Flink's style is inspired by Java properties file. Anyway, Flink SQL is built on Flink so they must share lots of components. One thing that I totally agree with is that in our style the dot should be replaced with underscore, e.g. |
Beta Was this translation helpful? Give feedback.
-
I just found some strange things 🤣
The dots should be used as a separator for module/components (like packages) instead of "space", so the correct name is
|
Beta Was this translation helpful? Give feedback.
-
I’d like to start a discussion about the property style, although it may introduce some breaking change, it’s very important and it will be much harder if we do it in the future.
Why it’s important?
The properties (aka storage parameter) is the
WITH
clause defined by ourselves in some DDL.As soon as our users try to get started with RisingWave, they have to create a source and use some properties. If the name conventions are very weird or inconsistent, it will give users a poor impression even before they use RisingWave.
What's the current state?
I'm not sure where our current style refer from, but I guess it's from FlinkSQL. Unfortunately, it seems that currently we mixed many styles and even some mistakes by ourselves.
Why all properties are prefixed by the connector name?
Our naming of kafka source is almost same as FlinkSQL, but always prefixed with kafka:
FlinkSQL example:
Our example:
So why?
Some connectors use dot as separator
In DataGen and Nexmark source, they may refer to kafka example but misunderstood that the dot is used as a separator. The dot is represented as a sub-field operator but not a separator. For example, in FlinkSQL, they have a property scan.topic-partition-discovery.interval, so the below property names are definitely wrong:
I guess it may be very weired for native speakers.
Why mixing dot and underscore?
We use
.
as sub-field operator and_
as separator, e.g.kinesis.credentials.session_token
, which I can't find any reference.There are three projects we can find and refer to:
.
as sub-field operator and-
as separator, e.g.scan.topic-partition-discovery.interval
_
, e.g.topic_metadata_refresh_interval_ms
_
, e.g.autovacuum_vacuum_cost_delay
, but use.
for toast table.What should we do?
We have few users in production now and IMHO the breaking changes are acceptable. We should choose one option and write some guides for it. Every reviewer of the connector module and the doc team should be fully aware of the guide and introduce new properties carefully.
Beta Was this translation helpful? Give feedback.
All reactions