Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor : ComplexApiDataType - remove properties on the super type that are not common #1601

Open
amorton opened this issue Oct 23, 2024 · 0 comments
Assignees

Comments

@amorton
Copy link
Contributor

amorton commented Oct 23, 2024

Class has

public abstract class ComplexApiDataType implements ApiDataType {
  private final String apiName;
  private final PrimitiveApiDataType keyType;
  private final PrimitiveApiDataType valueType;
  private final int dimension;

Only the valueType is common to all subclasses of complex type, we should move the other properties down to the sub classes.

While here, can we also cache the CQLType returned in

  public DataType getCqlType() {
      return DataTypes.mapOf(
          ApiDataTypeDefs.from(getKeyType()).get().getCqlType(),
          ApiDataTypeDefs.from(getValueType()).get().getCqlType());
    }

(it also uses apiName as a string, we will fix that later I think)

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

No branches or pull requests

2 participants