Skip to content

Commit 0d5b15a

Browse files
goldmedaldouenergy
authored andcommitted
fix(core): add data source variant for file connectors (Canner#1114)
1 parent c24bd4c commit 0d5b15a

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

ibis-server/tests/routers/v2/connector/test_gcs_file.py

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"condition": "Customer.custkey = Orders.custkey",
7878
}
7979
],
80+
"dataSource": "gcs_file",
8081
}
8182

8283

ibis-server/tests/routers/v2/connector/test_local_file.py

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"condition": "Customer.custkey = Orders.custkey",
7373
}
7474
],
75+
"dataSource": "local_file",
7576
}
7677

7778

ibis-server/tests/routers/v2/connector/test_minio_file.py

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"condition": "Customer.custkey = Orders.custkey",
7676
}
7777
],
78+
"dataSource": "minio_file",
7879
}
7980

8081

ibis-server/tests/routers/v2/connector/test_s3_file.py

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"condition": "Customer.custkey = Orders.custkey",
7878
}
7979
],
80+
"dataSource": "s3_file",
8081
}
8182

8283

wren-core-base/manifest-macro/src/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ pub fn data_source(python_binding: proc_macro::TokenStream) -> proc_macro::Token
9494
Datafusion,
9595
#[serde(alias = "duckdb")]
9696
DuckDB,
97+
#[serde(alias = "local_file")]
98+
LocalFile,
99+
#[serde(alias = "s3_file")]
100+
S3File,
101+
#[serde(alias = "gcs_file")]
102+
GcsFile,
103+
#[serde(alias = "minio_file")]
104+
MinioFile,
97105
}
98106
};
99107
proc_macro::TokenStream::from(expanded)

wren-core-base/src/mdl/manifest.rs

+4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ impl Display for DataSource {
102102
DataSource::Snowflake => write!(f, "SNOWFLAKE"),
103103
DataSource::Datafusion => write!(f, "DATAFUSION"),
104104
DataSource::DuckDB => write!(f, "DUCKDB"),
105+
DataSource::LocalFile => write!(f, "LOCAL_FILE"),
106+
DataSource::S3File => write!(f, "S3_FILE"),
107+
DataSource::GcsFile => write!(f, "GCS_FILE"),
108+
DataSource::MinioFile => write!(f, "MINIO_FILE"),
105109
}
106110
}
107111
}

0 commit comments

Comments
 (0)