maxc-cli 0.9.0__tar.gz → 0.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/PKG-INFO +1 -1
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/__init__.py +1 -1
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/query.py +3 -1
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli.egg-info/PKG-INFO +1 -1
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli.egg-info/SOURCES.txt +1 -0
- maxc_cli-0.9.1/tests/test_backend_query_cost.py +25 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/MANIFEST.in +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/README.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/pyproject.toml +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/scripts/pyinstaller_entry.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/scripts/regression_test.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/setup.cfg +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/setup.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/__main__.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/_samples.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/agent_platforms.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/app.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/audit.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/auth_continuation.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/auth_providers.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/__init__.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/auth.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/catalog.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/data.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/job.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/mcp.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/meta.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/odps.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/backend/semantic.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/cache.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/catalog_bootstrap.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/cli.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/config.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/enterprise_tls.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/exceptions.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/function_metadata.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/help_format.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/helpers.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/job_ids.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/masking.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/mcp_serve.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/models.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/oauth.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/odps_runtime.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/output.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/proxy_auth.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/semantic.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/semantic_management.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/setting_parser.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/SKILL.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/agents/openai.yaml +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/bootstrap-auth.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/bootstrap-flow.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/command-patterns.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/json-output-format.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/maxcompute-select-guide.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/maxcompute-sql-notes.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/partition-guide.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/red-lines.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/registered-functions.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/semantic-packages.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/setup-install.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/sql-common-errors.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/sql-query-patterns.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/skills/references/text2sql-principles.md +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/state_permissions.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/store.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli/utils.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli.egg-info/dependency_links.txt +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli.egg-info/entry_points.txt +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli.egg-info/requires.txt +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/src/maxc_cli.egg-info/top_level.txt +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_agent_hints_and_cli.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_agent_platforms.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_agent_skill_commands.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_agent_skill_commands_context.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_ai_native_contract_regressions.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_auth_logout.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_backend_auth.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_backend_data.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_backend_data_serialization.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_backend_mcp.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_backend_meta.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_build_release_archive_compat.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_build_release_script.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_cache.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_catalog.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_catalog_bootstrap.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_cli_arg_validation.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_cli_mock.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_cli_query_parse_and_sanitize.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_compat.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_config_atomic_write.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_connection_bootstrap.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_e2e_smoke.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_effective_hints_contract.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_enterprise_tls.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_envelope_shape.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_error_self_correction.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_error_translation.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_exit_codes.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_external_auth.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_flag_hoist.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_help_format.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_help_version_e2e.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_helpers.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_helpers_csv.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_installer_contracts.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_integration.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_integration_real.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_job_improvements.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_job_inspection.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_job_store_durability.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_kb_commands.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_manifest_runtime_contract.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_masking.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_mcp_serve.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_meta_schema_and_partition_cols.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_oauth.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_odps_runtime.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_output_action_safety.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_output_format_contract.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_packaging_metadata.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_phase1_improvements.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_proxy_auth.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_pyinstaller_bundle.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_python39_compat.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_query_auto_promote.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_query_result_csv_fallback.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_registered_functions.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_semantic_management.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_semantic_scope.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_semantic_transport.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_setting_parser.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_skill_cli_consistency.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_skill_eval.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_skill_renderer.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_startup_imports.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_state_permissions.py +0 -0
- {maxc_cli-0.9.0 → maxc_cli-0.9.1}/tests/test_state_portability.py +0 -0
|
@@ -343,7 +343,9 @@ class QueryMixin:
|
|
|
343
343
|
**build_query_outline(actual_sql),
|
|
344
344
|
"project": project,
|
|
345
345
|
"cost_model": "maxcompute_native_sql_cost",
|
|
346
|
-
"estimated_input_size_bytes":
|
|
346
|
+
"estimated_input_size_bytes": (
|
|
347
|
+
int(sql_cost.input_size) if sql_cost.input_size is not None else None
|
|
348
|
+
),
|
|
347
349
|
"task_cost_cpu": None,
|
|
348
350
|
"task_cost_memory": None,
|
|
349
351
|
"sql_complexity": sql_cost.complexity,
|
|
@@ -78,6 +78,7 @@ tests/test_backend_data.py
|
|
|
78
78
|
tests/test_backend_data_serialization.py
|
|
79
79
|
tests/test_backend_mcp.py
|
|
80
80
|
tests/test_backend_meta.py
|
|
81
|
+
tests/test_backend_query_cost.py
|
|
81
82
|
tests/test_build_release_archive_compat.py
|
|
82
83
|
tests/test_build_release_script.py
|
|
83
84
|
tests/test_cache.py
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from types import SimpleNamespace
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from maxc_cli.backend.query import QueryMixin
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@pytest.mark.parametrize("input_size, expected", [(None, None), (0, 0), (1024, 1024)])
|
|
9
|
+
def test_native_cost_preserves_missing_input_estimate(input_size, expected):
|
|
10
|
+
cost = SimpleNamespace(input_size=input_size, complexity=1, udf_num=1)
|
|
11
|
+
calls = []
|
|
12
|
+
|
|
13
|
+
def execute_sql_cost(sql, **kwargs):
|
|
14
|
+
calls.append((sql, kwargs))
|
|
15
|
+
return cost
|
|
16
|
+
|
|
17
|
+
backend = QueryMixin()
|
|
18
|
+
backend.client = SimpleNamespace(execute_sql_cost=execute_sql_cost)
|
|
19
|
+
|
|
20
|
+
result = backend.estimate_query_cost("SELECT foo('x');", project="test_project")
|
|
21
|
+
|
|
22
|
+
assert result["estimated_input_size_bytes"] == expected
|
|
23
|
+
assert result["sql_complexity"] == 1
|
|
24
|
+
assert result["sql_udf_num"] == 1
|
|
25
|
+
assert calls == [("SELECT foo('x');", {"project": "test_project", "hints": {}})]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|