-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the bug on CLI command with input argument #478
Conversation
Codecov Report
@@ Coverage Diff @@
## main #478 +/- ##
============================================
+ Coverage 82.38% 82.41% +0.02%
- Complexity 1406 1407 +1
============================================
Files 171 171
Lines 10816 10817 +1
Branches 1781 1782 +1
============================================
+ Hits 8911 8915 +4
+ Misses 1361 1359 -2
+ Partials 544 543 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix the behavior for binding named input_data
. Also consider modifying Cli.md
markdown to reflect the updated behavior.
cli/src/org/partiql/cli/main.kt
Outdated
import joptsimple.* | ||
import org.partiql.cli.functions.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: replace the wildcard imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will apply this comment in the next commit.
cli/test/org/partiql/cli/CliTest.kt
Outdated
@Test | ||
fun withoutInput() { | ||
val subject = makeCli("SELECT * FROM input_data") | ||
val actual = subject.runAndOutput() | ||
|
||
assertEquals("\n", actual) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior is incorrect. If the --input
option is not provided this query should throw an error - No such binding found for 'input_data'
. Right now input_data
is bound to emptyInputStream
. Consider removing this binding in case the cli option --input
is not set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will apply this comment in the next commit.
Issue #475
Description of changes: