You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/parser/filter/PostgresInRelationalFilterParserJsonPrimitive.java
Copy file name to clipboardExpand all lines: document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/parser/filter/PostgresTopLevelArrayEqualityFilterParser.java
Copy file name to clipboardExpand all lines: document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/parser/filter/nonjson/field/PostgresContainsRelationalFilterParserNonJsonField.java
+4-11Lines changed: 4 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -50,18 +50,11 @@ public String parse(
50
50
}
51
51
52
52
// Field is NOT unnested - use array containment operator
Copy file name to clipboardExpand all lines: document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/parser/filter/nonjson/field/PostgresDataType.java
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,30 +5,36 @@
5
5
/**
6
6
* PostgreSQL-specific data types with their SQL type strings.
7
7
*
8
-
* <p>This enum maps generic {@link DataType} values to PostgreSQL-specific type strings used in SQL
9
-
* queries for type casting.
8
+
* <p>This enum maps generic {@link DataType} values to PostgreSQL internal type names, which work
9
+
* for both JDBC's {@code Connection.createArrayOf()} and SQL type casting.
10
10
*/
11
11
publicenumPostgresDataType {
12
12
TEXT("text"),
13
-
INTEGER("integer"),
14
-
BIGINT("bigint"),
15
-
REAL("real"),
16
-
DOUBLE_PRECISION("double precision"),
17
-
BOOLEAN("boolean"),
13
+
INTEGER("int4"),
14
+
BIGINT("int8"),
15
+
REAL("float4"),
16
+
DOUBLE_PRECISION("float8"),
17
+
BOOLEAN("bool"),
18
18
TIMESTAMPTZ("timestamptz"),
19
19
DATE("date"),
20
-
UNKNOWN("unknown");
20
+
UNKNOWN(null);
21
21
22
22
privatefinalStringsqlType;
23
23
24
24
PostgresDataType(StringsqlType) {
25
25
this.sqlType = sqlType;
26
26
}
27
27
28
+
/**
29
+
* Returns the PostgreSQL type name for use with JDBC's createArrayOf() and SQL casting.
30
+
*
31
+
* @return The type name (e.g., "int4", "float8", "text")
32
+
*/
28
33
publicStringgetSqlType() {
29
34
returnsqlType;
30
35
}
31
36
37
+
/** Returns the array type for SQL casting (e.g., "int4[]", "text[]"). */
32
38
publicStringgetArraySqlType() {
33
39
returnsqlType + "[]";
34
40
}
@@ -38,7 +44,6 @@ public String getArraySqlType() {
38
44
*
39
45
* @param dataType the generic data type
40
46
* @return the corresponding PostgresDataType, or null if UNSPECIFIED
41
-
* @throws IllegalArgumentException if the DataType is unknown
Copy file name to clipboardExpand all lines: document-store/src/main/java/org/hypertrace/core/documentstore/postgres/query/v1/parser/filter/nonjson/field/PostgresInRelationalFilterParserScalarField.java
0 commit comments