Skip to content

Commit 44e2d10

Browse files
committed
minor fix
Signed-off-by: Tomoyuki Morita <[email protected]>
1 parent b8e9ef2 commit 44e2d10

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/src/main/java/org/opensearch/sql/expression/function/udf/SpanFunction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public Expression implement(
9999
SpanFunction.class, methodName, String.class, int.class, String.class));
100100
return function.getImplementor().implement(translator, call, RexImpTable.NullAs.NULL);
101101
} else if (SqlTypeUtil.isCharacter(fieldType)) {
102+
// if first argument is string, consider it as timestamp
102103
ScalarFunctionImpl function =
103104
(ScalarFunctionImpl)
104105
ScalarFunctionImpl.create(

integ-test/src/test/java/org/opensearch/sql/calcite/standalone/CalciteDynamicFieldsTimechartIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void testTrendlineWithDynamicFieldWithCast() throws IOException {
6262
String query =
6363
source(
6464
TEST_INDEX_DYNAMIC,
65-
"trendline sma(2, latency) as latency_trend" + "| fields id, latency, latency_trend");
65+
"trendline sma(2, latency) as latency_trend| fields id, latency, latency_trend");
6666
JSONObject result = executeQuery(query);
6767

6868
verifySchema(
@@ -94,7 +94,7 @@ public void testTrendlineSortByDynamicField() throws IOException {
9494
schema("latency", "int"),
9595
schema("latency_trend", "double"));
9696
verifyDataRows(
97-
result, // [1,10,null],[3,40,25],[5,160,100],[2,20,90],[4,80,50]
97+
result,
9898
rows(1, 10, null),
9999
rows(3, 40, 25),
100100
rows(5, 160, 100),

0 commit comments

Comments
 (0)