Commit de5c72b
committed
fix: skip COUNT marker for extension-ATTACH source stages
DuckDB v1.5's binder consistently rejects the marker shape
'SELECT COUNT(*) AS r FROM <extension_view>' inside a batched
session, where <extension_view> is a view backed by the postgres /
mysql / sqlite / duckdb / motherduck / etc. extension's ATTACH
machinery. Three earlier marker variants all tripped it ("Failed
to bind column reference count_star() / r / _duckle_r"). Per-stage
avoids the binder bug only because each spawn is a fresh session;
in one batched session the same shape fails reproducibly under
mysql-integration in CI.
Pre-compute the set of extension-backed node ids at the start of
execute_batched and emit count-less markers ('SELECT NULL AS
_duckle_r') for any stage whose count target lands on one of them
(view stage = its own node id; sink stage = its `from` upstream).
Also skip preview generation for those view stages for the same
reason.
Cost: rows is None in batched mode for stages reading from an
extension source. Net: pipelines that mix file + extension sources
still batch the file-only portion; their extension portion just
loses the per-stage row count.1 parent 8ba6bd2 commit de5c72b
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
877 | 912 | | |
878 | 913 | | |
879 | 914 | | |
| |||
944 | 979 | | |
945 | 980 | | |
946 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
947 | 986 | | |
948 | 987 | | |
949 | 988 | | |
| |||
979 | 1018 | | |
980 | 1019 | | |
981 | 1020 | | |
| 1021 | + | |
982 | 1022 | | |
983 | 1023 | | |
984 | 1024 | | |
| |||
0 commit comments