Compare commits
No commits in common. "517dfc465faa71e0155485121d2c4e37fd6ffb68" and "c254894a1ed2ff8fa6bb8a01abb4d90677c8cd8b" have entirely different histories.
517dfc465f
...
c254894a1e
@ -80,8 +80,6 @@ and sign =
|
|||||||
| Times
|
| Times
|
||||||
| Divide
|
| Divide
|
||||||
|
|
||||||
|
|
||||||
(* pp = pretty print *)
|
|
||||||
let rec pp_query fmt ast =
|
let rec pp_query fmt ast =
|
||||||
match ast with
|
match ast with
|
||||||
| Select(cols, table_exp) -> Format.fprintf fmt "%s" (String.cat "SELECT " (pp_columns cols) ^ pp_table_expression table_exp)
|
| Select(cols, table_exp) -> Format.fprintf fmt "%s" (String.cat "SELECT " (pp_columns cols) ^ pp_table_expression table_exp)
|
||||||
|
@ -215,7 +215,6 @@ column_reference:
|
|||||||
|
|
||||||
set_function_specification:
|
set_function_specification:
|
||||||
| aggregate_function { $1 }
|
| aggregate_function { $1 }
|
||||||
(* | grouping_function { $1 } *)
|
|
||||||
|
|
||||||
(*********************************)
|
(*********************************)
|
||||||
|
|
||||||
|
@ -6,14 +6,8 @@
|
|||||||
(name test_logical_plan)
|
(name test_logical_plan)
|
||||||
(libraries ast logical_plan alcotest))
|
(libraries ast logical_plan alcotest))
|
||||||
|
|
||||||
(test
|
|
||||||
(name test_csv)
|
|
||||||
(libraries csv ast logical_plan alcotest)
|
|
||||||
(deps
|
|
||||||
(file ./files/csv/data.csv)))
|
|
||||||
|
|
||||||
(test
|
(test
|
||||||
(name test_parquet)
|
(name test_parquet)
|
||||||
(libraries parquet)
|
(libraries parquet)
|
||||||
(deps
|
(deps
|
||||||
(file ./files/parquet/data.parquet)))
|
(file ./files/parquet/mock_data.parquet)))
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
id,name,age,email,city
|
|
||||||
1,Alice,30,alice@example.com,New York
|
|
||||||
2,Bob,25,bob@example.com,Los Angeles
|
|
||||||
3,Charlie,35,charlie@example.com,Chicago
|
|
||||||
4,David,28,david@example.com,Houston
|
|
||||||
5,Eve,29,eve@example.com,Phoenix
|
|
||||||
6,Frank,40,frank@example.com,Philadelphia
|
|
||||||
7,Grace,32,grace@example.com,San Antonio
|
|
||||||
8,Heidi,27,heidi@example.com,San Diego
|
|
||||||
9,Ivan,31,ivan@example.com,Dallas
|
|
||||||
10,Judy,34,judy@example.com,San Jose
|
|
|
@ -411,10 +411,6 @@ let test_aggregates () =
|
|||||||
let ast1 =
|
let ast1 =
|
||||||
Select(
|
Select(
|
||||||
[
|
[
|
||||||
Column(
|
|
||||||
Ref("function"),
|
|
||||||
None
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
TableExpression(
|
TableExpression(
|
||||||
Some(
|
Some(
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
open Csv
|
|
||||||
open Alcotest
|
|
||||||
|
|
||||||
(* Function to read CSV file *)
|
|
||||||
let read_csv filename =
|
|
||||||
let ic = open_in filename in
|
|
||||||
let csv = Csv.load_in ic in
|
|
||||||
csv
|
|
||||||
|
|
||||||
(* Test to check if the CSV file is read correctly *)
|
|
||||||
let test_read_csv () =
|
|
||||||
let csv_data = read_csv "files/csv/data.csv" in
|
|
||||||
let nb_columns = Csv.columns csv_data in
|
|
||||||
check int "Number of columns" nb_columns 5
|
|
||||||
|
|
||||||
|
|
||||||
(* Run the test *)
|
|
||||||
let () =
|
|
||||||
run "CSV Tests" [
|
|
||||||
"Read CSV", [
|
|
||||||
test_case "Read and validate CSV" `Quick test_read_csv
|
|
||||||
]
|
|
||||||
]
|
|
@ -1,7 +1,7 @@
|
|||||||
open Parquet
|
open Parquet
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
let path = "files/parquet/data.parquet" in
|
let path = "files/parquet/mock_data.parquet" in
|
||||||
let ic = open_in path in
|
let ic = open_in path in
|
||||||
assert(parquet_check_prefix ic = true);
|
assert(parquet_check_prefix ic = true);
|
||||||
assert(parquet_check_suffix ic = true)
|
assert(parquet_check_suffix ic = true)
|
||||||
|
Loading…
Reference in New Issue
Block a user