File tree Expand file tree Collapse file tree
phoenix-queryserver-it/src/it
java/org/apache/phoenix/end2end Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,7 +354,6 @@ public void testParameterizedLikeExpression() throws Exception {
354354 assertFalse (rs .next ());
355355 }
356356
357- @ Ignore ("PHOENIX-4664" )
358357 @ Test
359358 //This is the java reproducer for PHOENIX-4664
360359 //This test only works as intended when the system timezone is NOT GMT
@@ -370,6 +369,8 @@ public void testTimezoneLess() throws Exception {
370369 conn .commit ();
371370
372371 LocalDateTime now = LocalDateTime .now ();
372+ //Avatica has only millisecond timestamps
373+ now = now .withNano ((now .getNano ()/1000000 )*1000000 );
373374 try (PreparedStatement upsert = conn .prepareStatement (
374375 "UPSERT INTO " + tableName + " VALUES (?, ?)" )
375376 ) {
@@ -380,7 +381,7 @@ public void testTimezoneLess() throws Exception {
380381 ResultSet rs = stmt .executeQuery ("select * from " + tableName );
381382 assertTrue (rs .next ());
382383 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 );
384385 }
385386 }
386387 }
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