@@ -134,7 +134,7 @@ public Columns include(CqlIdentifier columnName) {
134134 * @return a new {@link Columns} object containing all column definitions and the TTL for {@code columnName}.
135135 */
136136 public Columns ttl (String columnName ) {
137- return select (columnName , SelectorBuilder :: ttl );
137+ return select (columnName , FunctionCall . from ( "TTL" , ColumnSelector . from ( columnName )) );
138138 }
139139
140140 /**
@@ -145,7 +145,7 @@ public Columns ttl(String columnName) {
145145 * @return a new {@link Columns} object containing all column definitions and the TTL for {@code columnName}.
146146 */
147147 public Columns ttl (CqlIdentifier columnName ) {
148- return select (columnName , SelectorBuilder :: ttl );
148+ return select (columnName , FunctionCall . from ( "TTL" , ColumnSelector . from ( columnName )) );
149149 }
150150
151151 /**
@@ -161,7 +161,8 @@ public Columns select(String columnName, Selector selector) {
161161
162162 /**
163163 * Include column {@code columnName} with a built {@link Selector}. This column selection overrides an existing
164- * selection for the column name.
164+ * selection for the column name. {@link SelectorBuilder} uses the given {@code columnName} as column alias to
165+ * represent the selection in the result.
165166 *
166167 * @param columnName must not be {@literal null}.
167168 * @return a new {@link Columns} object containing all column definitions and the selected {@code columnName}.
@@ -175,7 +176,8 @@ public Columns select(CqlIdentifier columnName, Function<SelectorBuilder, Select
175176
176177 /**
177178 * Include column {@code columnName} with a built {@link Selector}. This column selection overrides an existing
178- * selection for the column name.
179+ * selection for the column name. {@link SelectorBuilder} uses the given {@code columnName} as column alias to
180+ * represent the selection in the result.
179181 *
180182 * @param columnName must not be {@literal null}.
181183 * @return a new {@link Columns} object containing all column definitions and the selected {@code columnName}.
0 commit comments