Skip to content

Commit 4c6944f

Browse files
committed
[DOCS] Remove unneeded options from [source,sql] code blocks (#42759)
In AsciiDoc, `subs="attributes,callouts,macros"` options were required to render `include-tagged::` in a code block. With elastic/docs#827, Elasticsearch Reference documentation migrated from AsciiDoc to Asciidoctor. In Asciidoctor, the `subs="attributes,callouts,macros"` options are no longer needed to render `include-tagged::` in a code block. This commit removes those unneeded options. Resolves #41589
1 parent 26bb244 commit 4c6944f

16 files changed

+139
-140
lines changed

docs/reference/sql/functions/conditional.asciidoc

+14-14
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ If all arguments are null, then it returns `null`.
4040

4141

4242

43-
["source","sql",subs="attributes,callouts,macros"]
43+
[source, sql]
4444
----
4545
include-tagged::{sql-specs}/docs.csv-spec[coalesceReturnNonNull]
4646
----
4747

48-
["source","sql",subs="attributes,callouts,macros"]
48+
[source, sql]
4949
----
5050
include-tagged::{sql-specs}/docs.csv-spec[coalesceReturnNull]
5151
----
@@ -79,12 +79,12 @@ If all arguments are null, then it returns `null`.
7979

8080

8181

82-
["source","sql",subs="attributes,callouts,macros"]
82+
[source, sql]
8383
----
8484
include-tagged::{sql-specs}/docs.csv-spec[ifNullReturnFirst]
8585
----
8686

87-
["source","sql",subs="attributes,callouts,macros"]
87+
[source, sql]
8888
----
8989
include-tagged::{sql-specs}/docs.csv-spec[ifNullReturnSecond]
9090
----
@@ -118,12 +118,12 @@ If all arguments are null, then it returns `null`.
118118

119119

120120

121-
["source","sql",subs="attributes,callouts,macros"]
121+
[source, sql]
122122
----
123123
include-tagged::{sql-specs}/docs.csv-spec[isNullReturnFirst]
124124
----
125125

126-
["source","sql",subs="attributes,callouts,macros"]
126+
[source, sql]
127127
----
128128
include-tagged::{sql-specs}/docs.csv-spec[isNullReturnSecond]
129129
----
@@ -157,12 +157,12 @@ If all arguments are null, then it returns `null`.
157157

158158

159159

160-
["source","sql",subs="attributes,callouts,macros"]
160+
[source, sql]
161161
----
162162
include-tagged::{sql-specs}/docs.csv-spec[nvlReturnFirst]
163163
----
164164

165-
["source","sql",subs="attributes,callouts,macros"]
165+
[source, sql]
166166
----
167167
include-tagged::{sql-specs}/docs.csv-spec[nvlReturnSecond]
168168
----
@@ -194,12 +194,12 @@ Returns `null` when the two input expressions are equal and
194194
if not, it returns the 1st expression.
195195

196196

197-
["source","sql",subs="attributes,callouts,macros"]
197+
[source, sql]
198198
----
199199
include-tagged::{sql-specs}/docs.csv-spec[nullIfReturnFirst]
200200
----
201201

202-
["source","sql",subs="attributes,callouts,macros"]
202+
[source, sql]
203203
----
204204
include-tagged::{sql-specs}/docs.csv-spec[nullIfReturnNull]
205205
----
@@ -239,12 +239,12 @@ If all arguments are null, then it returns `null`.
239239

240240

241241

242-
["source","sql",subs="attributes,callouts,macros"]
242+
[source, sql]
243243
----
244244
include-tagged::{sql-specs}/docs.csv-spec[greatestReturnNonNull]
245245
----
246246

247-
["source","sql",subs="attributes,callouts,macros"]
247+
[source, sql]
248248
----
249249
include-tagged::{sql-specs}/docs.csv-spec[greatestReturnNull]
250250
----
@@ -284,12 +284,12 @@ If all arguments are null, then it returns `null`.
284284

285285

286286

287-
["source","sql",subs="attributes,callouts,macros"]
287+
[source, sql]
288288
----
289289
include-tagged::{sql-specs}/docs.csv-spec[leastReturnNonNull]
290290
----
291291

292-
["source","sql",subs="attributes,callouts,macros"]
292+
[source, sql]
293293
----
294294
include-tagged::{sql-specs}/docs.csv-spec[leastReturnNull]
295295
----

docs/reference/sql/functions/date-time.asciidoc

+29-29
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,32 @@ s|Description
5959

6060
Basic arithmetic operators (`+`, `-`, etc) support date-time parameters as indicated below:
6161

62-
["source","sql",subs="attributes,callouts,macros"]
62+
[source, sql]
6363
--------------------------------------------------
6464
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalPlusInterval]
6565
--------------------------------------------------
6666

67-
["source","sql",subs="attributes,callouts,macros"]
67+
[source, sql]
6868
--------------------------------------------------
6969
include-tagged::{sql-specs}/docs.csv-spec[dtDatePlusInterval]
7070
--------------------------------------------------
7171

72-
["source","sql",subs="attributes,callouts,macros"]
72+
[source, sql]
7373
--------------------------------------------------
7474
include-tagged::{sql-specs}/docs.csv-spec[dtMinusInterval]
7575
--------------------------------------------------
7676

77-
["source","sql",subs="attributes,callouts,macros"]
77+
[source, sql]
7878
--------------------------------------------------
7979
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalMinusInterval]
8080
--------------------------------------------------
8181

82-
["source","sql",subs="attributes,callouts,macros"]
82+
[source, sql]
8383
--------------------------------------------------
8484
include-tagged::{sql-specs}/docs.csv-spec[dtDateMinusInterval]
8585
--------------------------------------------------
8686

87-
["source","sql",subs="attributes,callouts,macros"]
87+
[source, sql]
8888
--------------------------------------------------
8989
include-tagged::{sql-specs}/docs.csv-spec[dtIntervalMul]
9090
--------------------------------------------------
@@ -117,25 +117,25 @@ parameter for rounding the second fractional digits (nanoseconds).
117117

118118
This method always returns the same value within a query.
119119

120-
["source","sql",subs="attributes,callouts,macros"]
120+
[source, sql]
121121
--------------------------------------------------
122122
include-tagged::{sql-specs}/docs.csv-spec[curTs]
123123
--------------------------------------------------
124124

125-
["source","sql",subs="attributes,callouts,macros"]
125+
[source, sql]
126126
--------------------------------------------------
127127
include-tagged::{sql-specs}/docs.csv-spec[curTsFunction]
128128
--------------------------------------------------
129129

130-
["source","sql",subs="attributes,callouts,macros"]
130+
[source, sql]
131131
--------------------------------------------------
132132
include-tagged::{sql-specs}/docs.csv-spec[curTsFunctionPrecision]
133133
--------------------------------------------------
134134

135135
Typically, this function (as well as its twin <<sql-functions-now,NOW())>> function is used for
136136
relative date/time filtering:
137137

138-
["source","sql",subs="attributes,callouts,macros"]
138+
[source, sql]
139139
--------------------------------------------------
140140
include-tagged::{sql-specs}/docs.csv-spec[filterNow]
141141
--------------------------------------------------
@@ -163,7 +163,7 @@ DAY_OF_MONTH(date_exp) <1>
163163

164164
Extract the day of the month from a date.
165165

166-
["source","sql",subs="attributes,callouts,macros"]
166+
[source, sql]
167167
--------------------------------------------------
168168
include-tagged::{sql-specs}/docs.csv-spec[dayOfMonth]
169169
--------------------------------------------------
@@ -187,7 +187,7 @@ DAY_OF_WEEK(date_exp) <1>
187187

188188
Extract the day of the week from a date. Sunday is `1`, Monday is `2`, etc.
189189

190-
["source","sql",subs="attributes,callouts,macros"]
190+
[source, sql]
191191
--------------------------------------------------
192192
include-tagged::{sql-specs}/docs.csv-spec[dayOfWeek]
193193
--------------------------------------------------
@@ -211,7 +211,7 @@ DAY_OF_YEAR(date_exp) <1>
211211

212212
Extract the day of the year from a date.
213213

214-
["source","sql",subs="attributes,callouts,macros"]
214+
[source, sql]
215215
--------------------------------------------------
216216
include-tagged::{sql-specs}/docs.csv-spec[dayOfYear]
217217
--------------------------------------------------
@@ -235,7 +235,7 @@ DAY_NAME(date_exp) <1>
235235

236236
Extract the day of the week from a datetime in text format (`Monday`, `Tuesday`...).
237237

238-
["source","sql",subs="attributes,callouts,macros"]
238+
[source, sql]
239239
--------------------------------------------------
240240
include-tagged::{sql-specs}/docs.csv-spec[dayName]
241241
--------------------------------------------------
@@ -259,7 +259,7 @@ HOUR_OF_DAY(date_exp) <1>
259259

260260
Extract the hour of the day from a date.
261261

262-
["source","sql",subs="attributes,callouts,macros"]
262+
[source, sql]
263263
--------------------------------------------------
264264
include-tagged::{sql-specs}/docs.csv-spec[hourOfDay]
265265
--------------------------------------------------
@@ -284,7 +284,7 @@ ISO_DAY_OF_WEEK(date_exp) <1>
284284
Extract the day of the week from a date, following the https://en.wikipedia.org/wiki/ISO_week_date[ISO 8601 standard].
285285
Monday is `1`, Tuesday is `2`, etc.
286286

287-
["source","sql",subs="attributes,callouts,macros"]
287+
[source, sql]
288288
--------------------------------------------------
289289
include-tagged::{sql-specs}/docs.csv-spec[isoDayOfWeek]
290290
--------------------------------------------------
@@ -309,7 +309,7 @@ ISO_WEEK_OF_YEAR(date_exp) <1>
309309
Extract the week of the year from a date, following https://en.wikipedia.org/wiki/ISO_week_date[ISO 8601 standard]. The first week
310310
of a year is the first week with a majority (4 or more) of its days in January.
311311

312-
["source","sql",subs="attributes,callouts,macros"]
312+
[source, sql]
313313
--------------------------------------------------
314314
include-tagged::{sql-specs}/docs.csv-spec[isoWeekOfYear]
315315
--------------------------------------------------
@@ -333,7 +333,7 @@ MINUTE_OF_DAY(date_exp) <1>
333333

334334
Extract the minute of the day from a date.
335335

336-
["source","sql",subs="attributes,callouts,macros"]
336+
[source, sql]
337337
--------------------------------------------------
338338
include-tagged::{sql-specs}/docs.csv-spec[minuteOfDay]
339339
--------------------------------------------------
@@ -357,7 +357,7 @@ MINUTE_OF_HOUR(date_exp) <1>
357357

358358
Extract the minute of the hour from a date.
359359

360-
["source","sql",subs="attributes,callouts,macros"]
360+
[source, sql]
361361
--------------------------------------------------
362362
include-tagged::{sql-specs}/docs.csv-spec[minuteOfHour]
363363
--------------------------------------------------
@@ -381,7 +381,7 @@ MONTH(date_exp) <1>
381381

382382
Extract the month of the year from a date.
383383

384-
["source","sql",subs="attributes,callouts,macros"]
384+
[source, sql]
385385
--------------------------------------------------
386386
include-tagged::{sql-specs}/docs.csv-spec[monthOfYear]
387387
--------------------------------------------------
@@ -405,7 +405,7 @@ MONTH_NAME(date_exp) <1>
405405

406406
Extract the month from a datetime in text format (`January`, `February`...).
407407

408-
["source","sql",subs="attributes,callouts,macros"]
408+
[source, sql]
409409
--------------------------------------------------
410410
include-tagged::{sql-specs}/docs.csv-spec[monthName]
411411
--------------------------------------------------
@@ -428,15 +428,15 @@ NOW()
428428
This function offers the same functionality as <<sql-functions-current-timestamp,CURRENT_TIMESTAMP()>> function: returns the date/time
429429
when the current query reached the server. This method always returns the same value within a query.
430430

431-
["source","sql",subs="attributes,callouts,macros"]
431+
[source, sql]
432432
--------------------------------------------------
433433
include-tagged::{sql-specs}/docs.csv-spec[nowFunction]
434434
--------------------------------------------------
435435

436436
Typically, this function (as well as its twin <<sql-functions-current-timestamp,CURRENT_TIMESTAMP())>> function is used for
437437
relative date/time filtering:
438438

439-
["source","sql",subs="attributes,callouts,macros"]
439+
[source, sql]
440440
--------------------------------------------------
441441
include-tagged::{sql-specs}/docs.csv-spec[filterNow]
442442
--------------------------------------------------
@@ -460,7 +460,7 @@ SECOND_OF_MINUTE(date_exp) <1>
460460

461461
Extract the second of the minute from a date.
462462

463-
["source","sql",subs="attributes,callouts,macros"]
463+
[source, sql]
464464
--------------------------------------------------
465465
include-tagged::{sql-specs}/docs.csv-spec[secondOfMinute]
466466
--------------------------------------------------
@@ -484,7 +484,7 @@ QUARTER(date_exp) <1>
484484

485485
Extract the year quarter the date falls in.
486486

487-
["source","sql",subs="attributes,callouts,macros"]
487+
[source, sql]
488488
--------------------------------------------------
489489
include-tagged::{sql-specs}/docs.csv-spec[quarter]
490490
--------------------------------------------------
@@ -508,7 +508,7 @@ WEEK_OF_YEAR(date_exp) <1>
508508

509509
Extract the week of the year from a date.
510510

511-
["source","sql",subs="attributes,callouts,macros"]
511+
[source, sql]
512512
--------------------------------------------------
513513
include-tagged::{sql-specs}/docs.csv-spec[weekOfYear]
514514
--------------------------------------------------
@@ -532,7 +532,7 @@ YEAR(date_exp) <1>
532532

533533
Extract the year from a date.
534534

535-
["source","sql",subs="attributes,callouts,macros"]
535+
[source, sql]
536536
--------------------------------------------------
537537
include-tagged::{sql-specs}/docs.csv-spec[year]
538538
--------------------------------------------------
@@ -560,14 +560,14 @@ EXTRACT(
560560
Extract fields from a datetime by specifying the name of a <<sql-functions-datetime,datetime function>>.
561561
The following
562562

563-
["source","sql",subs="attributes,callouts,macros"]
563+
[source, sql]
564564
--------------------------------------------------
565565
include-tagged::{sql-specs}/docs.csv-spec[extractDayOfYear]
566566
--------------------------------------------------
567567

568568
is the equivalent to
569569

570-
["source","sql",subs="attributes,callouts,macros"]
570+
[source, sql]
571571
--------------------------------------------------
572572
include-tagged::{sql-specs}/docs.csv-spec[dayOfYear]
573573
--------------------------------------------------

docs/reference/sql/functions/grouping.asciidoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,29 @@ NOTE:: The histogram in SQL does *NOT* return empty buckets for missing interval
4646
`Histogram` can be applied on either numeric fields:
4747

4848

49-
["source","sql",subs="attributes,callouts,macros"]
49+
[source, sql]
5050
----
5151
include-tagged::{sql-specs}/docs.csv-spec[histogramNumeric]
5252
----
5353

5454
or date/time fields:
5555

56-
["source","sql",subs="attributes,callouts,macros"]
56+
[source, sql]
5757
----
5858
include-tagged::{sql-specs}/docs.csv-spec[histogramDate]
5959
----
6060

6161
Expressions inside the histogram are also supported as long as the
6262
return type is numeric:
6363

64-
["source","sql",subs="attributes,callouts,macros"]
64+
[source, sql]
6565
----
6666
include-tagged::{sql-specs}/docs.csv-spec[histogramNumericExpression]
6767
----
6868

6969
Do note that histograms (and grouping functions in general) allow custom expressions but cannot have any functions applied to them in the `GROUP BY`. In other words, the following statement is *NOT* allowed:
7070

71-
["source","sql",subs="attributes,callouts,macros"]
71+
[source, sql]
7272
----
7373
include-tagged::{sql-specs}/docs.csv-spec[expressionOnHistogramNotAllowed]
7474
----
@@ -77,7 +77,7 @@ as it requires two groupings (one for histogram followed by a second for applyin
7777

7878
Instead one can rewrite the query to move the expression on the histogram _inside_ of it:
7979

80-
["source","sql",subs="attributes,callouts,macros"]
80+
[source, sql]
8181
----
8282
include-tagged::{sql-specs}/docs.csv-spec[histogramDateExpression]
8383
----

0 commit comments

Comments
 (0)