Commit 65fed3a
[SPARK-53303][SS][CONNECT] Use the empty state encoder when the initial state is not provided in TWS
### What changes were proposed in this pull request?
`agnosticEncoderFor[S]` returns the wrong encoder when no initial state is provided in TWS. We should create an empty state encoder and use that instead.
### Why are the changes needed?
Fix the incorrect behavior for TWS without initial state in spark connect
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
N/A: unfortunately, this field is not used so far and it's not easy to provide the test coverage for this
### Was this patch authored or co-authored using generative AI tooling?
No
Closes apache#52056 from huanliwang-db/huanliwang-db/fix-tws.
Authored-by: huanliwang-db <huanli.wang@databricks.com>
Signed-off-by: Anish Shrigondekar <anish.shrigondekar@databricks.com>1 parent 528f3a7 commit 65fed3a
File tree
1 file changed
+20
-2
lines changed- sql/connect/common/src/main/scala/org/apache/spark/sql/connect
1 file changed
+20
-2
lines changedLines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
661 | | - | |
662 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
663 | 670 | | |
664 | 671 | | |
665 | 672 | | |
| |||
780 | 787 | | |
781 | 788 | | |
782 | 789 | | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
0 commit comments