Skip to content

Commit cbf274e

Browse files
committed
Removed inadvertent changes
1 parent 5e76e5e commit cbf274e

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

document-store/src/main/java/org/hypertrace/core/documentstore/expression/impl/AliasedIdentifierExpression.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
package org.hypertrace.core.documentstore.expression.impl;
22

33
import com.google.common.base.Preconditions;
4-
import lombok.EqualsAndHashCode;
54
import lombok.Value;
65
import org.hypertrace.core.documentstore.parser.SelectTypeExpressionVisitor;
76

87
/**
98
* Expression for referencing an identifier/column name within a context having an alias.
109
*
1110
* <p>Example: In this query: <code>
12-
* SELECT item, quantity, date FROM <implicit_collection> JOIN ( SELECT item, MAX(date) AS
13-
* latest_date FROM <implicit_collection> GROUP BY item ) AS latest ON item = latest.item ORDER BY
14-
* `item` ASC;
11+
* SELECT item, quantity, date
12+
* FROM <implicit_collection>
13+
* JOIN (
14+
* SELECT item, MAX(date) AS latest_date
15+
* FROM <implicit_collection>
16+
* GROUP BY item
17+
* ) AS latest
18+
* ON item = latest.item
19+
* ORDER BY `item` ASC;
1520
* </code> the rhs of the join condition "latest.item" can be expressed as: <code>
16-
* AliasedIdentifierExpression.builder().name("item").alias("alias1").build() </code>
21+
* AliasedIdentifierExpression.builder().name("item").alias("alias1").build() </code>
1722
*/
18-
@EqualsAndHashCode(callSuper = true)
1923
@Value
2024
public class AliasedIdentifierExpression extends IdentifierExpression {
21-
2225
String contextAlias;
2326

2427
private AliasedIdentifierExpression(final String name, final String contextAlias) {
25-
super(name, null);
28+
super(name);
2629
this.contextAlias = contextAlias;
2730
}
2831

@@ -41,7 +44,6 @@ public static AliasedIdentifierExpressionBuilder builder() {
4144
}
4245

4346
public static class AliasedIdentifierExpressionBuilder {
44-
4547
private String name;
4648
private String contextAlias;
4749

document-store/src/main/java/org/hypertrace/core/documentstore/expression/impl/IdentifierExpression.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public static IdentifierExpression of(final String name) {
4444
return new IdentifierExpression(name);
4545
}
4646

47-
// Package-private: used internally by factory methods
4847
static IdentifierExpression of(final String name, final DataType dataType) {
4948
Preconditions.checkArgument(name != null && !name.isBlank(), "name is null or blank");
5049
return new IdentifierExpression(name, dataType);

document-store/src/main/java/org/hypertrace/core/documentstore/expression/impl/JsonIdentifierExpression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static JsonIdentifierExpression of(
6767

6868
protected JsonIdentifierExpression(
6969
String name, String columnName, List<String> jsonPath, JsonFieldType fieldType) {
70-
super(name, null);
70+
super(name);
7171
this.columnName = columnName;
7272
this.jsonPath = jsonPath;
7373
this.fieldType = fieldType;

0 commit comments

Comments
 (0)