Skip to content

Commit

Permalink
remove old json function
Browse files Browse the repository at this point in the history
  • Loading branch information
wjones127 authored and rtyler committed Apr 29, 2023
1 parent 324e050 commit 01b5994
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
12 changes: 0 additions & 12 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,18 +321,6 @@ impl RawDeltaTable {
.collect())
}

pub fn arrow_schema_json(&self) -> PyResult<String> {
let schema = self
._table
.get_schema()
.map_err(PyDeltaTableError::from_raw)?;
serde_json::to_string(
&<ArrowSchema as TryFrom<&deltalake::Schema>>::try_from(schema)
.map_err(PyDeltaTableError::from_arrow)?,
)
.map_err(|_| PyDeltaTableError::new_err("Got invalid table schema"))
}

pub fn update_incremental(&mut self) -> PyResult<()> {
rt()?
.block_on(self._table.update_incremental(None))
Expand Down
3 changes: 2 additions & 1 deletion python/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@ impl PySchema {
.map_err(|err: ArrowError| PyException::new_err(err.to_string()))?;

fn convert_to_large_type(field: ArrowFieldRef, dt: ArrowDataType) -> ArrowFieldRef {
let field = field.as_ref().clone();
match dt {
ArrowDataType::Utf8 => field.with_data_type(ArrowDataType::LargeUtf8).into(),

Expand Down Expand Up @@ -1065,7 +1066,7 @@ impl PySchema {
.into()
}

_ => field,
_ => field.into(),
}
}

Expand Down
4 changes: 2 additions & 2 deletions rust/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ pub mod hdfs_cli {

pub fn create_dir(dir_name: impl AsRef<str>) -> std::io::Result<ExitStatus> {
let path = hdfs_cli_path();
let mut child = Command::new(&path)
let mut child = Command::new(path)
.args([
"dfs",
"-mkdir",
Expand All @@ -487,7 +487,7 @@ pub mod hdfs_cli {

pub fn delete_dir(dir_name: impl AsRef<str>) -> std::io::Result<ExitStatus> {
let path = hdfs_cli_path();
let mut child = Command::new(&path)
let mut child = Command::new(path)
.args([
"dfs",
"-rm",
Expand Down

0 comments on commit 01b5994

Please sign in to comment.