Skip to content

v0.5 to v0.6 upgrade

yliuuuu edited this page Nov 2, 2022 · 4 revisions

v0.6.* (latest v0.6.0)

New features

  • ORDER BY implementation in the evaluator

Deprecated items

  • ExprNode deprecated in rest of code base including evaluator

Misc/bug fixes

  • Upgrade Kotlin version to 1.4.322
  • [fix] changed path ast node to sue its root node source location

Breaking changes

Breaking behavioral changes

Breaking API changes

  1. Replace Environment with EvaluationSession for ExprFunctions
// ----- v0.5.* -----
class SomeExprFunction(): ExprFunction {
    override val signature = FunctionSignature(
        name = "some_expr_function",
        requiredParameters = listOf(StaticType.ANY),
        optionalParameter = StaticType.ANY,
        returnType = StaticType.ANY
    )

    // In v0.5.0, the `callWith*` functions' first argument was `Environment`
    override fun callWithRequired(env: Environment, required: List<ExprValue>): ExprValue {
        TODO("Implementation details without optional argument")
    }

    override fun callWithOptional(env: Environment, required: List<ExprValue>, opt: ExprValue): ExprValue {
        TODO("Implementation details with optional argument")
    }
}
// ----- v0.6.* -----
class SomeExprFunction(): ExprFunction {
    override val signature = FunctionSignature(
        name = "some_expr_function",
        requiredParameters = listOf(StaticType.ANY),
        optionalParameter = StaticType.ANY,
        returnType = StaticType.ANY
    )

    // Starting in v0.6.0, the `callWith*` functions' first argument is changed to `EvaluationSession`.
    // `Environment` has also been made private
    override fun callWithRequired(session: EvaluationSession, required: List<ExprValue>): ExprValue {
        TODO("Implementation details without optional argument")
    }

    override fun callWithOptional(session: EvaluationSession, required: List<ExprValue>, opt: ExprValue): ExprValue {
        TODO("Implementation details with optional argument")
    }
}
  1. NaturalExprValueComparators fields have been renamed
  • NULLS_FIRSTNULLS_FIRST_ASC
  • NULLS_LASTNULLS_FIRST_DESC
  1. Upgrade to PIG v0.5.0. This doesn't have any direct breaking changes. With PIG v0.5.0, the generated sources will now be in lang/domains/PartiqlAst.generated.kt rather than lang/domains/partiql-domains.kt.
  2. Make a few APIs internal:
  • Environment
  • ExprAggregator
  • ExprAggregatorFactory
  • lang/eval’s Group class
  • RegisterBank
  • ThunkEnv
  • ThunkExceptionHandlerForLegacyMode and ThunkExceptionHandlerForPermissiveMode
  • DEFAULT_EXCEPTION_HANDLER_FOR_LEGACY_MODE and DEFAULT_EXCEPTION_HANDLER_FOR_PERMISSIVE_MODE
Clone this wiki locally