File tree 2 files changed +34
-2
lines changed
phoenix-queryserver-it/src/it
java/org/apache/phoenix/end2end
2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,6 @@ public void testParameterizedLikeExpression() throws Exception {
354
354
assertFalse (rs .next ());
355
355
}
356
356
357
- @ Ignore ("PHOENIX-4664" )
358
357
@ Test
359
358
//This is the java reproducer for PHOENIX-4664
360
359
//This test only works as intended when the system timezone is NOT GMT
@@ -370,6 +369,8 @@ public void testTimezoneLess() throws Exception {
370
369
conn .commit ();
371
370
372
371
LocalDateTime now = LocalDateTime .now ();
372
+ //Avatica has only millisecond timestamps
373
+ now = now .withNano ((now .getNano ()/1000000 )*1000000 );
373
374
try (PreparedStatement upsert = conn .prepareStatement (
374
375
"UPSERT INTO " + tableName + " VALUES (?, ?)" )
375
376
) {
@@ -380,7 +381,7 @@ public void testTimezoneLess() throws Exception {
380
381
ResultSet rs = stmt .executeQuery ("select * from " + tableName );
381
382
assertTrue (rs .next ());
382
383
LocalDateTime fromDB = rs .getTimestamp ("i" ).toLocalDateTime ();
383
- assertTrue ("Timestamps do not match. inserted:" + now .toString () + "returned:" + fromDB .toString (), fromDB .compareTo (now ) == 0 );
384
+ assertTrue ("Timestamps do not match. inserted:" + now .toString () + " returned:" + fromDB .toString (), fromDB .compareTo (now ) == 0 );
384
385
}
385
386
}
386
387
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <?xml-stylesheet type =" text/xsl" href =" configuration.xsl" ?>
3
+ <!--
4
+ /**
5
+ * Licensed to the Apache Software Foundation (ASF) under one
6
+ * or more contributor license agreements. See the NOTICE file
7
+ * distributed with this work for additional information
8
+ * regarding copyright ownership. The ASF licenses this file
9
+ * to you under the Apache License, Version 2.0 (the
10
+ * "License"); you may not use this file except in compliance
11
+ * with the License. You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ -->
22
+ <configuration >
23
+ <property >
24
+ <name >hbase.regionserver.wal.codec</name >
25
+ <value >org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value >
26
+ </property >
27
+ <property >
28
+ <name >phoenix.query.applyTimeZoneDisplacement</name >
29
+ <value >true</value >
30
+ </property >
31
+ </configuration >
You can’t perform that action at this time.
0 commit comments