asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Jacobs <sjaco...@ucr.edu>
Subject Nonpure functions in the context of SQL++
Date Tue, 18 Apr 2017 20:23:17 GMT
Hi all,
I'm currently trying to switch the BAD project to SQL++, and having an
issue with non pure function calls. In AQL, a let non-pure assignment (e.g.
current-time) before a for statement means that the assignment should
return a single value for all uses under the for. I optimized the rewrite
rules to handle this case (The assignment will start out above an
empty-tuple-source, meaning that it's called once in the initial plan).

In SQL++, the last statement isn't true. If you do a let assignment before
a select, the assignment starts out baked into the result object
constructor, which means that it starts out inherently being called on a
per-result-object basis.

It's unclear to me how this stuff should be handled in SQL++ syntax. Is
there an inherent way to tell the parser that a "let" should be done only
once?

Steven

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message