Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public Void visitLength(Length length, CollectorContext context) {
&& context.accessPathBuilder.isEmpty()) {
CollectorContext offsetContext =
new CollectorContext(context.statementContext, context.bottomFilter);
offsetContext.accessPathBuilder.addSuffix(AccessPathInfo.ACCESS_STRING_OFFSET);
offsetContext.accessPathBuilder.addSuffix(AccessPathInfo.ACCESS_OFFSET);
return arg.accept(this, offsetContext);
}
// fall through to default (recurse into children with fresh contexts)
Expand All @@ -219,7 +219,7 @@ public Void visitMapSize(MapSize mapSize, CollectorContext context) {
if (argType.isMapType() && context.accessPathBuilder.isEmpty()) {
CollectorContext offsetContext =
new CollectorContext(context.statementContext, context.bottomFilter);
offsetContext.accessPathBuilder.addSuffix(AccessPathInfo.ACCESS_STRING_OFFSET);
offsetContext.accessPathBuilder.addSuffix(AccessPathInfo.ACCESS_OFFSET);
return arg.accept(this, offsetContext);
}
return visit(mapSize, context);
Expand All @@ -234,7 +234,7 @@ public Void visitCardinality(Cardinality cardinality, CollectorContext context)
if ((argType.isArrayType() || argType.isMapType()) && context.accessPathBuilder.isEmpty()) {
CollectorContext offsetContext =
new CollectorContext(context.statementContext, context.bottomFilter);
offsetContext.accessPathBuilder.addSuffix(AccessPathInfo.ACCESS_STRING_OFFSET);
offsetContext.accessPathBuilder.addSuffix(AccessPathInfo.ACCESS_OFFSET);
// cardinality(map_keys(m)) == cardinality(m) == cardinality(map_values(m)):
// all three count map entries, so emit the same [map_col, OFFSET] path.
Expression effectiveArg = (arg instanceof MapKeys || arg instanceof MapValues)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AccessPathInfo {
public static final String ACCESS_MAP_VALUES = "VALUES";
// Suffix appended to a string-column path to indicate that only the offset array
// (not the char data) is needed — agreed with BE as the special path component name.
public static final String ACCESS_STRING_OFFSET = "OFFSET";
public static final String ACCESS_OFFSET = "OFFSET";
// Suffix appended to a column path to indicate that only the null flag
// (not the actual data) is needed — used when the column is only accessed via IS NULL / IS NOT NULL.
public static final String ACCESS_NULL = "NULL";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,6 @@ private static boolean isDataSkippingOnlyAccessPath(List<String> path) {
}
String lastComponent = path.get(path.size() - 1);
return AccessPathInfo.ACCESS_NULL.equals(lastComponent)
|| AccessPathInfo.ACCESS_STRING_OFFSET.equals(lastComponent);
|| AccessPathInfo.ACCESS_OFFSET.equals(lastComponent);
}
}
Loading
Loading