From b2ce0ce739e69380e821c94936b7f79f60ed043c Mon Sep 17 00:00:00 2001 From: Arash Maymandi <27716912+am357@users.noreply.github.com> Date: Thu, 9 Feb 2023 13:31:22 -0800 Subject: [PATCH] Make partiql_value::parse_ion public (#294) --- CHANGELOG.md | 2 ++ partiql-value/src/ion.rs | 3 ++- partiql-value/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e67f9ac..8a4afd5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Adds some benchmarks for parsing, compiling, planning, & evaluation - Implements `PIVOT` operator in evaluator - `serde` feature to `partiql-value` and `partiql-logical` with `Serialize` and `Deserialize` traits. +- Adds `Display` for `LogicalPlan` +- Expose `partiql_value::parse_ion` as a public API. ### Fixes diff --git a/partiql-value/src/ion.rs b/partiql-value/src/ion.rs index cb742f24..70658f8e 100644 --- a/partiql-value/src/ion.rs +++ b/partiql-value/src/ion.rs @@ -3,7 +3,8 @@ use ion_rs::{Integer, IonReader, IonType, Reader, StreamItem}; // TODO handle errors more gracefully than `expect`/`unwrap` -pub(crate) fn parse_ion(contents: &str) -> Value { +/// For a given `contents` as Ion text produces a PartiQL Value +pub fn parse_ion(contents: &str) -> Value { let mut reader = ion_rs::ReaderBuilder::new() .build(contents) .expect("reading contents"); diff --git a/partiql-value/src/lib.rs b/partiql-value/src/lib.rs index dfc7392a..5ef94a7e 100644 --- a/partiql-value/src/lib.rs +++ b/partiql-value/src/lib.rs @@ -13,7 +13,7 @@ use rust_decimal::prelude::FromPrimitive; use rust_decimal::{Decimal as RustDecimal, Decimal}; use unicase::UniCase; -mod ion; +pub mod ion; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize};