Jefffrey commented on code in PR #18979: URL: https://github.com/apache/datafusion/pull/18979#discussion_r2571104293
########## datafusion/functions/src/math/ceil.rs: ########## @@ -0,0 +1,273 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::any::Any; +use std::sync::Arc; + +use arrow::array::{Array, ArrayRef, AsArray, PrimitiveArray}; +use arrow::datatypes::{DataType, Decimal128Type, Float32Type, Float64Type}; +use arrow::error::ArrowError; +use datafusion_common::utils::take_function_args; +use datafusion_common::{exec_err, Result}; +use datafusion_expr::interval_arithmetic::Interval; +use datafusion_expr::sort_properties::{ExprProperties, SortProperties}; +use datafusion_expr::{ + ColumnarValue, Documentation, ScalarFunctionArgs, ScalarUDFImpl, Signature, + Volatility, +}; + +#[derive(Debug, PartialEq, Eq, Hash)] +pub struct CeilFunc { + signature: Signature, +} + +impl Default for CeilFunc { + fn default() -> Self { + Self::new() + } +} + +impl CeilFunc { + pub fn new() -> Self { + Self { + signature: Signature::user_defined(Volatility::Immutable), Review Comment: We should not be using user_defined, see: #12725 See some of my PRs for that issue such as #18968 and #18519 for examples of the API we should use ########## datafusion/functions/src/math/ceil.rs: ########## @@ -0,0 +1,273 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::any::Any; +use std::sync::Arc; + +use arrow::array::{Array, ArrayRef, AsArray, PrimitiveArray}; +use arrow::datatypes::{DataType, Decimal128Type, Float32Type, Float64Type}; +use arrow::error::ArrowError; +use datafusion_common::utils::take_function_args; +use datafusion_common::{exec_err, Result}; +use datafusion_expr::interval_arithmetic::Interval; +use datafusion_expr::sort_properties::{ExprProperties, SortProperties}; +use datafusion_expr::{ + ColumnarValue, Documentation, ScalarFunctionArgs, ScalarUDFImpl, Signature, + Volatility, +}; + +#[derive(Debug, PartialEq, Eq, Hash)] +pub struct CeilFunc { + signature: Signature, +} + +impl Default for CeilFunc { + fn default() -> Self { + Self::new() + } +} + +impl CeilFunc { + pub fn new() -> Self { + Self { + signature: Signature::user_defined(Volatility::Immutable), + } + } +} + +impl ScalarUDFImpl for CeilFunc { + fn as_any(&self) -> &dyn Any { + self + } + + fn name(&self) -> &str { + "ceil" + } + + fn signature(&self) -> &Signature { + &self.signature + } + + fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> { + match arg_types[0] { + DataType::Float32 => Ok(DataType::Float32), + DataType::Decimal128(precision, scale) => { + Ok(DataType::Decimal128(precision, scale)) + } + _ => Ok(DataType::Float64), + } + } + + fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> { + let [arg] = take_function_args(self.name(), arg_types)?; + + let coerced = match arg { + DataType::Null => DataType::Float64, + DataType::Float32 | DataType::Float64 => arg.clone(), + DataType::Decimal128(_, _) => arg.clone(), + DataType::Float16 + | DataType::Int8 + | DataType::Int16 + | DataType::Int32 + | DataType::Int64 + | DataType::UInt8 + | DataType::UInt16 + | DataType::UInt32 + | DataType::UInt64 => DataType::Float64, + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(vec![coerced]) + } + + fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> { + let args = ColumnarValue::values_to_arrays(&args.args)?; + let value = &args[0]; + + let result: ArrayRef = match value.data_type() { + DataType::Float64 => Arc::new( + value + .as_primitive::<Float64Type>() + .unary::<_, Float64Type>(f64::ceil), + ), + DataType::Float32 => Arc::new( + value + .as_primitive::<Float32Type>() + .unary::<_, Float32Type>(f32::ceil), + ), + DataType::Decimal128(_, scale) => { + apply_decimal_op(value, *scale, ceil_decimal_value)? + } + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(ColumnarValue::Array(result)) + } + + fn output_ordering(&self, input: &[ExprProperties]) -> Result<SortProperties> { + super::ceil_order(input) + } + + fn evaluate_bounds(&self, inputs: &[&Interval]) -> Result<Interval> { + super::bounds::unbounded_bounds(inputs) + } + + fn documentation(&self) -> Option<&Documentation> { + Some(super::get_ceil_doc()) + } Review Comment: We should pull the relevant code into here instead of calling as via super For the documentation we should use the macro, see for example: https://github.com/apache/datafusion/blob/79257353be4a4dae5002ccf9450fe58e6d4ada8c/datafusion/functions/src/math/log.rs#L47-L66 ########## datafusion/functions/src/math/ceil.rs: ########## @@ -0,0 +1,273 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::any::Any; +use std::sync::Arc; + +use arrow::array::{Array, ArrayRef, AsArray, PrimitiveArray}; +use arrow::datatypes::{DataType, Decimal128Type, Float32Type, Float64Type}; +use arrow::error::ArrowError; +use datafusion_common::utils::take_function_args; +use datafusion_common::{exec_err, Result}; +use datafusion_expr::interval_arithmetic::Interval; +use datafusion_expr::sort_properties::{ExprProperties, SortProperties}; +use datafusion_expr::{ + ColumnarValue, Documentation, ScalarFunctionArgs, ScalarUDFImpl, Signature, + Volatility, +}; + +#[derive(Debug, PartialEq, Eq, Hash)] +pub struct CeilFunc { + signature: Signature, +} + +impl Default for CeilFunc { + fn default() -> Self { + Self::new() + } +} + +impl CeilFunc { + pub fn new() -> Self { + Self { + signature: Signature::user_defined(Volatility::Immutable), + } + } +} + +impl ScalarUDFImpl for CeilFunc { + fn as_any(&self) -> &dyn Any { + self + } + + fn name(&self) -> &str { + "ceil" + } + + fn signature(&self) -> &Signature { + &self.signature + } + + fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> { + match arg_types[0] { + DataType::Float32 => Ok(DataType::Float32), + DataType::Decimal128(precision, scale) => { + Ok(DataType::Decimal128(precision, scale)) + } + _ => Ok(DataType::Float64), + } + } + + fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> { + let [arg] = take_function_args(self.name(), arg_types)?; + + let coerced = match arg { + DataType::Null => DataType::Float64, + DataType::Float32 | DataType::Float64 => arg.clone(), + DataType::Decimal128(_, _) => arg.clone(), + DataType::Float16 + | DataType::Int8 + | DataType::Int16 + | DataType::Int32 + | DataType::Int64 + | DataType::UInt8 + | DataType::UInt16 + | DataType::UInt32 + | DataType::UInt64 => DataType::Float64, + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(vec![coerced]) + } + + fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> { + let args = ColumnarValue::values_to_arrays(&args.args)?; + let value = &args[0]; + + let result: ArrayRef = match value.data_type() { + DataType::Float64 => Arc::new( + value + .as_primitive::<Float64Type>() + .unary::<_, Float64Type>(f64::ceil), + ), + DataType::Float32 => Arc::new( + value + .as_primitive::<Float32Type>() + .unary::<_, Float32Type>(f32::ceil), + ), + DataType::Decimal128(_, scale) => { + apply_decimal_op(value, *scale, ceil_decimal_value)? + } + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(ColumnarValue::Array(result)) + } + + fn output_ordering(&self, input: &[ExprProperties]) -> Result<SortProperties> { + super::ceil_order(input) + } + + fn evaluate_bounds(&self, inputs: &[&Interval]) -> Result<Interval> { + super::bounds::unbounded_bounds(inputs) + } + + fn documentation(&self) -> Option<&Documentation> { + Some(super::get_ceil_doc()) + } +} + +fn apply_decimal_op( + array: &ArrayRef, + scale: i8, + op: fn(i128, i128) -> std::result::Result<i128, ArrowError>, +) -> Result<ArrayRef> { + if scale <= 0 { + return Ok(Arc::clone(array)); + } + + let factor = decimal_scale_factor(scale)?; + let decimal = array.as_primitive::<Decimal128Type>(); + let data_type = array.data_type().clone(); + + let result: PrimitiveArray<Decimal128Type> = decimal + .try_unary(|value| op(value, factor))? + .with_data_type(data_type); + + Ok(Arc::new(result)) +} + +fn decimal_scale_factor(scale: i8) -> Result<i128> { + if scale < 0 { + return exec_err!("Decimal scale {scale} must be non-negative"); + } + let exponent = scale as u32; + + if let Some(value) = 10_i128.checked_pow(exponent) { + Ok(value) + } else { + exec_err!("Decimal scale {scale} is too large for ceil") + } +} + +fn ceil_decimal_value( + value: i128, + factor: i128, +) -> std::result::Result<i128, ArrowError> { + let remainder = value % factor; + + if remainder == 0 { + return Ok(value); + } + + if value >= 0 { + let increment = factor - remainder; + value.checked_add(increment).ok_or_else(|| { + ArrowError::ComputeError("Decimal128 overflow while applying ceil".into()) + }) + } else { + value.checked_sub(remainder).ok_or_else(|| { + ArrowError::ComputeError("Decimal128 overflow while applying ceil".into()) + }) + } +} + +#[cfg(test)] +mod tests { Review Comment: Can we move these tests to be SLTs? ########## datafusion/functions/src/math/ceil.rs: ########## @@ -0,0 +1,273 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::any::Any; +use std::sync::Arc; + +use arrow::array::{Array, ArrayRef, AsArray, PrimitiveArray}; +use arrow::datatypes::{DataType, Decimal128Type, Float32Type, Float64Type}; +use arrow::error::ArrowError; +use datafusion_common::utils::take_function_args; +use datafusion_common::{exec_err, Result}; +use datafusion_expr::interval_arithmetic::Interval; +use datafusion_expr::sort_properties::{ExprProperties, SortProperties}; +use datafusion_expr::{ + ColumnarValue, Documentation, ScalarFunctionArgs, ScalarUDFImpl, Signature, + Volatility, +}; + +#[derive(Debug, PartialEq, Eq, Hash)] +pub struct CeilFunc { + signature: Signature, +} + +impl Default for CeilFunc { + fn default() -> Self { + Self::new() + } +} + +impl CeilFunc { + pub fn new() -> Self { + Self { + signature: Signature::user_defined(Volatility::Immutable), + } + } +} + +impl ScalarUDFImpl for CeilFunc { + fn as_any(&self) -> &dyn Any { + self + } + + fn name(&self) -> &str { + "ceil" + } + + fn signature(&self) -> &Signature { + &self.signature + } + + fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> { + match arg_types[0] { + DataType::Float32 => Ok(DataType::Float32), + DataType::Decimal128(precision, scale) => { + Ok(DataType::Decimal128(precision, scale)) + } + _ => Ok(DataType::Float64), + } + } + + fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> { + let [arg] = take_function_args(self.name(), arg_types)?; + + let coerced = match arg { + DataType::Null => DataType::Float64, + DataType::Float32 | DataType::Float64 => arg.clone(), + DataType::Decimal128(_, _) => arg.clone(), + DataType::Float16 + | DataType::Int8 + | DataType::Int16 + | DataType::Int32 + | DataType::Int64 + | DataType::UInt8 + | DataType::UInt16 + | DataType::UInt32 + | DataType::UInt64 => DataType::Float64, + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(vec![coerced]) + } + + fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> { + let args = ColumnarValue::values_to_arrays(&args.args)?; + let value = &args[0]; + + let result: ArrayRef = match value.data_type() { + DataType::Float64 => Arc::new( + value + .as_primitive::<Float64Type>() + .unary::<_, Float64Type>(f64::ceil), + ), + DataType::Float32 => Arc::new( + value + .as_primitive::<Float32Type>() + .unary::<_, Float32Type>(f32::ceil), + ), + DataType::Decimal128(_, scale) => { + apply_decimal_op(value, *scale, ceil_decimal_value)? + } + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(ColumnarValue::Array(result)) + } + + fn output_ordering(&self, input: &[ExprProperties]) -> Result<SortProperties> { + super::ceil_order(input) + } + + fn evaluate_bounds(&self, inputs: &[&Interval]) -> Result<Interval> { + super::bounds::unbounded_bounds(inputs) + } + + fn documentation(&self) -> Option<&Documentation> { + Some(super::get_ceil_doc()) + } +} + +fn apply_decimal_op( + array: &ArrayRef, + scale: i8, + op: fn(i128, i128) -> std::result::Result<i128, ArrowError>, +) -> Result<ArrayRef> { + if scale <= 0 { + return Ok(Arc::clone(array)); + } + + let factor = decimal_scale_factor(scale)?; + let decimal = array.as_primitive::<Decimal128Type>(); + let data_type = array.data_type().clone(); + + let result: PrimitiveArray<Decimal128Type> = decimal + .try_unary(|value| op(value, factor))? + .with_data_type(data_type); + + Ok(Arc::new(result)) +} + +fn decimal_scale_factor(scale: i8) -> Result<i128> { + if scale < 0 { + return exec_err!("Decimal scale {scale} must be non-negative"); + } Review Comment: Considering we check for negative scale in `apply_decimal_op` already we should omit this check here ########## datafusion/sqllogictest/test_files/scalar.slt: ########## @@ -317,6 +317,16 @@ select ceil(100.1234, 1) query error DataFusion error: This feature is not implemented: CEIL with datetime is not supported select ceil(100.1234 to year) +# ceil with decimal argument +query RRRR +select + ceil(arrow_cast(1.23,'Decimal128(10,2)')), + ceil(arrow_cast(-1.23,'Decimal128(10,2)')), + ceil(arrow_cast(123.00,'Decimal128(10,2)')), + ceil(arrow_cast(-123.00,'Decimal128(10,2)')); +---- +2 -1 123 -123 Review Comment: Should check the output type using `arrow_typeof` to ensure we're actually getting decimals and not just floats ########## datafusion/functions/src/math/ceil.rs: ########## @@ -0,0 +1,273 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::any::Any; +use std::sync::Arc; + +use arrow::array::{Array, ArrayRef, AsArray, PrimitiveArray}; +use arrow::datatypes::{DataType, Decimal128Type, Float32Type, Float64Type}; +use arrow::error::ArrowError; +use datafusion_common::utils::take_function_args; +use datafusion_common::{exec_err, Result}; +use datafusion_expr::interval_arithmetic::Interval; +use datafusion_expr::sort_properties::{ExprProperties, SortProperties}; +use datafusion_expr::{ + ColumnarValue, Documentation, ScalarFunctionArgs, ScalarUDFImpl, Signature, + Volatility, +}; + +#[derive(Debug, PartialEq, Eq, Hash)] +pub struct CeilFunc { + signature: Signature, +} + +impl Default for CeilFunc { + fn default() -> Self { + Self::new() + } +} + +impl CeilFunc { + pub fn new() -> Self { + Self { + signature: Signature::user_defined(Volatility::Immutable), + } + } +} + +impl ScalarUDFImpl for CeilFunc { + fn as_any(&self) -> &dyn Any { + self + } + + fn name(&self) -> &str { + "ceil" + } + + fn signature(&self) -> &Signature { + &self.signature + } + + fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> { + match arg_types[0] { + DataType::Float32 => Ok(DataType::Float32), + DataType::Decimal128(precision, scale) => { + Ok(DataType::Decimal128(precision, scale)) + } + _ => Ok(DataType::Float64), + } + } + + fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> { + let [arg] = take_function_args(self.name(), arg_types)?; + + let coerced = match arg { + DataType::Null => DataType::Float64, + DataType::Float32 | DataType::Float64 => arg.clone(), + DataType::Decimal128(_, _) => arg.clone(), + DataType::Float16 + | DataType::Int8 + | DataType::Int16 + | DataType::Int32 + | DataType::Int64 + | DataType::UInt8 + | DataType::UInt16 + | DataType::UInt32 + | DataType::UInt64 => DataType::Float64, + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(vec![coerced]) + } + + fn invoke_with_args(&self, args: ScalarFunctionArgs) -> Result<ColumnarValue> { + let args = ColumnarValue::values_to_arrays(&args.args)?; + let value = &args[0]; + + let result: ArrayRef = match value.data_type() { + DataType::Float64 => Arc::new( + value + .as_primitive::<Float64Type>() + .unary::<_, Float64Type>(f64::ceil), + ), + DataType::Float32 => Arc::new( + value + .as_primitive::<Float32Type>() + .unary::<_, Float32Type>(f32::ceil), + ), + DataType::Decimal128(_, scale) => { + apply_decimal_op(value, *scale, ceil_decimal_value)? + } + other => { + return exec_err!( + "Unsupported data type {other:?} for function {}", + self.name() + ) + } + }; + + Ok(ColumnarValue::Array(result)) + } + + fn output_ordering(&self, input: &[ExprProperties]) -> Result<SortProperties> { + super::ceil_order(input) + } + + fn evaluate_bounds(&self, inputs: &[&Interval]) -> Result<Interval> { + super::bounds::unbounded_bounds(inputs) + } + + fn documentation(&self) -> Option<&Documentation> { + Some(super::get_ceil_doc()) + } +} + +fn apply_decimal_op( + array: &ArrayRef, + scale: i8, + op: fn(i128, i128) -> std::result::Result<i128, ArrowError>, +) -> Result<ArrayRef> { Review Comment: We should simplify code where possible; for example, this function accepts `op` but it is only ever called with `op` as `ceil_decimal_value`, which is an unnecessary indirection ########## datafusion/functions/src/math/ceil.rs: ########## @@ -0,0 +1,273 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::any::Any; +use std::sync::Arc; + +use arrow::array::{Array, ArrayRef, AsArray, PrimitiveArray}; +use arrow::datatypes::{DataType, Decimal128Type, Float32Type, Float64Type}; +use arrow::error::ArrowError; +use datafusion_common::utils::take_function_args; +use datafusion_common::{exec_err, Result}; +use datafusion_expr::interval_arithmetic::Interval; +use datafusion_expr::sort_properties::{ExprProperties, SortProperties}; +use datafusion_expr::{ + ColumnarValue, Documentation, ScalarFunctionArgs, ScalarUDFImpl, Signature, + Volatility, +}; + +#[derive(Debug, PartialEq, Eq, Hash)] +pub struct CeilFunc { + signature: Signature, +} + +impl Default for CeilFunc { + fn default() -> Self { + Self::new() + } +} + +impl CeilFunc { + pub fn new() -> Self { + Self { + signature: Signature::user_defined(Volatility::Immutable), + } + } +} + +impl ScalarUDFImpl for CeilFunc { + fn as_any(&self) -> &dyn Any { + self + } + + fn name(&self) -> &str { + "ceil" + } + + fn signature(&self) -> &Signature { + &self.signature + } + + fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> { + match arg_types[0] { + DataType::Float32 => Ok(DataType::Float32), + DataType::Decimal128(precision, scale) => { Review Comment: We should include support for all decimal types, not just 128 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
