Skip to content

Commit

Permalink
Remove leading ❯ in sql code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ongchi committed Feb 6, 2024
1 parent 21ad46f commit fb82596
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/source/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ LOCATION 'https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hit
```
```sql
select count(*) from hits;
select count(*) from hits;
+----------+
| COUNT(*) |
+----------+
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ but these operators always return a `bool` which makes them not work with the ex
Unlike to some databases the math functions in Datafusion works the same way as Rust math functions, avoiding failing on corner cases e.g

```sql
select log(-1), log(0), sqrt(-1);
select log(-1), log(0), sqrt(-1);
+----------------+---------------+-----------------+
| log(Int64(-1)) | log(Int64(0)) | sqrt(Int64(-1)) |
+----------------+---------------+-----------------+
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user-guide/sql/data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can see the corresponding Arrow type for any SQL expression using
the `arrow_typeof` function. For example:

```sql
select arrow_typeof(interval '1 month');
select arrow_typeof(interval '1 month');
+-------------------------------------+
| arrowtypeof(IntervalYearMonth("1")) |
+-------------------------------------+
Expand All @@ -41,7 +41,7 @@ You can cast a SQL expression to a specific Arrow type using the `arrow_cast` fu
For example, to cast the output of `now()` to a `Timestamp` with second precision:

```sql
select arrow_cast(now(), 'Timestamp(Second, None)');
select arrow_cast(now(), 'Timestamp(Second, None)');
+---------------------+
| now() |
+---------------------+
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/sql/information_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ or
To show the current session configuration options, use the `SHOW ALL` command or the `information_schema.df_settings` view:

```sql
select * from information_schema.df_settings;
select * from information_schema.df_settings;

+-------------------------------------------------+---------+
| name | setting |
Expand Down
8 changes: 4 additions & 4 deletions docs/source/user-guide/sql/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Not Regex Case-Insensitive Match
Like Match

```sql
SELECT 'datafusion' ~~ 'dat_f%n';
SELECT 'datafusion' ~~ 'dat_f%n';
+---------------------------------------+
| Utf8("datafusion") ~~ Utf8("dat_f%n") |
+---------------------------------------+
Expand All @@ -311,7 +311,7 @@ Like Match
Case-Insensitive Like Match

```sql
SELECT 'datafusion' ~~* 'Dat_F%n';
SELECT 'datafusion' ~~* 'Dat_F%n';
+----------------------------------------+
| Utf8("datafusion") ~~* Utf8("Dat_F%n") |
+----------------------------------------+
Expand All @@ -324,7 +324,7 @@ Case-Insensitive Like Match
Not Like Match

```sql
SELECT 'datafusion' !~~ 'Dat_F%n';
SELECT 'datafusion' !~~ 'Dat_F%n';
+----------------------------------------+
| Utf8("datafusion") !~~ Utf8("Dat_F%n") |
+----------------------------------------+
Expand All @@ -337,7 +337,7 @@ Not Like Match
Not Case-Insensitive Like Match

```sql
SELECT 'datafusion' !~~* 'Dat%F_n';
SELECT 'datafusion' !~~* 'Dat%F_n';
+-----------------------------------------+
| Utf8("datafusion") !~~* Utf8("Dat%F_n") |
+-----------------------------------------+
Expand Down
6 changes: 3 additions & 3 deletions docs/source/user-guide/sql/scalar_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2974,16 +2974,16 @@ struct(expression1[, ..., expression_n])
For example, this query converts two columns `a` and `b` to a single column with
a struct type of fields `c0` and `c1`:

```sql
select * from t;
```
select * from t;
+---+---+
| a | b |
+---+---+
| 1 | 2 |
| 3 | 4 |
+---+---+
select struct(a, b) from t;
select struct(a, b) from t;
+-----------------+
| struct(t.a,t.b) |
+-----------------+
Expand Down
12 changes: 6 additions & 6 deletions docs/source/user-guide/sql/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ select * from x;
The keywords `JOIN` or `INNER JOIN` define a join that only shows rows where there is a match in both tables.

```sql
select * from x inner join x y ON x.column_1 = y.column_1;
select * from x inner join x y ON x.column_1 = y.column_1;
+----------+----------+----------+----------+
| column_1 | column_2 | column_1 | column_2 |
+----------+----------+----------+----------+
Expand All @@ -116,7 +116,7 @@ The keywords `LEFT JOIN` or `LEFT OUTER JOIN` define a join that includes all ro
is not a match in the right table. When there is no match, null values are produced for the right side of the join.

```sql
select * from x left join x y ON x.column_1 = y.column_2;
select * from x left join x y ON x.column_1 = y.column_2;
+----------+----------+----------+----------+
| column_1 | column_2 | column_1 | column_2 |
+----------+----------+----------+----------+
Expand All @@ -130,7 +130,7 @@ The keywords `RIGHT JOIN` or `RIGHT OUTER JOIN` define a join that includes all
is not a match in the left table. When there is no match, null values are produced for the left side of the join.

```sql
select * from x right join x y ON x.column_1 = y.column_2;
select * from x right join x y ON x.column_1 = y.column_2;
+----------+----------+----------+----------+
| column_1 | column_2 | column_1 | column_2 |
+----------+----------+----------+----------+
Expand All @@ -145,7 +145,7 @@ The keywords `FULL JOIN` or `FULL OUTER JOIN` define a join that is effectively
either side of the join where there is not a match.

```sql
select * from x full outer join x y ON x.column_1 = y.column_2;
select * from x full outer join x y ON x.column_1 = y.column_2;
+----------+----------+----------+----------+
| column_1 | column_2 | column_1 | column_2 |
+----------+----------+----------+----------+
Expand All @@ -160,7 +160,7 @@ A natural join defines an inner join based on common column names found between
column names are found, it behaves like a cross join.

```sql
select * from x natural join x y;
select * from x natural join x y;
+----------+----------+
| column_1 | column_2 |
+----------+----------+
Expand All @@ -174,7 +174,7 @@ A cross join produces a cartesian product that matches every row in the left sid
right side of the join.

```sql
select * from x cross join x y;
select * from x cross join x y;
+----------+----------+----------+----------+
| column_1 | column_2 | column_1 | column_2 |
+----------+----------+----------+----------+
Expand Down
12 changes: 6 additions & 6 deletions docs/source/user-guide/sql/subqueries.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DataFusion supports `EXISTS`, `NOT EXISTS`, `IN`, `NOT IN` and Scalar Subqueries
The examples below are based on the following table.

```sql
select * from x;
select * from x;
+----------+----------+
| column_1 | column_2 |
+----------+----------+
Expand All @@ -38,7 +38,7 @@ The `EXISTS` syntax can be used to find all rows in a relation where a correlate
for that row. Only correlated subqueries are supported.

```sql
select * from x y where exists (select * from x where x.column_1 = y.column_1);
select * from x y where exists (select * from x where x.column_1 = y.column_1);
+----------+----------+
| column_1 | column_2 |
+----------+----------+
Expand All @@ -53,7 +53,7 @@ The `NOT EXISTS` syntax can be used to find all rows in a relation where a corre
for that row. Only correlated subqueries are supported.

```sql
select * from x y where not exists (select * from x where x.column_1 = y.column_1);
select * from x y where not exists (select * from x where x.column_1 = y.column_1);
0 rows in set.
```

Expand All @@ -63,7 +63,7 @@ The `IN` syntax can be used to find all rows in a relation where a given express
results of a correlated subquery.

```sql
select * from x where column_1 in (select column_1 from x);
select * from x where column_1 in (select column_1 from x);
+----------+----------+
| column_1 | column_2 |
+----------+----------+
Expand All @@ -78,7 +78,7 @@ The `NOT IN` syntax can be used to find all rows in a relation where a given exp
results of a correlated subquery.

```sql
select * from x where column_1 not in (select column_1 from x);
select * from x where column_1 not in (select column_1 from x);
0 rows in set.
```

Expand All @@ -88,7 +88,7 @@ A scalar subquery can be used to produce a single value that can be used in many
is an example of a filter using a scalar subquery. Only correlated subqueries are supported.

```sql
select * from x y where column_1 < (select sum(column_2) from x where x.column_1 = y.column_1);
select * from x y where column_1 < (select sum(column_2) from x where x.column_1 = y.column_1);
+----------+----------+
| column_1 | column_2 |
+----------+----------+
Expand Down

0 comments on commit fb82596

Please sign in to comment.