Repository navigation
A DataFusion window fixture for preserving both candles in a scan #27697
ElonSabag
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Here’s a four-row DataFusion example for a scan that needs both the latest candle and the one before it. I ran it with the Python package for DataFusion 55.0.0. The dates, symbols, and prices are fictional.
The first query returns DEMO1. DEMO2 was already below its average. Moving
close < avg20into the input of the window drops DEMO1's earlier candle, because that candle was above. The window then has no previous row for that symbol and the second query returns nothing. Pair the rows before filtering the crossing condition. DataFusion window functionsI’m on the eStockes team. The free Smart Scan demo has a fictional EXMPA result. Could you open it and tell me which row you’d lose if you kept only candles below their average? I’d like to know whether the comparison table makes that dependency clear.
All reactions