Commit d76aa02
Remove redundant toString() in string/symbol columns
Pass CharSequence directly through the symbol and string column
paths instead of eagerly converting to String.
In stringColumn(), addString() already copies character data
immediately via putUtf8(), so the toString() was pure waste.
In the symbol path, propagate CharSequence through
getOrAddGlobalSymbol() and addSymbolWithGlobalId() down to the
dictionary lookup. GlobalSymbolDictionary.getOrAddSymbol() now
accepts CharSequence and only calls toString() when a symbol is
new and must be stored. CharSequenceIntHashMap.get() already
accepts CharSequence for lookups, so repeated symbols incur
zero allocation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 50d3d0a commit d76aa02
3 files changed
Lines changed: 13 additions & 14 deletions
File tree
- core/src/main/java/io/questdb/client/cutlass/qwp
- client
- protocol
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | | - | |
110 | | - | |
| 110 | + | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
| 639 | + | |
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
| |||
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
804 | | - | |
| 804 | + | |
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
| |||
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
| 1066 | + | |
| 1067 | + | |
1069 | 1068 | | |
1070 | 1069 | | |
1071 | 1070 | | |
| |||
1092 | 1091 | | |
1093 | 1092 | | |
1094 | 1093 | | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
| 1094 | + | |
| 1095 | + | |
1098 | 1096 | | |
1099 | 1097 | | |
1100 | 1098 | | |
| |||
1104 | 1102 | | |
1105 | 1103 | | |
1106 | 1104 | | |
1107 | | - | |
| 1105 | + | |
1108 | 1106 | | |
1109 | 1107 | | |
1110 | 1108 | | |
| |||
0 commit comments