Skip to content

Commit cda9984

Browse files
committed
extend tests
1 parent f4cc4d0 commit cda9984

File tree

2 files changed

+888
-640
lines changed
  • kernel

2 files changed

+888
-640
lines changed

kernel/kernel-api/src/main/java/io/delta/kernel/expressions/Literal.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,17 @@ public static Literal ofString(String value) {
121121
return new Literal(value, StringType.STRING);
122122
}
123123

124+
/**
125+
* Create a {@code string} type literal expression with collated {@link StringType}.
126+
*
127+
* @param value literal value
128+
* @param collationIdentifier collation identifier for the string literal
129+
* @return a {@link Literal} of type {@link StringType} with the given collation
130+
*/
131+
public static Literal ofString(String value, CollationIdentifier collationIdentifier) {
132+
return new Literal(value, new StringType(collationIdentifier));
133+
}
134+
124135
/**
125136
* Create a {@code binary} type literal expression.
126137
*

0 commit comments

Comments
 (0)