Skip to content

Commit 45b82c3

Browse files
committed
Merge branch 'main' into feature/NIFI-14869-mssql-upsert
2 parents ce79211 + d924680 commit 45b82c3

File tree

58 files changed

+908
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+908
-183
lines changed

nifi-commons/nifi-expression-language/src/main/antlr3/org/apache/nifi/attribute/expression/language/antlr/AttributeExpressionLexer.g

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,31 @@ WHITESPACE : (' '|'\t'|'\n'|'\r')+ { $channel = HIDDEN; };
6969
COMMENT : '#' ( ~('{') ) ( ~('\n') )* '\n' { $channel = HIDDEN; };
7070

7171
// PARAMETERS
72+
// Capture the entire parameter reference (e.g., #{Batch Size}) as a single token so that
73+
// parameter names may contain spaces without requiring quotes. The lexer action normalizes
74+
// the token text to contain only the inner parameter name (without the surrounding "#{" and
75+
// "}"), and if the inner text itself is quoted (e.g., #{"Batch Size"}), the surrounding quotes
76+
// are also stripped. This preserves backward compatibility and ensures the parser/AST consumer
77+
// (ExpressionCompiler) receives a consistent parameter name string.
78+
PARAMETER_REFERENCE
79+
: '#{' (~('}'))+ '}'
80+
{
81+
final String full = getText();
82+
if (full != null && full.length() >= 3) {
83+
String inner = full.substring(2, full.length() - 1);
84+
if (inner.length() >= 2) {
85+
final char first = inner.charAt(0);
86+
final char last = inner.charAt(inner.length() - 1);
87+
if ((first == '\'' && last == '\'') || (first == '"' && last == '"')) {
88+
inner = inner.substring(1, inner.length() - 1);
89+
}
90+
}
91+
setText(inner);
92+
}
93+
}
94+
;
95+
// Retained for legacy form where the parameter name is parsed as a separate token sequence
96+
// (e.g., #{'Batch Size'}) and rewritten by the parser rule below.
7297
PARAMETER_REFERENCE_START : '#{';
7398

7499
DOLLAR : '$';

nifi-commons/nifi-expression-language/src/main/antlr3/org/apache/nifi/attribute/expression/language/antlr/AttributeExpressionParser.g

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,17 @@ attributeRefOrFunctionCall : (attributeRef | standaloneFunction | parameterRefer
145145
referenceOrFunction : DOLLAR LBRACE attributeRefOrFunctionCall (COLON functionCall)* RBRACE ->
146146
^(EXPRESSION attributeRefOrFunctionCall functionCall*);
147147

148-
parameterReference : PARAMETER_REFERENCE_START singleAttrRef RBRACE ->
149-
^(PARAMETER_REFERENCE singleAttrRef);
148+
// Parameter reference rule
149+
// Supports two forms:
150+
// 1) Legacy: "#{" singleAttrRef "}" where the name is either ATTRIBUTE_NAME or STRING_LITERAL
151+
// 2) New: a single PARAMETER_REFERENCE token produced by the lexer that already contains the
152+
// normalized inner name (surrounding #{ } removed and optional inner quotes stripped).
153+
// Both forms are rewritten to the same AST shape: ^(PARAMETER_REFERENCE <child-token-with-name>)
154+
// so downstream consumers (ExpressionCompiler) can read child(0).getText() for the parameter name.
155+
parameterReference
156+
: PARAMETER_REFERENCE_START singleAttrRef RBRACE -> ^(PARAMETER_REFERENCE singleAttrRef)
157+
| p=PARAMETER_REFERENCE -> ^(PARAMETER_REFERENCE $p)
158+
;
150159

151160
expression : referenceOrFunction;
152161

nifi-commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,14 @@ public void testParameterReferenceWithSpace() {
447447
verifyEquals("${#{'test param'}:append(' - '):append(#{'test param'})}", attributes, stateValues, parameters, "unit - unit");
448448

449449
verifyEquals("${#{\"test param\"}}", attributes, stateValues, parameters, "unit");
450+
451+
// Unquoted parameter reference with spaces should also work
452+
verifyEquals("${#{test param}}", attributes, stateValues, parameters, "unit");
453+
454+
// Unquoted parameter used within a function argument
455+
parameters.put("Date Format", "yyyy");
456+
final String expectedYear = String.valueOf(java.time.LocalDate.now().getYear());
457+
verifyEquals("${now():format(#{Date Format})}", attributes, stateValues, parameters, expectedYear);
450458
}
451459

452460
@Test
157 KB
Loading

nifi-docs/src/main/asciidoc/user-guide.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2513,7 +2513,10 @@ representation of the statistics being graphed. The following information is pro
25132513
- *Component-Specific Entries*: Information is shown for each different type of component. For example, for a Processor,
25142514
the type of Processor is displayed. For a Connection, the source and destination names and IDs are shown.
25152515

2516-
- *Start*: The earliest time shown on the graph.
2516+
- *Start*: The earliest time shown on the graph. This is a selectable value providing common options for how much of the historical data the user is interested in.
2517+
Options become available as data supports it, but the "All" option is always available. When "All" is selected it specifies that the earliest time in the graph will be the
2518+
beginning of all available data. Other options, only available as data becomes available, specify the last N amount of time ago
2519+
(5 minutes, 10 minutes, 30 minutes, hour).
25172520

25182521
- *End*: The latest time shown on the graph.
25192522

nifi-extension-bundles/nifi-cipher-bundle/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@
3333

3434
<dependencyManagement>
3535
<dependencies>
36+
<dependency>
37+
<groupId>org.mockito</groupId>
38+
<artifactId>mockito-bom</artifactId>
39+
<version>${mockito.version}</version>
40+
<type>pom</type>
41+
<scope>import</scope>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.junit</groupId>
45+
<artifactId>junit-bom</artifactId>
46+
<version>${junit.version}</version>
47+
<type>pom</type>
48+
<scope>import</scope>
49+
</dependency>
3650
<dependency>
3751
<groupId>com.exceptionfactory.jagged</groupId>
3852
<artifactId>jagged-bom</artifactId>

nifi-extension-bundles/nifi-confluent-platform-bundle/nifi-confluent-protobuf-antlr-parser/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<packaging>jar</packaging>
2323

2424
<properties>
25-
<antlr4.version>4.13.1</antlr4.version>
25+
<antlr4.version>4.13.2</antlr4.version>
2626
<antlr4.protobuf3.grammar.url>https://raw.githubusercontent.com/antlr/grammars-v4/e1491245d045474fa5393fb7be03b3b8ed22080f/protobuf3/Protobuf3.g4</antlr4.protobuf3.grammar.url>
2727
<antlr4.generated.sources>target/generated-sources/antlr4</antlr4.generated.sources>
2828
</properties>
@@ -33,7 +33,6 @@
3333
<artifactId>antlr4-runtime</artifactId>
3434
<version>${antlr4.version}</version>
3535
</dependency>
36-
3736
<dependency>
3837
<groupId>org.apache.nifi</groupId>
3938
<artifactId>nifi-confluent-platform-schema-api</artifactId>
@@ -89,7 +88,7 @@
8988
<plugin>
9089
<groupId>org.codehaus.mojo</groupId>
9190
<artifactId>build-helper-maven-plugin</artifactId>
92-
<version>3.4.0</version>
91+
<version>3.6.1</version>
9392
<executions>
9493
<execution>
9594
<id>add-source</id>

nifi-extension-bundles/nifi-gcp-bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<packaging>pom</packaging>
2626

2727
<properties>
28-
<google.libraries.version>26.65.0</google.libraries.version>
28+
<google.libraries.version>26.66.0</google.libraries.version>
2929
</properties>
3030

3131
<dependencyManagement>

nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<artifactId>nifi-github-extensions</artifactId>
2323
<packaging>jar</packaging>
2424
<properties>
25-
<jjwt.version>0.12.6</jjwt.version>
25+
<jjwt.version>0.12.7</jjwt.version>
2626
</properties>
2727
<dependencies>
2828
<dependency>

nifi-extension-bundles/nifi-graph-bundle/nifi-graph-test-clients/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<artifactId>nifi-graph-test-clients</artifactId>
2626
<packaging>jar</packaging>
2727
<properties>
28-
<janusgraph.version>1.2.0-20250812-182757.f621a1c</janusgraph.version>
28+
<janusgraph.version>1.2.0-20250815-215833.1b92960</janusgraph.version>
2929
<guava.version>33.4.8-jre</guava.version>
3030
<amqp-client.version>5.26.0</amqp-client.version>
3131
</properties>

0 commit comments

Comments
 (0)