Closed stevehill1981 closed 1 year ago
Very good @stevehill1981 ! thanks for the PR. Can you add some specs for it?
Sure thing - probably over the Christmas break, now! Have a great Christmas (if you celebrate)
Awesome! Thank you, @stevehill1981!
Enjoy the holiday with your beloved ones! I'm heading to the beach for 🎅! 🚴♂️ 🏄♂️ 🥾 🎉
I probably will be reviewing it carefully in two weeks!
Also, please rebase and push again because now we have CI 🎉 🚀
I have added tests! I'm glad I did, because my logic for the compress_orderby
extraction turned out to be slightly off.
It now follows the behaviour of ORDER BY
from Postgres:
ORDER BY <column> ASC
defaults to NULLS LAST
unless otherwise specifiedORDER BY <column> DESC
defaults to NULLS FIRST
unless otherwise specifiedIf you want to see more tests around compress_segmentby
, let me know and I'll add some in.
TimescaleDB allows compressed data to be segmented by multiple columns. Our previous implementation only captured the first column that was specified for a given table, which would result in different behaviour when restoring the schema definition.
The same is also true of ordering the compressed data - again, multiple columns can be specified.
This change captures the multiple column specifications correctly, and adds them to the schema.rb as expected.