Skip to content

Commit 89d919d

Browse files
authored
ESQL: More docs for DataType#UNDER_CONSTRUCTION (#134156)
Adds more explanation for the `DataType#UNDER_CONSTRUCTION`.
1 parent 06da8a4 commit 89d919d

File tree

1 file changed

+15
-4
lines changed
  • x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type

1 file changed

+15
-4
lines changed

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type/DataType.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,21 @@ public enum DataType {
313313
DENSE_VECTOR(builder().esType("dense_vector").unknownSize());
314314

315315
/**
316-
* Types that are actively being built. These types are not returned
317-
* from Elasticsearch if their associated {@link FeatureFlag} is disabled.
318-
* They aren't included in generated documentation. And the tests don't
319-
* check that sending them to a function produces a sane error message.
316+
* Types that are actively being built. These types are
317+
* <ul>
318+
* <li>Not returned from Elasticsearch if their associated {@link FeatureFlag} is disabled.</li>
319+
* <li>Not included in generated documentation</li>
320+
* <li>
321+
* Not tested by {@code ErrorsForCasesWithoutExamplesTestCase} subclasses.
322+
* When a function supports a type it includes a test case in its subclass
323+
* of {@code AbstractFunctionTestCase}. If a function does not support.
324+
* them like {@code TO_STRING} then the tests won't notice. See class javadoc
325+
* for instructions on adding new types, but that usually involves adding support
326+
* for that type to a handful of functions. Once you've done that you should be
327+
* able to remove your new type from UNDER_CONSTRUCTION and update a few error
328+
* messages.
329+
* </li>
330+
* </ul>
320331
*/
321332
public static final Map<DataType, FeatureFlag> UNDER_CONSTRUCTION = Map.ofEntries(
322333
Map.entry(AGGREGATE_METRIC_DOUBLE, EsqlCorePlugin.AGGREGATE_METRIC_DOUBLE_FEATURE_FLAG),

0 commit comments

Comments
 (0)