mvanschellebeeck commented on issue #4248: URL: https://github.com/apache/arrow-datafusion/issues/4248#issuecomment-1328353056
hey @xudong963, @alamb, I've got a draft PR up here: https://github.com/apache/arrow-datafusion/pull/4395 In general, sqllogictests operate on a workflow where the `.slt` file creates tables, inserts values and then queries the values for expected results. From what I can tell, CREATE TABLE and INSERT INTO are not currently supported in datafusion so I raised #4396 and #4397 respectively. After they're implemented we'll be able to incorporate a lot of the existing sqllogictests. I've started migrating some of the tests from [aggregate.rs](https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/tests/sql/aggregates.rs) into an sqllogictest file, [aggregate.slt](https://github.com/apache/arrow-datafusion/blob/96bd42e0d5879470dc71281c297eb103115ca300/tests/sqllogictests/test_files/aggregate.slt). The queries here require a specific datafusion setup which I moved into [setup.rs](https://github.com/apache/arrow-datafusion/blob/96bd42e0d5879470dc71281c297eb103115ca300/tests/sqllogictests/src/setup.rs#L35). Some thoughts as I worked through this: - datafusion-cli wasn't that easy to use as a library without [Command](https://doc.rust-lang.org/std/process/struct.Command.html) wizardry so I resorted to datafusion-core functions with `format_batches` and `run_query` at the bottom of this [file](https://github.com/apache/arrow-datafusion/blob/96bd42e0d5879470dc71281c297eb103115ca300/tests/sqllogictests/src/main.rs) - sqllogictests can not test the output column names (that are currently testing in integration tests) - still figuring out a few TODOS in the aggregate.slt file -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
