@query-farm/vgi 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3175,7 +3175,7 @@ var TableInfoSchema = schema2([
3175
3175
  field2("cardinality_max", int642(), false),
3176
3176
  field2("column_statistics", binary2(), false),
3177
3177
  field2("bind_result", binary2(), false),
3178
- field2("required_field_filter_paths", list2(field2("item", utf82(), true)), false)
3178
+ field2("required_filters", list2(field2("item", list2(field2("item", utf82(), true)), true)), false)
3179
3179
  ]);
3180
3180
  var ViewInfoSchema = schema2([
3181
3181
  field2("comment", utf82(), true),
@@ -8058,16 +8058,21 @@ class ReadOnlyCatalogInterface extends CatalogInterface {
8058
8058
  const uniqueIndices = resolveIndexGroups(colSchema, t.unique);
8059
8059
  const pkIndices = resolveIndexGroups(colSchema, t.primaryKey);
8060
8060
  const fkBytes = serializeForeignKeys(t.foreignKey, name);
8061
- const requiredFieldFilterPaths = t.requiredFieldFilterPaths ?? [];
8062
- if (requiredFieldFilterPaths.length > 0) {
8061
+ const requiredFilters = t.requiredFilters ?? [];
8062
+ if (requiredFilters.length > 0) {
8063
8063
  const columnNames = new Set(colSchema.fields.map((f) => f.name));
8064
- for (const path2 of requiredFieldFilterPaths) {
8065
- if (!path2) {
8066
- throw new Error(`Table '${t.name}': requiredFieldFilterPaths must not contain empty strings`);
8064
+ for (const group of requiredFilters) {
8065
+ if (!group || group.length === 0) {
8066
+ throw new Error(`Table '${t.name}': requiredFilters must not contain empty groups`);
8067
8067
  }
8068
- const head = path2.split(".", 1)[0];
8069
- if (!columnNames.has(head)) {
8070
- throw new Error(`Table '${t.name}': requiredFieldFilterPaths path '${path2}' references ` + `unknown column '${head}'. Available columns: ${[...columnNames].sort().join(", ")}`);
8068
+ for (const path2 of group) {
8069
+ if (!path2) {
8070
+ throw new Error(`Table '${t.name}': requiredFilters must not contain empty strings`);
8071
+ }
8072
+ const head = path2.split(".", 1)[0];
8073
+ if (!columnNames.has(head)) {
8074
+ throw new Error(`Table '${t.name}': requiredFilters path '${path2}' references ` + `unknown column '${head}'. Available columns: ${[...columnNames].sort().join(", ")}`);
8075
+ }
8071
8076
  }
8072
8077
  }
8073
8078
  }
@@ -8093,7 +8098,7 @@ class ReadOnlyCatalogInterface extends CatalogInterface {
8093
8098
  delete_function: null,
8094
8099
  cardinality_estimate: t.inlinedCardinality ? Number(t.inlinedCardinality.estimate) : null,
8095
8100
  cardinality_max: t.inlinedCardinality ? Number(t.inlinedCardinality.max) : null,
8096
- required_field_filter_paths: requiredFieldFilterPaths
8101
+ required_filters: requiredFilters
8097
8102
  };
8098
8103
  }));
8099
8104
  }
@@ -9369,4 +9374,4 @@ export {
9369
9374
  Arguments
9370
9375
  };
9371
9376
 
9372
- //# debugId=C67D053F70399BE264756E2164756E21
9377
+ //# debugId=520242AE9AD7B67464756E2164756E21