[
https://issues.apache.org/jira/browse/ARROW-17351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17581621#comment-17581621
]
Eduardo Ponce commented on ARROW-17351:
---------------------------------------
I have several comments with respect to string-to-Expression support:
1. Favor explicit names for operations (via prefix notation) instead of
algebraic expressions
* Names allow referring to any compute function. Recall that there are
different variants of the same operation (e.g., {{add}} vs {{add_checked}}) and
many functions do not have an mathematical symbol.
* Names with parenthesis allow passing {{FunctionOptions}} where
applicable.
* [Mapping common mathematical symbols to compute functions is done
currently in Arrow
R.|https://github.com/apache/arrow/blob/master/r/R/expression.R#L89-L100]
2. String expressions require defining an escape character and rules for
handling this type of nuisances.
3. There have been ideas to support a text format for defining unit tests'
inputs. Ideally, a single text format would be practical for both cases,
otherwise, it may not be adequate to pursue an Arrow custom text format.
> [C++][Compute] Support to initialize expression with a string
> -------------------------------------------------------------
>
> Key: ARROW-17351
> URL: https://issues.apache.org/jira/browse/ARROW-17351
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Affects Versions: 8.0.1
> Reporter: LinGeLin
> Priority: Major
>
> I want to achieve such a function, first would like to ask you which way to
> achieve better
>
> For example, I want to initialize an expression whose content is
> a210 - (a210 /203) * 203 = 0
> This means that column A210 modulo 203 is equal to 0
>
> How do you compare these two ideas?
>
> "(subtract(a210, multiply(divide(a210, 203), 203)) == 0)" to Expression
> or
> "a210-(a210/203)*203==0" to Expression
--
This message was sent by Atlassian Jira
(v8.20.10#820010)