Skip to content

Commit

Permalink
Improved tracing and debug logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenstott committed Aug 26, 2024
1 parent 1d40b43 commit 81651dc
Show file tree
Hide file tree
Showing 67 changed files with 1,285 additions and 1,600 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ target/
/adapters/hive/mariadb_data/
/adapters/hive/beeline.conf/
/adapters/hive/hadoop_data/

4 changes: 3 additions & 1 deletion .run/Run ndc-test-file.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<configuration default="false" name="Run ndc-test-file" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run --package ndc-calcite --bin ndc-calcite -- test --configuration . " />
<option name="workingDirectory" value="file://$PROJECT_DIR$/adapters/file" />
<envs />
<envs>
<env name="RUST_LOG" value="all" />
</envs>
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
Expand Down
7 changes: 6 additions & 1 deletion .run/Run ndc-test-jdbc.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
<configuration default="false" name="Run ndc-test-jdbc" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="run --package ndc-calcite --bin ndc-calcite -- test --configuration . " />
<option name="workingDirectory" value="file://$PROJECT_DIR$/adapters/jdbc" />
<envs />
<envs>
<env name="OTEL_LOG_LEVEL" value="all" />
<env name="OTEL_LOGS_EXPORTER" value="console" />
<env name="OTEL_TRACES_EXPORTER" value="console" />
<env name="RUST_LOG" value="trace" />
</envs>
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
Expand Down
34 changes: 34 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added adapters/file/data/arrow/albums.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/artists.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/customers.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/employees.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/genres.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/invoice_items.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/invoices.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/media_types.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/playlist_track.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/playlists.arrow
Binary file not shown.
Binary file added adapters/file/data/arrow/tracks.arrow
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions adapters/file/data/files/yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- id: 19990101
a: "Friday"
b: "New Years Day"
c: "Tractor trouble."
d:
- "Alice"
- "Bob"
- "Xavier"
e: "Julian Hyde"
f: ""
g:
- "Bob's tractor got stuck in a field."
- "Alice and Xavier hatch a plan to surprise Charlie."
object:
count: 1
- id: 19990103
a: "Sunday"
b: "Sunday 3rd January"
c: "Charlie's surprise."
d:
- "Alice"
- "Zebedee"
- "Charlie"
- "Xavier"
e: "William Shakespeare"
f: ""
g:
- "Charlie is very surprised by Alice and Xavier's surprise plan."
object:
count: 2
137 changes: 12 additions & 125 deletions adapters/file/dev.local.configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
"defaultSchema": "sales",
"schemas": [
{
"type": "custom",
"name": "sales",
"cache": true,
"factory": "org.apache.calcite.adapter.file.FileSchemaFactory",
"operand": {
"directory": "resources/test/bug"
}
},
{
"name": "sales_views",
"cache": true,
"tables": [
{
"name": "EMPS",
"type": "custom",
"factory": "org.apache.calcite.adapter.file.CsvTableFactory",
"operand": {}
},
{
"name": "female_emps",
"type": "view",
"sql": "select * from \"EMPS\" where \"GENDER\" = 'F'",
"sql": "select * from \"sales\".\"LONG_EMPS\" where \"GENDER\" = 'F'",
"modifiable": false
}
]
Expand All @@ -26,122 +30,5 @@
},
"model_file_path": "./model.json",
"fixes": true,
"metadata": {
"EMPS": {
"schema": "sales",
"name": "EMPS",
"columns": {
"CITY": {
"name": "CITY",
"scalarType": "VARCHAR",
"nullable": true
},
"DEPTNO": {
"name": "DEPTNO",
"scalarType": "INTEGER",
"nullable": true
},
"JOINEDAT": {
"name": "JOINEDAT",
"scalarType": "DATE",
"nullable": true
},
"EMPID": {
"name": "EMPID",
"scalarType": "INTEGER",
"nullable": true
},
"SLACKER": {
"name": "SLACKER",
"scalarType": "BOOLEAN",
"nullable": true
},
"MANAGER": {
"name": "MANAGER",
"scalarType": "BOOLEAN",
"nullable": true
},
"GENDER": {
"name": "GENDER",
"scalarType": "VARCHAR",
"nullable": true
},
"NAME": {
"name": "NAME",
"scalarType": "VARCHAR",
"nullable": true
},
"EMPNO": {
"name": "EMPNO",
"scalarType": "INTEGER",
"nullable": true
},
"AGE": {
"name": "AGE",
"scalarType": "INTEGER",
"nullable": true
}
},
"primaryKeys": [],
"exportedKeys": []
},
"female_emps": {
"schema": "sales",
"name": "female_emps",
"columns": {
"NAME": {
"name": "NAME",
"scalarType": "VARCHAR",
"nullable": true
},
"GENDER": {
"name": "GENDER",
"scalarType": "VARCHAR",
"nullable": true
},
"DEPTNO": {
"name": "DEPTNO",
"scalarType": "INTEGER",
"nullable": true
},
"AGE": {
"name": "AGE",
"scalarType": "INTEGER",
"nullable": true
},
"CITY": {
"name": "CITY",
"scalarType": "VARCHAR",
"nullable": true
},
"MANAGER": {
"name": "MANAGER",
"scalarType": "BOOLEAN",
"nullable": true
},
"EMPNO": {
"name": "EMPNO",
"scalarType": "INTEGER",
"nullable": true
},
"SLACKER": {
"name": "SLACKER",
"scalarType": "BOOLEAN",
"nullable": true
},
"JOINEDAT": {
"name": "JOINEDAT",
"scalarType": "DATE",
"nullable": true
},
"EMPID": {
"name": "EMPID",
"scalarType": "INTEGER",
"nullable": true
}
},
"primaryKeys": [],
"exportedKeys": []
}
}
"metadata": {}
}
Loading

0 comments on commit 81651dc

Please sign in to comment.