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

Star projection fails to respect ProjectionIterationBehavior.UNFILTERED #246

Closed
dlurton opened this issue May 18, 2020 · 0 comments · Fixed by #247
Closed

Star projection fails to respect ProjectionIterationBehavior.UNFILTERED #246

dlurton opened this issue May 18, 2020 · 0 comments · Fixed by #247

Comments

@dlurton
Copy link
Member

dlurton commented May 18, 2020

As demonstrated with the following unit test:


import com.amazon.ion.system.IonSystemBuilder
import org.junit.Test
import org.partiql.lang.eval.EvaluationSession
import org.partiql.lang.eval.ExprValueFactory
import org.partiql.lang.eval.ProjectionIterationBehavior
import kotlin.test.assertEquals

class ScratchPad {
    @Test
    fun test() {
        val ion = IonSystemBuilder.standard().build()
        val exprFactory = ExprValueFactory.standard(ion)
        val pipeline = CompilerPipeline.build(exprFactory) {
            compileOptions {
                projectionIteration(ProjectionIterationBehavior.UNFILTERED)
            }
        }

        val q = pipeline.compile("select * from <<{'a': MISSING}>>")
        val r = q.eval(EvaluationSession.standard())
        // assertion below fails
        assertEquals("<<{'a': MISSING}>>", r.toString())
    }
}
therapon added a commit that referenced this issue Jun 9, 2020
* Respect ProjectionIterationBehavior.UNFILTERED within star projection (#247)

Fixes #246

* Prepare release 0.2.1

Co-authored-by: David Lurton <dlurton@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant