cmu-db / peloton

The Self-Driving Database Management System
http://pelotondb.io
Apache License 2.0
2.03k stars 624 forks source link

Fix CSV scanner for handling filter predicate on a VARCHAR column correctly #1490

Open RonyMin opened 5 years ago

RonyMin commented 5 years ago

CSV scan does not care about delimiter in a CSV file, but query processor should care the end of each column value, i.e., ‘\0’.

Because query parser parses each selection predicate by adding ‘\0’ at the end of the predicate value, query processor cannot handle the query correctly if we ignore the existence of delimiter in a raw tuple in CSV file.

This simple solution fix the case by replacing delimiter to ‘\0’, and thus StringCompare in type/type_util.h works correctly.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.02%) to 76.535% when pulling f56beb3c3b64de60d15c0462b1834fddadf098a6 on RonyMin:develop-1 into 3bc6d461dcd10e8f5b8dd6bdcdb0dbfe23d0256e on cmu-db:master.

apavlo commented 5 years ago

Thanks for sending this. We're not actively developing Peloton anymore. We'll eventually port this over to the new system.

RonyMin commented 5 years ago

@apavlo Hello, professor. It is my pleasure if this PR can improve the new system in any way.