File tree Expand file tree Collapse file tree 7 files changed +29
-15
lines changed
document-store/src/main/java/org/hypertrace/core/documentstore Expand file tree Collapse file tree 7 files changed +29
-15
lines changed Original file line number Diff line number Diff line change 1+ package org .hypertrace .core .documentstore .expression .model ;
2+
3+ public interface Hashable {
4+ @ Override
5+ int hashCode ();
6+
7+ @ Override
8+ boolean equals (final Object object );
9+ }
Original file line number Diff line number Diff line change 11package org .hypertrace .core .documentstore .expression .type ;
22
3+ import org .hypertrace .core .documentstore .expression .model .Hashable ;
34import org .hypertrace .core .documentstore .parser .FilterTypeExpressionVisitor ;
45
56/**
67 * An interface to represent that the expression can be used in either the WHERE clause or the
78 * HAVING clause of the query.
89 */
9- public interface FilterTypeExpression {
10+ public interface FilterTypeExpression extends Hashable {
1011 <T > T accept (final FilterTypeExpressionVisitor visitor );
1112}
Original file line number Diff line number Diff line change 11package org .hypertrace .core .documentstore .expression .type ;
22
3+ import org .hypertrace .core .documentstore .expression .model .Hashable ;
34import org .hypertrace .core .documentstore .parser .FromTypeExpressionVisitor ;
45
56/**
67 * Expression to retrieve rows from the referenced tables Implementations can perform table
78 * functions, join, lateral subqueries
89 */
9- public interface FromTypeExpression {
10+ public interface FromTypeExpression extends Hashable {
1011 <T > T accept (final FromTypeExpressionVisitor visitor );
1112}
Original file line number Diff line number Diff line change 11package org .hypertrace .core .documentstore .expression .type ;
22
3+ import org .hypertrace .core .documentstore .expression .model .Hashable ;
34import org .hypertrace .core .documentstore .parser .GroupTypeExpressionVisitor ;
45
56/**
67 * An interface to represent that the expression can be used in the GROUP BY clause of the query.
78 */
8- public interface GroupTypeExpression {
9+ public interface GroupTypeExpression extends Hashable {
910 <T > T accept (final GroupTypeExpressionVisitor visitor );
1011}
Original file line number Diff line number Diff line change 11package org .hypertrace .core .documentstore .expression .type ;
22
3+ import org .hypertrace .core .documentstore .expression .model .Hashable ;
34import org .hypertrace .core .documentstore .parser .SelectTypeExpressionVisitor ;
45
56/** An interface to represent that the expression can be used in the SELECT clause of the query. */
6- public interface SelectTypeExpression {
7+ public interface SelectTypeExpression extends Hashable {
78 <T > T accept (final SelectTypeExpressionVisitor visitor );
89}
Original file line number Diff line number Diff line change 11package org .hypertrace .core .documentstore .expression .type ;
22
3+ import org .hypertrace .core .documentstore .expression .model .Hashable ;
34import org .hypertrace .core .documentstore .parser .SortTypeExpressionVisitor ;
45
56/**
67 * An interface to represent that the expression can be used in the ORDER BY clause of the query.
78 */
8- public interface SortTypeExpression {
9+ public interface SortTypeExpression extends Hashable {
910 <T > T accept (final SortTypeExpressionVisitor visitor );
1011}
Original file line number Diff line number Diff line change 88import lombok .AccessLevel ;
99import lombok .AllArgsConstructor ;
1010import lombok .NoArgsConstructor ;
11- import lombok .ToString ;
11+ import lombok .Value ;
1212import org .apache .commons .collections4 .CollectionUtils ;
1313import org .hypertrace .core .documentstore .expression .operators .SortOrder ;
1414import org .hypertrace .core .documentstore .expression .type .FilterTypeExpression ;
6767 * </code>
6868 */
6969@ AllArgsConstructor (access = AccessLevel .PACKAGE )
70- @ ToString
71- public final class Query {
72- private final Selection selection ; // Missing selection represents fetching all the columns
73- private final Filter filter ;
74- private final Aggregation aggregation ;
75- private final Filter aggregationFilter ;
76- private final Sort sort ;
77- private final Pagination pagination ; // Missing pagination represents fetching all the records
78- private final FromClause fromClause ;
70+ @ Value
71+ public class Query {
72+ Selection selection ; // Missing selection represents fetching all the columns
73+ Filter filter ;
74+ Aggregation aggregation ;
75+ Filter aggregationFilter ;
76+ Sort sort ;
77+ Pagination pagination ; // Missing pagination represents fetching all the records
78+ FromClause fromClause ;
7979
8080 public List <SelectionSpec > getSelections () {
8181 return selection == null ? emptyList () : unmodifiableList (selection .getSelectionSpecs ());
You can’t perform that action at this time.
0 commit comments