Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect result with time = timestamp #8093

Closed
tux-00 opened this issue Mar 3, 2017 · 0 comments · Fixed by #8098
Closed

Incorrect result with time = timestamp #8093

tux-00 opened this issue Mar 3, 2017 · 0 comments · Fixed by #8098

Comments

@tux-00
Copy link

tux-00 commented Mar 3, 2017

Bug report

System info: [Include InfluxDB version, operating system name, and other relevant details]

  • InfluxDB shell version: 1.2.0
  • Fedora 25
  • Default configuration

Steps to reproduce:
Trying to select one timestamp :

influx
> use mydb
> select * from trades limit 10
time                exchange price   side size   trade_id
----                -------- -----   ---- ----   --------
1487285374908000000 gdax     1038.23 buy  0.0715 13092806
1487285374908000001 gdax     1038.28 buy  0.02   13092805
1487285374908000002 gdax     1038.29 buy  0.0115 13092804
1487285374908000003 gdax     1038.41 buy  0.01   13092803
1487285374908000004 gdax     1038.41 buy  0.01   13092802
1487285374908000005 gdax     1038.48 buy  0.02   13092801
1487285374908000006 gdax     1038.48 buy  0.02   13092800
1487285407183000000 gdax     1039.15 sell 0.1757 13092809
1487285407183000001 gdax     1039.14 sell 0.03   13092808
1487285407183000002 gdax     1039    sell 0.15   13092807

> select * from trades where time = 1487285374908000004
name: trades
time                exchange price   side size trade_id
----                -------- -----   ---- ---- --------
1487285374908000004 gdax     1038.41 buy  0.01 13092802
1487285374908000005 gdax     1038.48 buy  0.02 13092801

> select * from trades where time >= 1487285374908000004 and time <= 1487285374908000004
name: trades
time                exchange price   side size trade_id
----                -------- -----   ---- ---- --------
1487285374908000004 gdax     1038.41 buy  0.01 13092802

Now trying with another values :

influx
> use mydb
> select * from trades limit 20
name: trades
time                exchange price   side size      trade_id
----                -------- -----   ---- ----      --------
1487285374908000000 gdax     1038.23 buy  0.0715    13092806
1487285374908000001 gdax     1038.28 buy  0.02      13092805
1487285374908000002 gdax     1038.29 buy  0.0115    13092804
1487285374908000003 gdax     1038.41 buy  0.01      13092803
1487285374908000004 gdax     1038.41 buy  0.01      13092802
1487285374908000005 gdax     1038.48 buy  0.02      13092801
1487285374908000006 gdax     1038.48 buy  0.02      13092800
1487285407183000000 gdax     1039.15 sell 0.1757    13092809
1487285407183000001 gdax     1039.14 sell 0.03      13092808
1487285407183000002 gdax     1039    sell 0.15      13092807
1487285438344000000 gdax     1038.21 buy  0.0175    13092815
1487285438344000001 gdax     1038.21 buy  0.01      13092814
1487285438344000002 gdax     1038.22 buy  0.02      13092813
1487285438344000003 gdax     1038.23 buy  0.0085    13092812
1487285438344000004 gdax     1038.49 buy  0.15      13092811
1487285438344000005 gdax     1038.5  buy  0.08      13092810
1487285453958000000 gdax     1038.95 sell 0.0011285 13092816
1487285469502000000 gdax     1038.95 sell 0.6935    13092818
1487285469502000001 gdax     1038.93 sell 0.03      13092817
1487285501043000000 gdax     1038.94 sell 0.4513    13092819

> select * from trades where time = 1487285453958000000
name: trades
time                exchange price   side size      trade_id
----                -------- -----   ---- ----      --------
1487285453958000000 gdax     1038.95 sell 0.0011285 13092816

It seems that when the timestamp is followed by the timestamp value + 1, the engine returns the timestamp selected + 1.

Expected behavior:
Maybe I missed something but it seems that time = returns two values instead of a single one in certain conditions. Check above for more details.

Maybe linked with #7706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants