forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change type of publish_time to timestamp (apache#4757)
Fixes apache#4734 ### Motivation "publish_time" is Pulsar SQL internal column, as Pulsar only stores timestamps, it doesn’t store the timezone information. Use timestamp as "publish_time" type is more correct way in Pulsar SQL. ### Modifications Change type of publish_time to timestamp. ### Verifying this change predicate of publish_time is pushdown Use `__publish_time__` to trim messages: ``` SELECT COUNT(*) FROM "sql-test-1" WHERE "__publish_time__" >= TIMESTAMP '2019-07-18 17:26:50.119' AND "__publish_time__" < TIMESTAMP '2019-07-18 17:26:51.119'; ``` ![image](https://user-images.githubusercontent.com/12592133/61447301-43835080-a983-11e9-814b-bc2b378f02b9.png) Without `__publish_time__` predicate: ``` SELECT COUNT(*) FROM "sql-test-1"; ``` ![image](https://user-images.githubusercontent.com/12592133/61447427-82190b00-a983-11e9-8d3f-3bf2a4798047.png)
- Loading branch information
1 parent
f5b20cd
commit 6f5416e
Showing
3 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters