@@ -60,9 +60,8 @@ fn test_eq_with_coercion() {
6060
6161#[ test]
6262fn test_get_field ( ) {
63- // field access Expr::field() requires a rewrite to work
6463 evaluate_expr_test (
65- col ( "props" ) . field ( "a" ) ,
64+ get_field ( col ( "props" ) , lit ( "a" ) ) ,
6665 vec ! [
6766 "+------------+" ,
6867 "| expr |" ,
@@ -77,11 +76,8 @@ fn test_get_field() {
7776
7877#[ test]
7978fn test_nested_get_field ( ) {
80- // field access Expr::field() requires a rewrite to work, test when it is
81- // not the root expression
8279 evaluate_expr_test (
83- col ( "props" )
84- . field ( "a" )
80+ get_field ( col ( "props" ) , lit ( "a" ) )
8581 . eq ( lit ( "2021-02-02" ) )
8682 . or ( col ( "id" ) . eq ( lit ( 1 ) ) ) ,
8783 vec ! [
@@ -98,9 +94,8 @@ fn test_nested_get_field() {
9894
9995#[ test]
10096fn test_list ( ) {
101- // list access also requires a rewrite to work
10297 evaluate_expr_test (
103- col ( "list" ) . index ( lit ( 1i64 ) ) ,
98+ array_element ( col ( "list" ) , lit ( 1i64 ) ) ,
10499 vec ! [
105100 "+------+" , "| expr |" , "+------+" , "| one |" , "| two |" , "| five |" ,
106101 "+------+" ,
@@ -110,9 +105,8 @@ fn test_list() {
110105
111106#[ test]
112107fn test_list_range ( ) {
113- // range access also requires a rewrite to work
114108 evaluate_expr_test (
115- col ( "list" ) . range ( lit ( 1i64 ) , lit ( 2i64 ) ) ,
109+ array_slice ( col ( "list" ) , lit ( 1i64 ) , lit ( 2i64 ) , lit ( 1i64 ) ) ,
116110 vec ! [
117111 "+--------------+" ,
118112 "| expr |" ,
0 commit comments