Skip to content

Commit 50169fc

Browse files
Trianz-Akshayfal-bharadwajburhan94
authored
Remove timestamp case from SnowflakeQueryStringBuilder (#2997)
Co-authored-by: Fal Bharadwaj <[email protected]> Co-authored-by: burhan94 <[email protected]>
1 parent d7d129d commit 50169fc

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

athena-snowflake/src/main/java/com/amazonaws/athena/connectors/snowflake/SnowflakeQueryStringBuilder.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,6 @@ else if (value instanceof Number) {
285285
return new SimpleDateFormat("yyyy-MM-dd").format(new Date(milliseconds));
286286
}
287287
case Timestamp:
288-
long millis = ((Number) value).longValue();
289-
Timestamp timestamp = new Timestamp(millis);
290-
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
291-
return sdf.format(timestamp);
292288
case Time:
293289
case Interval:
294290
case Binary:

athena-snowflake/src/test/java/com/amazonaws/athena/connectors/snowflake/SnowflakeQueryStringBuilderTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.amazonaws.athena.connector.lambda.domain.predicate.Constraints;
2323
import com.amazonaws.athena.connectors.jdbc.manager.TypeAndValue;
2424
import org.apache.arrow.vector.types.DateUnit;
25-
import org.apache.arrow.vector.types.TimeUnit;
2625
import org.apache.arrow.vector.types.pojo.ArrowType;
2726
import org.apache.arrow.vector.types.pojo.Field;
2827
import org.apache.arrow.vector.types.pojo.FieldType;
@@ -128,12 +127,6 @@ void testGetObjectForWhereClause_Date() {
128127
assertEquals("2023-03-15 00:00:00", result);
129128
}
130129

131-
@Test
132-
void testGetObjectForWhereClause_Timestamp() {
133-
Object result = queryBuilder.getObjectForWhereClause("created_at", 1711929600000L, new ArrowType.Timestamp(TimeUnit.MILLISECOND, "UTC"));
134-
assertEquals("2024-04-01 00:00:00", result);
135-
}
136-
137130
@Test
138131
void testToPredicateWithUnsupportedType() {
139132
assertThrows(UnsupportedOperationException.class, () ->

0 commit comments

Comments
 (0)