| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>Parameter (Apache Calcite API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.calcite.linq4j.function, annotation type: Parameter"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <div class="about-language"><b>Apache Calcite</b></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Field | </li> |
| <li><a href="#annotation-interface-optional-element-summary">Optional</a> | </li> |
| <li><a href="#annotation-interface-required-element-summary">Required</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#annotation-interface-element-detail">Element</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.calcite.linq4j.function</a></div> |
| <h1 title="Annotation Type Parameter" class="title">Annotation Type Parameter</h1> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/annotation/Retention.html" title="class or interface in java.lang.annotation" class="external-link">@Retention</a>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/annotation/RetentionPolicy.html#RUNTIME" title="class or interface in java.lang.annotation" class="external-link">RUNTIME</a>) |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/annotation/Target.html" title="class or interface in java.lang.annotation" class="external-link">@Target</a>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/annotation/ElementType.html#PARAMETER" title="class or interface in java.lang.annotation" class="external-link">PARAMETER</a>) |
| </span><span class="modifiers">public @interface </span><span class="element-name type-name-label">Parameter</span></div> |
| <div class="block">Annotation that supplies metadata about a function parameter. |
| |
| <p>A typical use is to derive names for the parameters of user-defined |
| functions. |
| |
| <p>Here is an example: |
| |
| <blockquote><pre> |
| public static class MyLeftFunction { |
| public String eval( |
| @Parameter(name = "s") String s, |
| @Parameter(name = "n", optional = true) Integer n) { |
| return s.substring(0, n == null ? 1 : n); |
| } |
| }</pre></blockquote> |
| |
| <p>The first parameter is named "s" and is mandatory, |
| and the second parameter is named "n" and is optional. |
| |
| <p>If this annotation is present, it supersedes information that might be |
| available via |
| <code>Executable.getParameters()</code> (JDK 1.8 and above). |
| |
| <p>If the annotation is not specified, parameters will be named "arg0", |
| "arg1" et cetera, and will be mandatory.</div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== --> |
| <li> |
| <section class="member-summary" id="annotation-interface-required-element-summary"> |
| <h2>Required Element Summary</h2> |
| <div class="caption"><span>Required Elements</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Required Element</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#name()" class="member-name-link">name</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">The name of the parameter.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> |
| <li> |
| <section class="member-summary" id="annotation-interface-optional-element-summary"> |
| <h2>Optional Element Summary</h2> |
| <div class="caption"><span>Optional Elements</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Optional Element</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>boolean</code></div> |
| <div class="col-second even-row-color"><code><a href="#optional()" class="member-name-link">optional</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Returns whether the parameter is optional.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details" id="annotation-interface-element-detail"> |
| <ul class="details-list"> |
| <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> |
| <li> |
| <section class="member-details"> |
| <h2>Element Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="name()"> |
| <h3>name</h3> |
| <div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">name</span></div> |
| <div class="block">The name of the parameter. |
| |
| <p>The name is used when the function is called |
| with parameter assignment, for example <code>foo(x => 1, y => 'a')</code>.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> |
| <li> |
| <section class="member-details"> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="optional()"> |
| <h3>optional</h3> |
| <div class="member-signature"><span class="return-type">boolean</span> <span class="element-name">optional</span></div> |
| <div class="block">Returns whether the parameter is optional. |
| |
| <p>An optional parameter does not need to be specified when you call the |
| function. |
| |
| <p>If you call a function using positional parameter syntax, you can omit |
| optional parameters on the trailing edge. For example, if you have a |
| function |
| <code>baz(int a, int b optional, int c, int d optional, int e optional)</code> |
| then you can call <code>baz(a, b, c, d, e)</code> |
| or <code>baz(a, b, c, d)</code> |
| or <code>baz(a, b, c)</code> |
| but not <code>baz(a, b)</code> because <code>c</code> is not optional. |
| |
| <p>If you call a function using parameter name assignment syntax, you can |
| omit any parameter that has a default value. For example, you can call |
| <code>baz(a => 1, e => 5, c => 3)</code>, omitting optional parameters <code>b</code> |
| and <code>d</code>. |
| |
| <p>Currently, the default value used when a parameter is not specified |
| is NULL, and therefore optional parameters must be nullable.</div> |
| <dl class="notes"> |
| <dt>Default:</dt> |
| <dd>false</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2012-2023 Apache Software Foundation. All Rights Reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |