Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-49960

Support end DeveloperAPI provided AgnosticEncoders based on ExpressionEncoders

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0
    • None
    • SQL
    • Patch

    Description

      In Spark versions prior to 4.0.0-preview2 ExpressionEncoders were used throughout the original api.  SPARK-49025 removed re-use of ExpressionEncoders for derivation of tuples rendering user provided ExpressionEncoders such as Frameless incompatible with joinWith (which only uses the AgnosticEncoder hierarchy).  There are other likely combinations where the encoder is not passed into the function.

      This patch aims to add an extension AgnosticExpressionPathEncoder trait with added:

      def toCatalyst(input: Expression): Expression
      
      def fromCatalyst(inputPath: Expression): Expression 

      functions mirroring the underlying Des/SerializerBuildHelper approach (also used by Frameless).  In turn the BuildHelper's delegate to these functions when the AgnosticEncoder is an AgnosticExpressionPathEncoder.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chris.twiner Chris Twiner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: