You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/metadata.slt
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,22 @@
24
24
## in the test harness as there is no way to define schema
25
25
## with metadata in SQL.
26
26
27
+
query ITTPT
28
+
select * from table_with_metadata;
29
+
----
30
+
1 NULL NULL 2020-09-08T13:42:29.190855123 no_foo
31
+
NULL bar l_bar 2020-09-08T13:42:29.190855123 no_bar
32
+
3 baz l_baz 2020-09-08T13:42:29.190855123 no_baz
33
+
34
+
query TTT
35
+
describe table_with_metadata;
36
+
----
37
+
id Int32 YES
38
+
name Utf8 YES
39
+
l_name Utf8 YES
40
+
ts Timestamp(ns) NO
41
+
nonnull_name Utf8 NO
42
+
27
43
query IT
28
44
select id, name from table_with_metadata;
29
45
----
@@ -235,6 +251,28 @@ order by 1 asc nulls last;
235
251
3 1
236
252
NULL 1
237
253
254
+
# reproducer for https://github.com/apache/datafusion/issues/18337
255
+
# shoudl not get an internal error
256
+
query error
257
+
SELECT
258
+
'foo' AS name,
259
+
COUNT(
260
+
CASE
261
+
WHEN prev_value = 'no_bar' AND value = 'no_baz' THEN 1
262
+
ELSE NULL
263
+
END
264
+
) AS count_rises
265
+
FROM
266
+
(
267
+
SELECT
268
+
nonnull_name as value,
269
+
LAG(nonnull_name) OVER (ORDER BY ts) AS prev_value
270
+
FROM
271
+
table_with_metadata
272
+
);
273
+
----
274
+
DataFusion error: Internal error: Physical input schema should be the same as the one converted from logical input schema. Differences: .
275
+
This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues
0 commit comments