Skip to content

Keep slice only in StringLiteral#5649

Closed
wendigo wants to merge 1 commit intotrinodb:masterfrom
wendigo:serafin/simplify-string-literal
Closed

Keep slice only in StringLiteral#5649
wendigo wants to merge 1 commit intotrinodb:masterfrom
wendigo:serafin/simplify-string-literal

Conversation

@wendigo
Copy link
Copy Markdown
Contributor

@wendigo wendigo commented Oct 22, 2020

No description provided.

@cla-bot cla-bot bot added the cla-signed label Oct 22, 2020
@wendigo wendigo added the WIP label Oct 22, 2020
@wendigo wendigo force-pushed the serafin/simplify-string-literal branch from 9ffef71 to 2fce3ab Compare October 22, 2020 15:06
@wendigo wendigo force-pushed the serafin/simplify-string-literal branch from 2fce3ab to b7ed48c Compare October 22, 2020 18:11
@wendigo wendigo removed the WIP label Oct 22, 2020
@findepi findepi requested a review from martint October 22, 2020 20:21
@martint
Copy link
Copy Markdown
Member

martint commented Oct 22, 2020

The change is ok, but we should consider removing the Slice altogether and leaving a String instead. The reason we had the Slice representation was that years ago query execution was based on an expression interpreter, which ended up performing the String->Slice conversion every time. This hasn't been the case in a long time, so keeping the Slice provides very little value.

@findepi
Copy link
Copy Markdown
Member

findepi commented Oct 23, 2020

If we go with String, we should also update places like
https://github.com/prestosql/presto/blob/ab3c8e5548f80d525dd4e9c3d628c1bd48b9897e/presto-main/src/main/java/io/prestosql/sql/planner/ExpressionInterpreter.java#L1148
not to do the conversion twice (String -> Slice -> String)

@wendigo wendigo closed this Nov 22, 2021
@wendigo wendigo deleted the serafin/simplify-string-literal branch November 22, 2021 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants