3

I am trying Apache Phoenix with Hbase. When I run try to get current time using select current_time(), its giving me some weird value. (292278994-08-17 07:12:55.807). Similarly for current_date() or now() query. I am not able to understand what does this mean, and how to get the current time (as we get from mysql now() function). Because of this I am unable to set the data type for view column as Date or Timestamp, as its doing some weird conversion.

Can anyone help me figure out a solution for this.

DIF
  • 2,470
  • 6
  • 35
  • 49
Ankit Agarwal
  • 31
  • 1
  • 3

2 Answers2

2

As a workaround, you can do select current_time() from any_table which will return the expected result

kliew
  • 3,073
  • 1
  • 14
  • 25
0

This is fixed in 4.6.1 and 4.7 version of phoenix. https://issues.apache.org/jira/browse/PHOENIX-2611

Ankit Singhal
  • 834
  • 7
  • 8