Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ pytest -m produce_substrait_snapshot --snapshot-update
You can update the snapshots from a single producer with the `--producer` option as well as
for a single test by specifying the test file:
```commandline
pytest -m produce_substrait_snapshot --producer IsthmusProducer --snapshot-update test_arithmetic_functions.py
pytest -m produce_substrait_snapshot --producer isthmus --snapshot-update test_arithmetic_functions.py
```


Expand Down Expand Up @@ -272,21 +272,21 @@ If you are testing out an SQL query, copy your SQL query into `substrait_consume
and run the following command (make sure to specify a producer that can convert SQL to Substrait):
```commandline
cd substrait_consumer/tests/adhoc
pytest --adhoc_producer=IsthmusProducer test_adhoc_expression.py
pytest --adhoc_producer=isthmus test_adhoc_expression.py
```

If you are testing out an Ibis expression, copy your Ibis expression into
`substrait_consumer/tests/adhoc/ibis_expr.py` and run the following command:
```commandline
cd substrait_consumer/tests/adhoc
pytest --adhoc_producer=IbisProducer test_adhoc_expression.py
pytest --adhoc_producer=ibis test_adhoc_expression.py
```
*Note: If you're using the IbisProducer, make sure you do not edit the function name and arguments
already in line 2 of `ibis_expr.py`. The test is expecting the specific name and arguments.

You can save the produced substrait plans with the `--saveplan` option.
```commandline
pytest --saveplan True --adhoc_producer=IsthmusProducer test_adhoc_expression.py
pytest --saveplan True --adhoc_producer=isthmus test_adhoc_expression.py
```
Plans will be saved as {producer_name}_substrait.json
```commandline
Expand All @@ -297,7 +297,7 @@ IsthmusProducer_substrait.json
If you want to run the tests using specific producer/consumer pairs, you can use
the both the `--adhoc_producer` and `--consumer` options.
```commandline
pytest --adhoc_producer=IsthmusProducer --consumer=AceroConsumer test_adhoc_expression.py
pytest --adhoc_producer=isthmus --consumer=acero test_adhoc_expression.py
```


Expand Down
204 changes: 102 additions & 102 deletions app/consumer_results.csv

Large diffs are not rendered by default.

132 changes: 66 additions & 66 deletions app/producer_results.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FullFunction,DataFusionProducer,DuckDBProducer,IbisProducer,IsthmusProducer
approximation.approx_count_distinct,False,True,False,False
FullFunction,datafusion,duckdb,ibis,isthmus
approximation.approx_count_distinct,False,False,False,False
approximation.approx_distinct,True,False,False,False
arithmetic_decimal.add,False,True,False,False
arithmetic_decimal.subtract,False,True,False,False
Expand All @@ -10,93 +10,93 @@ arithmetic_decimal.sum,True,True,False,False
arithmetic_decimal.avg,True,True,False,False
arithmetic_decimal.min,True,True,False,False
arithmetic_decimal.max,True,True,False,False
arithmetic.add,True,True,True,True
arithmetic.subtract,True,True,True,True
arithmetic.multiply,True,True,True,True
arithmetic.divide,True,True,True,True
arithmetic.modulus,False,True,True,True
arithmetic.factorial,True,False,False,False
arithmetic.add,True,True,False,False
arithmetic.subtract,True,True,False,False
arithmetic.multiply,True,True,False,False
arithmetic.divide,True,True,False,False
arithmetic.modulus,False,True,False,False
arithmetic.factorial,True,True,False,False
arithmetic.power,True,True,False,False
arithmetic.sqrt,True,True,False,True
arithmetic.exp,True,True,False,True
arithmetic.negate,False,False,True,False
arithmetic.cos,True,True,False,True
arithmetic.acos,False,True,False,True
arithmetic.sin,True,True,False,True
arithmetic.asin,True,True,False,True
arithmetic.tan,True,True,False,True
arithmetic.atan,True,True,False,True
arithmetic.atan2,True,True,False,True
arithmetic.abs,True,True,True,True
arithmetic.sign,False,True,True,True
arithmetic.sum,True,True,True,True
arithmetic.count,True,True,False,True
arithmetic.count_star,True,True,False,True
arithmetic.avg,True,True,True,False
arithmetic.min,True,True,True,True
arithmetic.max,True,True,True,True
arithmetic.median,True,True,True,False
arithmetic.sqrt,True,True,False,False
arithmetic.exp,True,True,False,False
arithmetic.negate,False,False,False,False
arithmetic.cos,True,True,False,False
arithmetic.acos,True,True,False,False
arithmetic.sin,True,True,False,False
arithmetic.asin,True,True,False,False
arithmetic.tan,True,True,False,False
arithmetic.atan,True,True,False,False
arithmetic.atan2,True,True,False,False
arithmetic.abs,True,True,False,False
arithmetic.sign,False,True,False,False
arithmetic.sum,True,True,False,False
arithmetic.count,True,True,False,False
arithmetic.count_star,True,True,False,False
arithmetic.avg,True,True,False,False
arithmetic.min,True,True,False,False
arithmetic.max,True,True,False,False
arithmetic.median,True,True,False,False
arithmetic.mode,False,True,False,False
arithmetic.product,False,True,False,False
arithmetic.std_dev,False,True,False,False
arithmetic.variance,False,True,False,False
boolean.or,True,True,True,True
boolean.and,True,True,True,True
boolean.not,True,True,False,True
boolean.or,True,True,False,False
boolean.and,True,True,False,False
boolean.not,True,True,False,False
boolean.xor,False,True,False,False
boolean.bool_and,True,True,False,False
boolean.bool_or,True,True,False,False
comparison.not_equal,True,True,True,True
comparison.equal,False,True,True,True
comparison.not_equal,True,True,False,False
comparison.equal,True,True,False,False
comparison.is_not_distinct_from,True,True,False,False
comparison.lt,True,True,True,True
comparison.lte,True,True,True,True
comparison.gt,True,True,True,True
comparison.gte,True,True,True,True
comparison.is_not_null,False,True,False,True
comparison.is_null,False,True,False,True
comparison.lt,True,True,False,False
comparison.lte,True,True,False,False
comparison.gt,True,True,False,False
comparison.gte,True,True,False,False
comparison.is_not_null,False,True,False,False
comparison.is_null,False,True,False,False
comparison.is_nan,True,True,False,False
comparison.is_finite,False,True,False,False
comparison.is_infinite,False,True,False,False
comparison.coalesce,False,False,False,True
comparison.between,True,True,False,True
datetime.extract,False,True,False,True
comparison.between,True,True,False,False
comparison.coalesce,False,False,False,False
datetime.extract,True,True,False,False
datetime.add,False,True,False,False
datetime.add_intervals,False,False,False,False
datetime.subtract,False,True,False,False
datetime.lt,True,True,False,True
datetime.lte,True,True,False,True
datetime.gt,True,True,False,True
datetime.gte,True,True,False,True
logarithmic.ln,False,True,False,False
datetime.lt,True,True,False,False
datetime.lte,True,True,False,False
datetime.gt,True,True,False,False
datetime.gte,True,True,False,False
datetime.add_intervals,False,False,False,False
logarithmic.ln,True,True,False,False
logarithmic.log10,True,True,False,False
logarithmic.log2,True,True,False,False
logarithmic.logb,False,False,False,False
rounding.ceil,False,True,False,True
rounding.floor,True,True,False,True
rounding.round,False,True,False,True
string.concat,False,True,False,False
rounding.ceil,True,True,False,False
rounding.floor,True,True,False,False
rounding.round,True,True,False,False
string.concat,True,True,False,False
string.concat_ws,True,True,False,False
string.like,True,True,False,True
string.starts_with0,True,False,True,False
string.like,True,True,False,False
string.starts_with0,True,False,False,False
string.starts_with1,False,True,False,False
string.ends_with,False,True,True,False
string.substring0,True,True,True,False
string.substring1,False,False,False,True
string.contains,False,True,True,False
string.ends_with,False,True,False,False
string.substring0,True,True,False,False
string.substring1,False,False,False,False
string.contains,True,True,False,False
string.strpos,True,True,False,False
string.replace,True,True,True,False
string.replace,True,True,False,False
string.repeat,True,True,False,False
string.reverse,True,True,True,False
string.lower,True,True,True,False
string.upper,True,True,True,False
string.char_length,True,True,True,False
string.reverse,True,True,False,False
string.lower,True,True,False,False
string.upper,True,True,False,False
string.char_length,True,True,False,False
string.bit_length,True,True,False,False
string.ltrim,True,True,False,False
string.rtrim,True,True,False,False
string.trim,False,True,False,False
string.lpad,True,True,True,False
string.rpad,True,True,True,False
string.left,True,True,True,False
string.right,True,True,True,False
string.lpad,True,True,False,False
string.rpad,True,True,False,False
string.left,True,True,False,False
string.right,True,True,False,False
string.string_agg,False,True,False,False
28 changes: 8 additions & 20 deletions app/substrait_consumer_function_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,14 @@ def support_matrix_df():
def backends_info_df():
return pd.DataFrame(
{
"DataFusionProducer-DataFusionConsumer": [
"DataFusionProducer",
"DataFusionConsumer",
],
"DataFusionProducer-DuckDBConsumer": [
"DataFusionProducer",
"DuckDBConsumer",
],
"DuckDBProducer-DataFusionConsumer": [
"DuckDBProducer",
"DataFusionConsumer",
],
"DuckDBProducer-DuckDBConsumer": ["DuckDBProducer", "DuckDBConsumer"],
"IbisProducer-DuckDBConsumer": ["IbisProducer", "DuckDBConsumer"],
"IbisProducer-DataFusionConsumer": ["IbisProducer", "DataFusionConsumer"],
"IsthmusProducer-DuckDBConsumer": ["IsthmusProducer", "DuckDBConsumer"],
"IsthmusProducer-DataFusionConsumer": [
"IsthmusProducer",
"DataFusionConsumer",
],
"datafusion-datafusion": ["datafusion", "datafusion"],
"datafusion-duckdb": ["datafusion", "duckdb"],
"duckdb-datafusion": ["duckdb", "datafusion"],
"duckdb-duckdb": ["duckdb", "duckdb"],
"ibis-duckdb": ["ibis", "duckdb"],
"ibis-datafusion": ["ibis", "datafusion"],
"isthmus-duckdb": ["isthmus", "duckdb"],
"isthmus-datafusion": ["isthmus", "datafusion"],
}.items(),
columns=["backend_name", "categories"],
)
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/datafusion_consumer_functions.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=DataFusionConsumer substrait_consumer/tests/functional/extension_functions
CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=datafusion substrait_consumer/tests/functional/extension_functions
2 changes: 1 addition & 1 deletion ci/docker/datafusion_consumer_relations.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=DataFusionConsumer substrait_consumer/tests/functional/relations
CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=datafusion substrait_consumer/tests/functional/relations
2 changes: 1 addition & 1 deletion ci/docker/datafusion_producer_functions.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=DataFusionProducer substrait_consumer/tests/functional/extension_functions
CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=datafusion substrait_consumer/tests/functional/extension_functions
2 changes: 1 addition & 1 deletion ci/docker/datafusion_producer_relations.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=DataFusionProducer substrait_consumer/tests/functional/relations
CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=datafusion substrait_consumer/tests/functional/relations
2 changes: 1 addition & 1 deletion ci/docker/duckdb_consumer_functions.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=DuckDBConsumer substrait_consumer/tests/functional/extension_functions
CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=duckdb substrait_consumer/tests/functional/extension_functions
2 changes: 1 addition & 1 deletion ci/docker/duckdb_consumer_relations.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=DuckDBConsumer substrait_consumer/tests/functional/relations
CMD /usr/bin/python -mpytest -m consume_substrait_snapshot --consumer=duckdb substrait_consumer/tests/functional/relations
2 changes: 1 addition & 1 deletion ci/docker/duckdb_producer_functions.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=DuckDBProducer substrait_consumer/tests/functional/extension_functions
CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=duckdb substrait_consumer/tests/functional/extension_functions
2 changes: 1 addition & 1 deletion ci/docker/duckdb_producer_relations.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait pyarro
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=DuckDBProducer substrait_consumer/tests/functional/relations
CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=duckdb substrait_consumer/tests/functional/relations
2 changes: 1 addition & 1 deletion ci/docker/ibis_producer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --upgrade pip setuptools pytest pytest-snapshot substrait==0.8.0
WORKDIR /substrait_consumer
COPY . .

CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=IbisProducer substrait_consumer/tests/functional/extension_functions
CMD /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=ibis substrait_consumer/tests/functional/extension_functions
2 changes: 1 addition & 1 deletion ci/docker/isthmus_producer_functions.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ COPY . .

CMD git submodule update --init \
&& ./build-and-copy-isthmus-shadow-jar.sh \
&& /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=IsthmusProducer substrait_consumer/tests/functional/extension_functions
&& /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=isthmus substrait_consumer/tests/functional/extension_functions
2 changes: 1 addition & 1 deletion ci/docker/isthmus_producer_relations.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ COPY . .

CMD git submodule update --init \
&& ./build-and-copy-isthmus-shadow-jar.sh \
&& /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=IsthmusProducer substrait_consumer/tests/functional/relations
&& /usr/bin/python -mpytest -m produce_substrait_snapshot --producer=isthmus substrait_consumer/tests/functional/relations
Loading