You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/07/18 10:00:14 UTC
[GitHub] [pulsar] codelipenghui opened a new pull request #4757: Change type
of publish_time to timestamp
codelipenghui opened a new pull request #4757: Change type of publish_time to timestamp
URL: https://github.com/apache/pulsar/pull/4757
Fixes #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';
```

Without `__publish_time__` predicate:
```
SELECT COUNT(*)
FROM "sql-test-1";
```

### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
### Documentation
- Does this pull request introduce a new feature? (no)
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services