Skip to content

Complete syntax sugar for createSchemaTemplate#3407

Closed
bigreybear wants to merge 17 commits intoapache:masterfrom
bigreybear:master
Closed

Complete syntax sugar for createSchemaTemplate#3407
bigreybear wants to merge 17 commits intoapache:masterfrom
bigreybear:master

Conversation

@bigreybear
Copy link
Contributor

No description provided.

@bigreybear bigreybear changed the title Complete syntax suger for createSchemaTemplate Complete syntax sugar for createSchemaTemplate Jun 15, 2021
@coveralls
Copy link

coveralls commented Jun 15, 2021

Coverage Status

Coverage decreased (-0.04%) to 67.887% when pulling aa08c7b on bigreybear:master into 42448cb on apache:master.

@HTHou
Copy link
Contributor

HTHou commented Jun 17, 2021

Any api javaDoc?
It's a little bit hard to understand the design and the usage of these interfaces....

Copy link
Contributor

@HTHou HTHou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the design doc.

void createSchemaTemplate(
String templateName,
List<IMeasurementSchema>
)

VectorMeasurementSchema(String prefixPath, List<String> measurementNames, List<TSDataType> datatypes, List<TSEncoding> encodings)

MeasurementSchema(Sting path, TSDatatype datatype, TSEncoding encoding)

I think you may misunderstand the purpose of this PR.

What you should do in this PR is creating only one new interface createSchemaTemplate.
The IMeasurementSchema is an interface that could be a VectorMeasurementSchema or a MeasurementSchema.

VectorMeasurementSchema(String prefixPath, List<String> measurementNames, List<TSDataType> datatypes, List<TSEncoding> encodings) and MeasurementSchema(Sting path, TSDatatype datatype, TSEncoding encoding) are trying to tell you what informations are in these classes.

You cannot use the singletonList for datatypes and encodings directly.

Copy link
Contributor

@HTHou HTHou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost good to me.
I think we can also add a usage example in alignedTimeseriesSessionExample.

@bigreybear bigreybear closed this Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants