ChinmaySKulkarni commented on a change in pull request #724: PHOENIX-5629
Phoenix Function to Return HBase row timestamp
URL: https://github.com/apache/phoenix/pull/724#discussion_r406614653
##########
File path:
phoenix-core/src/test/java/org/apache/phoenix/parse/PhoenixRowTimestampFunctionTest.java
##########
@@ -0,0 +1,45 @@
+package org.apache.phoenix.parse;
+
+import org.junit.Test;
+
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class PhoenixRowTimestampFunctionTest {
+
+ @Test
+ public void testExpressionWithPhoenixRowTimestamp() throws Exception {
+ ParseNode parseNode =
SQLParser.parseCondition("(PHOENIX_ROW_TIMESTAMP() = PK2)");
+ boolean hasPhoenixRowTimestampParseNode = false;
+ for (ParseNode childNode : parseNode.getChildren()) {
+ if
(childNode.getClass().isAssignableFrom(PhoenixRowTimestampParseNode.class)) {
+ assertEquals("", childNode.getChildren().size(), 0);
Review comment:
nit: Remove empty string print in assertion and also fix if condition
formatting
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services