MCPcopy Create free account
hub / github.com/apache/datafusion / and_with_nulls_op

Function and_with_nulls_op

datafusion/physical-expr/src/expressions/binary.rs:2831–2873  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2829
2830 #[test]
2831 fn and_with_nulls_op() -> Result<()> {
2832 let schema = Schema::new(vec![
2833 Field::new("a", DataType::Boolean, true),
2834 Field::new("b", DataType::Boolean, true),
2835 ]);
2836 let a = Arc::new(BooleanArray::from(vec![
2837 Some(true),
2838 Some(false),
2839 None,
2840 Some(true),
2841 Some(false),
2842 None,
2843 Some(true),
2844 Some(false),
2845 None,
2846 ])) as ArrayRef;
2847 let b = Arc::new(BooleanArray::from(vec![
2848 Some(true),
2849 Some(true),
2850 Some(true),
2851 Some(false),
2852 Some(false),
2853 Some(false),
2854 None,
2855 None,
2856 None,
2857 ])) as ArrayRef;
2858
2859 let expected = BooleanArray::from(vec![
2860 Some(true),
2861 Some(false),
2862 None,
2863 Some(false),
2864 Some(false),
2865 Some(false),
2866 None,
2867 Some(false),
2868 None,
2869 ]);
2870 apply_logic_op(&Arc::new(schema), &a, &b, Operator::And, expected)?;
2871
2872 Ok(())
2873 }
2874
2875 #[test]
2876 fn regex_with_nulls() -> Result<()> {

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
apply_logic_opFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…