1818import java .util .Optional ;
1919
2020/**
21- * Represents the result of converting a Presto RowExpression into a CLP-compatible KQL query.
22- * There are three possible cases:
23- * 1. The entire RowExpression is convertible to KQL: `definition` is set, `remainingExpression` is empty.
24- * 2. Part of the RowExpression is convertible: the KQL part is stored in `definition`,
25- * and the remaining untranslatable part is stored in `remainingExpression`.
26- * 3. None of the expression is convertible: the full RowExpression is stored in `remainingExpression`,
27- * and `definition` is empty.
21+ * Represents the result of converting a Presto RowExpression into a CLP-compatible KQL query. In
22+ * every case, `kqlQuery` represents the part of the RowExpression that could be converted to a
23+ * KQL expression, and `remainingExpression` represents the part that could not be converted.
2824 */
2925public class ClpExpression
3026{
3127 // Optional KQL query string representing the fully or partially translatable part of the expression.
32- private final Optional <String > definition ;
28+ private final Optional <String > kqlQuery ;
3329
3430 // The remaining (non-translatable) portion of the RowExpression, if any.
3531 private final Optional <RowExpression > remainingExpression ;
3632
37- public ClpExpression (String definition , RowExpression remainingExpression )
33+ public ClpExpression (String kqlQuery , RowExpression remainingExpression )
3834 {
39- this .definition = Optional .ofNullable (definition );
35+ this .kqlQuery = Optional .ofNullable (kqlQuery );
4036 this .remainingExpression = Optional .ofNullable (remainingExpression );
4137 }
4238
@@ -50,25 +46,27 @@ public ClpExpression()
5046
5147 /**
5248 * Creates a ClpExpression from a fully translatable KQL string.
53- * @param definition
49+ *
50+ * @param kqlQuery
5451 */
55- public ClpExpression (String definition )
52+ public ClpExpression (String kqlQuery )
5653 {
57- this (definition , null );
54+ this (kqlQuery , null );
5855 }
5956
6057 /**
6158 * Creates a ClpExpression from a non-translatable RowExpression.
59+ *
6260 * @param remainingExpression
6361 */
6462 public ClpExpression (RowExpression remainingExpression )
6563 {
6664 this (null , remainingExpression );
6765 }
6866
69- public Optional <String > getDefinition ()
67+ public Optional <String > getKqlQuery ()
7068 {
71- return definition ;
69+ return kqlQuery ;
7270 }
7371
7472 public Optional <RowExpression > getRemainingExpression ()
0 commit comments