Skip to content

Commit

Permalink
feat:Migrate to DuckDB Arrow for Query Execution
Browse files Browse the repository at this point in the history
  • Loading branch information
d h authored and d h committed Dec 27, 2024
1 parent 8374d98 commit cd9c772
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions compatibility/flightsql/python/flightsql_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ def setUp(self):
value INT
)
""") # Create the table
self.conn.commit()

def test_insert_and_select(self):
"""Test inserting data and selecting it back to verify correctness."""
with self.conn.cursor() as cursor:
# Insert sample data
cursor.execute("INSERT INTO myduck.intTable (id, name, value) VALUES (1, 'TestName', 100)")
cursor.execute("INSERT INTO myduck.intTable (id, name, value) VALUES (2, 'AnotherName', 200)")
cursor.execute("INSERT INTO intTable (id, name, value) VALUES (1, 'TestName', 100)")
cursor.execute("INSERT INTO intTable (id, name, value) VALUES (2, 'AnotherName', 200)")

# Select data from the table
cursor.execute("SELECT * FROM myduck.intTable")
cursor.execute("SELECT * FROM intTable")
rows = cursor.fetchall()

# Expected result after insertions
Expand Down

0 comments on commit cd9c772

Please sign in to comment.