iidb / wing

Educational DB for Database System course at IIIS (Yao class), Tsinghua University
MIT License
4 stars 0 forks source link

String Support in Aggregate Function #3

Closed StoreBlank closed 1 year ago

StoreBlank commented 1 year ago

At present the logic of AggregateExprFunction is forcing the input tuple to be deserialized.

The constructor of AggregateExprFunction: https://github.com/iidb/wing/blob/4da101bb2e1e18e3d3d487833b2c81958cda10b6/src/execution/exprdata.cpp#L509-L526 It changes the input schema at Line 518 of execution/exprdata.cpp

It will lead to bad support for raw tuple input, and make the string (varchar) support impossible.

StoreBlank commented 1 year ago

Sorry in L523 we can see that it still uses the original input_schema, so the only change is that we need to use a deserialized tuple in AggregateExprFunction::LastEvaluate no matter whether input_schema is raw.