Thanks all for the response!

On Thu, Jul 25, 2024 at 3:34 PM Ryan Blue <b...@databricks.com.invalid>
wrote:

> The core library is mostly intended to integrate with engines that handle
> this kind of parsing, which is why we've never needed to implement it in
> Iceberg. I've also always tried to avoid adding this to Iceberg because of
> the complexity.
>
> On Thu, Jul 25, 2024 at 3:21 PM Steven Wu <stevenz...@gmail.com> wrote:
>
>> seems like you need a SQL expression parser. I guess in the Java world we
>> don't have a need yet. Engines (Spark, Flink etc.) have their own SQL
>> parsers. They may leverage Calcite for that.
>>
>> On Thu, Jul 25, 2024 at 2:16 PM Pucheng Yang <pucheng.yo...@gmail.com>
>> wrote:
>>
>>> The motivation is that users usually need to define what partitions/
>>> files to select in some DSL, where the filter is expressed as a form of the
>>> string, but the underlying engine is Java based.
>>>
>>> On Thu, Jul 25, 2024 at 2:07 PM Pucheng Yang <pucheng.yo...@gmail.com>
>>> wrote:
>>>
>>>> Hi Steve,
>>>>
>>>> Thanks for sharing, unfortunately, this is not what I am looking for. I
>>>> am looking for something like String of "dt = '2024-07-25' AND hr = '10'"
>>>> to an expression of Expressions.and(Expressions.equal("dt", "2024-07-25"),
>>>> Expressions.equal("hr", "10"). Similar to parser.parse() in iceberg-python
>>>> repo
>>>> https://github.com/apache/iceberg-python/blob/dd8d76d04f2d1c6c8192b83df9e84cee05ad5545/pyiceberg/expressions/parser.py#L268
>>>>
>>>> Thanks
>>>> Pucheng
>>>>
>>>>
>>>>
>>>> On Thu, Jul 25, 2024 at 1:26 PM Steve Zhang
>>>> <hongyue_zh...@apple.com.invalid> wrote:
>>>>
>>>>> Hey Pucheng,
>>>>>
>>>>>   can you share a bit more on the motivation? Last time I checked
>>>>> there’s method in ExpressionParser allow you to convert json of string 
>>>>> type
>>>>> to iceberg expression in here, not sure if this is what you need:
>>>>> https://github.com/apache/iceberg/blob/caf03aed926665014c22cc4a68902bf684f258f9/core/src/main/java/org/apache/iceberg/expressions/ExpressionParser.java#L262-L264
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Steve Zhang
>>>>>
>>>>>
>>>>>
>>>>> On Jul 25, 2024, at 11:54 AM, Pucheng Yang <pucheng.yo...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi dev community,
>>>>>
>>>>> If I read the codebase correctly, there seems to be no utility for
>>>>> converting String to an Expression, anyone be interested if we have one?
>>>>>
>>>>> I can help if the community thinks this is a good addition, I will
>>>>> need some guidance on how to get this started though.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>
> --
> Ryan Blue
> Databricks
>

Reply via email to