fix(tdengine): group subtables under super tables
This commit is contained in:
15 files changed
+521
-39
No files matched your search
@@ -197,7 +197,7 @@ public final class MetadataListConstraints {
|
||||
if (upper.contains("MATERIALIZED") && upper.contains("VIEW")) {
|
||||
return "MATERIALIZED_VIEW";
|
||||
}
|
||||
if (upper.equals("BASE_TABLE") || upper.contains("TABLE")) {
|
||||
if (upper.equals("STABLE") || upper.equals("BASE_TABLE") || upper.contains("TABLE")) {
|
||||
return "TABLE";
|
||||
}
|
||||
if (upper.contains("VIEW")) {
|
||||
|
||||
@@ -6,6 +6,8 @@ public final class TableInfo {
|
||||
private String name;
|
||||
private String table_type;
|
||||
private String comment;
|
||||
private String parent_schema;
|
||||
private String parent_name;
|
||||
|
||||
public TableInfo() {
|
||||
this("", "", null);
|
||||
@@ -16,9 +18,15 @@ public final class TableInfo {
|
||||
}
|
||||
|
||||
public TableInfo(String name, String table_type, String comment) {
|
||||
this(name, table_type, comment, null, null);
|
||||
}
|
||||
|
||||
public TableInfo(String name, String table_type, String comment, String parent_schema, String parent_name) {
|
||||
this.name = name;
|
||||
this.table_type = table_type;
|
||||
this.comment = comment;
|
||||
this.parent_schema = parent_schema;
|
||||
this.parent_name = parent_name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -33,6 +41,14 @@ public final class TableInfo {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public String getParent_schema() {
|
||||
return parent_schema;
|
||||
}
|
||||
|
||||
public String getParent_name() {
|
||||
return parent_name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
@@ -45,6 +61,14 @@ public final class TableInfo {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public void setParent_schema(String parent_schema) {
|
||||
this.parent_schema = parent_schema;
|
||||
}
|
||||
|
||||
public void setParent_name(String parent_name) {
|
||||
this.parent_name = parent_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) return true;
|
||||
@@ -52,16 +76,23 @@ public final class TableInfo {
|
||||
TableInfo that = (TableInfo) other;
|
||||
return Objects.equals(name, that.name)
|
||||
&& Objects.equals(table_type, that.table_type)
|
||||
&& Objects.equals(comment, that.comment);
|
||||
&& Objects.equals(comment, that.comment)
|
||||
&& Objects.equals(parent_schema, that.parent_schema)
|
||||
&& Objects.equals(parent_name, that.parent_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, table_type, comment);
|
||||
return Objects.hash(name, table_type, comment, parent_schema, parent_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TableInfo(name=" + name + ", table_type=" + table_type + ", comment=" + comment + ")";
|
||||
return "TableInfo(name=" + name
|
||||
+ ", table_type=" + table_type
|
||||
+ ", comment=" + comment
|
||||
+ ", parent_schema=" + parent_schema
|
||||
+ ", parent_name=" + parent_name
|
||||
+ ")";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user