From 81651dc210baf846bd3fc2ffaed37203ae092dde Mon Sep 17 00:00:00 2001 From: kenstott <128912107+kenstott@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:50:30 -0400 Subject: [PATCH] Improved tracing and debug logs. --- .gitignore | 1 + .run/Run ndc-test-file.run.xml | 4 +- .run/Run ndc-test-jdbc.run.xml | 7 +- Cargo.lock | 34 + adapters/file/data/arrow/albums.arrow | Bin 0 -> 17066 bytes adapters/file/data/arrow/artists.arrow | Bin 0 -> 10834 bytes adapters/file/data/arrow/customers.arrow | Bin 0 -> 15386 bytes adapters/file/data/arrow/employees.arrow | Bin 0 -> 8770 bytes adapters/file/data/arrow/genres.arrow | Bin 0 -> 2346 bytes adapters/file/data/arrow/invoice_items.arrow | Bin 0 -> 92634 bytes adapters/file/data/arrow/invoices.arrow | Bin 0 -> 48674 bytes adapters/file/data/arrow/media_types.arrow | Bin 0 -> 2018 bytes adapters/file/data/arrow/playlist_track.arrow | Bin 0 -> 141290 bytes adapters/file/data/arrow/playlists.arrow | Bin 0 -> 2298 bytes adapters/file/data/arrow/tracks.arrow | Bin 0 -> 347426 bytes .../test/bug => data/files}/ARCHERS.json | 0 .../test/bug => data/files}/DATES.csv | 0 .../test/sales => data/files}/DEPTS.csv | 0 .../test/sales => data/files}/EMPS.csv.gz | Bin .../test/bug => data/files}/LONG_EMPS.csv | 0 .../test/sales => data/files}/SDEPTS.csv | 0 .../bug => data/files}/WACKY_COLUMN_NAMES.csv | 0 adapters/file/data/files/yaml.yaml | 30 + adapters/file/dev.local.configuration.json | 137 +--- .../resources/test/bug/configuration.json | 566 -------------- adapters/file/resources/test/bug/test.yaml | 30 - adapters/jdbc/.env | 2 - adapters/jdbc/dev.local.configuration.json | 728 +++++++++--------- adapters/jdbc/model.json | 8 +- adapters/jdbc/model_test.json | 49 +- build.sh | 12 + calcite-rs-jni/build.sh | 1 + calcite-rs-jni/chinook.db | 0 calcite-rs-jni/pom.xml | 141 ++-- .../main/java/org/kenstott/CalciteQuery.java | 75 +- .../src/main/java/org/kenstott/Main.java | 23 +- .../java/org/kenstott/SQLiteSqlDialect.java | 77 +- calcite-rs-jni/src/main/resources/log4j2.xml | 11 +- cli.sh | 2 +- crates/calcite-schema/src/aggregates.rs | 8 +- crates/calcite-schema/src/calcite.rs | 34 + crates/calcite-schema/src/collections.rs | 53 +- crates/calcite-schema/src/comparators.rs | 4 +- crates/calcite-schema/src/configuration.rs | 4 +- crates/calcite-schema/src/jvm.rs | 78 +- crates/calcite-schema/src/models.rs | 38 +- crates/calcite-schema/src/scalars.rs | 2 +- crates/calcite-schema/src/schema.rs | 45 +- crates/calcite-schema/src/version5.rs | 96 ++- crates/cli/Cargo.toml | 2 + crates/cli/assets/models/model.arrow.json | 1 + crates/cli/assets/models/model.cassandra.json | 1 + crates/cli/assets/models/model.files.json | 1 + crates/cli/assets/models/model.h2.json | 1 + crates/cli/assets/models/model.hive.json | 1 + crates/cli/assets/models/model.json | 1 + crates/cli/assets/models/model.pg.json | 1 + crates/cli/assets/models/model.sqlite.json | 1 + crates/cli/src/lib.rs | 18 +- crates/cli/src/main.rs | 20 +- crates/connectors/ndc-calcite/Cargo.toml | 1 + crates/connectors/ndc-calcite/bin/main.rs | 1 + crates/connectors/ndc-calcite/src/calcite.rs | 26 +- .../ndc-calcite/src/connector/calcite.rs | 110 +-- crates/connectors/ndc-calcite/src/query.rs | 151 ++-- crates/connectors/ndc-calcite/src/sql.rs | 246 +++--- crates/values/src/is_running_in_container.rs | 2 +- 67 files changed, 1285 insertions(+), 1600 deletions(-) create mode 100644 adapters/file/data/arrow/albums.arrow create mode 100644 adapters/file/data/arrow/artists.arrow create mode 100644 adapters/file/data/arrow/customers.arrow create mode 100644 adapters/file/data/arrow/employees.arrow create mode 100644 adapters/file/data/arrow/genres.arrow create mode 100644 adapters/file/data/arrow/invoice_items.arrow create mode 100644 adapters/file/data/arrow/invoices.arrow create mode 100644 adapters/file/data/arrow/media_types.arrow create mode 100644 adapters/file/data/arrow/playlist_track.arrow create mode 100644 adapters/file/data/arrow/playlists.arrow create mode 100644 adapters/file/data/arrow/tracks.arrow rename adapters/file/{resources/test/bug => data/files}/ARCHERS.json (100%) rename adapters/file/{resources/test/bug => data/files}/DATES.csv (100%) rename adapters/file/{resources/test/sales => data/files}/DEPTS.csv (100%) rename adapters/file/{resources/test/sales => data/files}/EMPS.csv.gz (100%) rename adapters/file/{resources/test/bug => data/files}/LONG_EMPS.csv (100%) rename adapters/file/{resources/test/sales => data/files}/SDEPTS.csv (100%) rename adapters/file/{resources/test/bug => data/files}/WACKY_COLUMN_NAMES.csv (100%) create mode 100644 adapters/file/data/files/yaml.yaml delete mode 100644 adapters/file/resources/test/bug/configuration.json delete mode 100644 adapters/file/resources/test/bug/test.yaml delete mode 100644 calcite-rs-jni/chinook.db diff --git a/.gitignore b/.gitignore index c233b6a..d0d8449 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ target/ /adapters/hive/mariadb_data/ /adapters/hive/beeline.conf/ /adapters/hive/hadoop_data/ + diff --git a/.run/Run ndc-test-file.run.xml b/.run/Run ndc-test-file.run.xml index cd531d3..bea7588 100644 --- a/.run/Run ndc-test-file.run.xml +++ b/.run/Run ndc-test-file.run.xml @@ -2,7 +2,9 @@