Skip to content

Star projection fails to respect ProjectionIterationBehavior.UNFILTERED #246

Closed
@dlurton

Description

@dlurton

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())
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions