From: | Peter Moser <pitiz29a(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Johann Gamper <gamper(at)inf(dot)unibz(dot)it>, Michael Böhlen <boehlen(at)ifi(dot)uzh(dot)ch>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Anton Dignös <anton(dot)dignoes(at)unibz(dot)it> |
Subject: | Re: [PROPOSAL] Temporal query processing with range types |
Date: | 2017-01-13 14:22:14 |
Message-ID: | CAHO0eLZBnrQkh2wt6AfVjOfgTvhrYLn70k10QxM6o7Ts+OTkNg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> What this patch does is to add two new clauses for FROM-list items,
> NORMALIZE and ALIGN, which reshuffle a set of ranges into a new list
> that can then be aggregated more easily. From the original message:
>
> > For NORMALIZE the tuples' ranges need to be split into all sub-ranges
> > according to all matching ranges of the second relation. For this we
> > create a subquery that first joins one relation with the range
> > boundaries of the other and then sorts the result. The executor
> > function splits the ranges in a sweep-line based manner.
> >
> > For ALIGN the tuples' ranges must be split into all intersections and
> > differences with the other relation according to the join condition.
> > For this we create a subquery that first joins the two relations and
> > then sorts the result. The executor function splits the ranges
> > accordingly in a sweep-line based manner.
>
> So there isn't really temporal query processing as such here, only some
> helpers that can make it easier.
The goal of temporal aligners and normalizers is to split ranges to allow a
reduction from temporal queries to their non-temporal counterparts.
Splitting
ranges is necessary for temporal query processing. Temporal aligners and
normalizer may then be used as building-blocks for any temporal query
construct.
> I can see how those operations can be useful, but it would help if there
> were a more formal definition to be able to check that further.
We have published two papers, that contain formal definitions and related
work
for the temporal aligner and normalizer. Please see [1] and [2].
> What I'm missing here is some references: existing implementations,
> standards, documentation, research papers, alternative ideas, rejected
> alternatives, etc.
A good overview of existing implementations in DBMSs, SQL standard, and
history
is given in [3].
> Also, the submission is missing documentation and test cases. There are
> technical terms used in the code that I don't understand.
We added a second patch with test cases and expected results. We are now
writing the documentation in sgml-format.
> I think there are probably many interesting applications for normalizing
> or otherwise adjusting ranges. I'd like to see an overview and
> consideration of other applications.
Please see the attached file adjustment.sql for some interesting
applications.
> Ideally, I'd like to see these things implemented as some kind of
> user-space construct, like an operator or function. I think we'd need a
> clearer definition of what it is they do before we can evaluate that.
Can you please explain what you mean by "user-space construct" in this case.
Best regards,
Anton, Johann, Michael, Peter
----
[1] Anton Dignös, Michael H. Böhlen, Johann Gamper:
Temporal alignment. SIGMOD Conference 2012: 433-444
http://doi.acm.org/10.1145/2213836.2213886
[2] Anton Dignös, Michael H. Böhlen, Johann Gamper, Christian S. Jensen:
Extending the Kernel of a Relational DBMS with Comprehensive Support for
Sequenced Temporal Queries. ACM Trans. Database Syst. 41(4): 26:1-26:46
(2016)
http://doi.acm.org/10.1145/2967608
[3] https://www2.cs.arizona.edu/people/rts/sql3.html and
https://www2.cs.arizona.edu/people/rts/tsql2.html
Attachment | Content-Type | Size |
---|---|---|
adjustment.sql | application/sql | 7.1 KB |
tpg_primitives_out_tests_v1.patch | text/x-patch | 34.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Anastasia Lubennikova | 2017-01-13 14:28:27 | Re: Parallel Index Scans |
Previous Message | Craig Ringer | 2017-01-13 14:11:46 | Re: WG: Packages: Again |